CarLaTeX
How can I align the caption to the left?
I tried with
```
\SetTblrStyle{caption}{halign=l}
```
but it doesn't give the desired result.
```
\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\SetTblrStyle{caption}{halign=l}
\begin{document}
\begin{table}[ht]
\begin{longtblr}[
caption = {A caption},
label = {tab:lab},
]{
colspec = {ccc},
width = \linewidth,
rowhead = 1,
}
A Header & B Header & C Header\\
1 & 3 & 5 \\
7 & 9 & 11 \\
2 & 10 & 16\\
\end{longtblr}\end{table}
\end{document}
```
![Screenshot 2023-05-15 071402.png](/image?hash=484d73944e42198a9f7b30b0b4a7f07d9d272ec8e9924d1ff5081402526e34db)
Top Answer
L.J.R.
Sorry, it is not documented that you need to change the template to `simple` (which is similar to `\captionsetup{singlelinecheck=false}` of `caption` package) first.
Also, you can not put `longtblr` inside `table` or other float environments, so I have changed it to `talltblr` in the following code.
```
\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\SetTblrTemplate{caption}{simple}
\SetTblrStyle{caption}{halign=l}
\begin{document}
\begin{table}[ht]
\begin{talltblr}[
caption = {A caption},
label = {tab:lab},
]{
colspec = {ccc},
width = \linewidth,
hlines
}
A Header & B Header & C Header\\
1 & 3 & 5 \\
7 & 9 & 11 \\
2 & 10 & 16\\
\end{talltblr}
\end{table}
\end{document}
```
![image.png](/image?hash=7aaaedb6186fa49e1ea5355cec2d71812a2555124cb74f013a4257b53335d205)