tables math add tag
Laurenso
I have this table. I use `tabularray` package. This is my code
```
\documentclass[12pt]{article}
\usepackage{tabularray}
\UseTblrLibrary{diagbox}
\UseTblrLibrary{varwidth}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{counter}
\usepackage{enumitem}
\usepackage{ninecolors}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
\UseTblrLibrary{siunitx} 
\usepackage[paperwidth=19cm, paperheight=26.5cm, left=1.7cm,right=1.7cm,top=1.8cm,bottom=1.7cm]{geometry}
\DefTblrTemplate{contfoot-text}{normal}{Continued on next page}
\SetTblrTemplate{contfoot-text}{normal}
\DefTblrTemplate{conthead-text}{normal}{(Continued)}
\SetTblrTemplate{conthead-text}{normal}
\SetTblrTemplate{conthead-text}{normal}
\newcounter{mycnta}
\newcommand{\mycnta}{\stepcounter{mycnta}\arabic{mycnta}}
\begin{document}
	\begin{longtblr}[
		caption={Some text}]{
			colspec = {Q[c,gray9]X[l]Q[c]},
			vlines,
			hlines,
			row{1}={yellow9,font=\bfseries},
			cell{2,7,11}{2-3} ={teal9},
			%cell{7}{2-3} ={teal9},
			%cell{11}{2-3} ={teal9},
			hline{1,2,Y,Z} = {solid},
			cell{1}{2-3}={halign=c},
			column{1}={font=\bfseries},
			cell{2-Z}{1}={cmd={\mycnta}},}
		Problem & Content & Point \\
		\SetCell[r=5]{m}	& Solve the equation 
		\[ (2 x+3)\cdot \sqrt{4 x+5}+(6 x+7) \cdot\sqrt{8 x+9}=2. \]
 &  \num{1.00}   \\
		& $ \Delta =(-5)^2 - 4 \cdot 1 \cdot 6 = 1$, & \num{0.25} \\
		& $ x = \dfrac{-(-5) -1}{2} = 2$. & \num{0.25} \\
		& $ x = \dfrac{-(-5)  + 1}{2} = 3$ & \num{0.25} \\
		& The given equation has two solutions $x=2$ and $x = 3$. & \num{0.25} \\
\end{longtblr} 
\end{document}
```
I got error ![image.png](/image?hash=b86dcf8f1839be27c820400595e5268d680f55bc4078119a45810c3bb56ebe08)

when I use 
```
\[ (2 x+3)\cdot \sqrt{4 x+5}+(6 x+7) \cdot\sqrt{8 x+9}=2. \]

```
instead of using 

```
$(2 x+3)\cdot \sqrt{4 x+5}+(6 x+7) \cdot\sqrt{8 x+9}=2. $

```
How can I repair it?
Top Answer
samcarter
`\[...\]` is usually meant to show an equation on a line of its own instead of integrating it in the surrounding context. Texnically, you could use it if you use a fixed with column, e.g. `Q[10cm,l]` instead of the X column, however you could create a similar effect like this:


```
\documentclass[12pt]{article}
\usepackage{tabularray}
\UseTblrLibrary{diagbox}
\UseTblrLibrary{varwidth}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{counter}
\usepackage{enumitem}
\usepackage{ninecolors}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
\UseTblrLibrary{siunitx} 
\usepackage[paperwidth=19cm, paperheight=26.5cm, left=1.7cm,right=1.7cm,top=1.8cm,bottom=1.7cm]{geometry}
\DefTblrTemplate{contfoot-text}{normal}{Continued on next page}
\SetTblrTemplate{contfoot-text}{normal}
\DefTblrTemplate{conthead-text}{normal}{(Continued)}
\SetTblrTemplate{conthead-text}{normal}
\SetTblrTemplate{conthead-text}{normal}
\newcounter{mycnta}
\newcommand{\mycnta}{\stepcounter{mycnta}\arabic{mycnta}}
\begin{document}
	\begin{longtblr}[
		caption={Some text}]{
			colspec = {Q[c,gray9]X[l]Q[c]},
			vlines,
			hlines,
			row{1}={yellow9,font=\bfseries},
			cell{2,7,11}{2-3} ={teal9},
			%cell{7}{2-3} ={teal9},
			%cell{11}{2-3} ={teal9},
			hline{1,2,Y,Z} = {solid},
			cell{1}{2-3}={halign=c},
			column{1}={font=\bfseries},
			cell{2-Z}{1}={cmd={\mycnta}},}
		Problem & Content & Point \\
		\SetCell[r=5]{m}	& Solve the equation \medskip\newline
    \parbox{\linewidth}{\centering $\displaystyle (2 x+3)\cdot \sqrt{4 x+5}+(6 x+7) \cdot\sqrt{8 x+9}=2. $}\medskip
 &  \num{1.00}   \\
		& $ \Delta =(-5)^2 - 4 \cdot 1 \cdot 6 = 1$, & \num{0.25} \\
		& $ x = \dfrac{-(-5) -1}{2} = 2$. & \num{0.25} \\
		& $ x = \dfrac{-(-5)  + 1}{2} = 3$ & \num{0.25} \\
		& The given equation has two solutions $x=2$ and $x = 3$. & \num{0.25} \\
\end{longtblr} 
\end{document}
```
![Screenshot 2023-02-09 at 16.31.23.png](/image?hash=595a292758b6bad688b617cc9d74749b56ace99d78c79da5d5d0e328c13d2cc4)

And just for completeness, here the approach with a fixed with column:

```
\documentclass[12pt]{article}
\usepackage{tabularray}
\UseTblrLibrary{diagbox}
\UseTblrLibrary{varwidth}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{counter}
\usepackage{enumitem}
\usepackage{ninecolors}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
\UseTblrLibrary{siunitx} 
\usepackage[paperwidth=19cm, paperheight=26.5cm, left=1.7cm,right=1.7cm,top=1.8cm,bottom=1.7cm]{geometry}
\DefTblrTemplate{contfoot-text}{normal}{Continued on next page}
\SetTblrTemplate{contfoot-text}{normal}
\DefTblrTemplate{conthead-text}{normal}{(Continued)}
\SetTblrTemplate{conthead-text}{normal}
\SetTblrTemplate{conthead-text}{normal}
\newcounter{mycnta}
\newcommand{\mycnta}{\stepcounter{mycnta}\arabic{mycnta}}
\begin{document}
	\begin{longtblr}[
		caption={Some text}]{
			colspec = {Q[c,gray9]Q[11.4cm,l]X[c]},
			vlines,
			hlines,
			row{1}={yellow9,font=\bfseries},
			cell{2,7,11}{2-3} ={teal9},
			%cell{7}{2-3} ={teal9},
			%cell{11}{2-3} ={teal9},
			hline{1,2,Y,Z} = {solid},
			cell{1}{2-3}={halign=c},
			column{1}={font=\bfseries},
			cell{2-Z}{1}={cmd={\mycnta}},}
		Problem & Content & Point \\
		\SetCell[r=5]{m}	& Solve the equation 
		\[ (2 x+3)\cdot \sqrt{4 x+5}+(6 x+7) \cdot\sqrt{8 x+9}=2. \]
 &  \num{1.00}   \\
		& $ \Delta =(-5)^2 - 4 \cdot 1 \cdot 6 = 1$, & \num{0.25} \\
		& $ x = \dfrac{-(-5) -1}{2} = 2$. & \num{0.25} \\
		& $ x = \dfrac{-(-5)  + 1}{2} = 3$ & \num{0.25} \\
		& The given equation has two solutions $x=2$ and $x = 3$. & \num{0.25} \\
\end{longtblr} 
\end{document}
```

![Screenshot 2023-02-10 at 15.48.46.png](/image?hash=9c7747489826640ab7ecdfca5ed3e6db0203d116d393afbda111d48f431e940a)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.