0

I was trying longtblr and found it gives an error. longtable works ok on same input.

First time trying longtblr. Is there something one needs to do to make longtblr work on the same input?

\documentclass[12pt]{book}
\usepackage{breqn}
\usepackage{amsmath}
\DeclareMathOperator{\arctanh}{arctanh}
\usepackage{tabularray}

\begin{document}

\begin{longtblr}{|p{0.4in}|p{2in}|p{4in}|}\hline
\# & ODE & solution \\\hline
92&
A
&
{\small 
\begin{dmath*}
-\ln \left(\frac{y \left(x \right)}{x}\right)+\arctanh \left(\frac{1}{\sqrt{\frac{y \left(x \right)^{2}}{x^{2}}+1}}\right)-\ln \left(x \right)-c_{1} = 0
\end{dmath*}
Verified OK. \verb|{0 < x}|
}\\ \hline
\end{longtblr}
\end{document}

And now

>lualatex foo.tex
.....
) (/usr/local/texlive/2022/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Missing } inserted.
<inserted text> 
}
l.46 \end
       {longtblr}
? 

Compare to, same file, just changed longtblr to longtable and now it compiles

\documentclass[12pt]{book}
\usepackage{breqn}
\usepackage{amsmath}
\DeclareMathOperator{\arctanh}{arctanh}
\usepackage{longtable}
\begin{document}    
\begin{longtable}{|p{0.4in}|p{2in}|p{4in}|}\hline
\# & ODE & solution \\\hline
92&
A
&
{\small 
\begin{dmath*}
-\ln \left(\frac{y \left(x \right)}{x}\right)+\arctanh \left(\frac{1}{\sqrt{\frac{y \left(x \right)^{2}}{x^{2}}+1}}\right)-\ln \left(x \right)-c_{1} = 0
\end{dmath*}
Verified OK. \verb|{0 < x}|
}\\ \hline
\end{longtable}
\end{document}

And now

>lualatex foo.tex
(./foo.aux) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/local/texlive/2022/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2022/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
Overfull \hbox (108.52753pt too wide) in alignment at lines 35--47
 [][][] 
[1{/usr/local/texlive/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./foo.aux))
....
Output written on foo.pdf (1 page, 64594 bytes).
Transcript written on foo.log.
>

No problem.

TL 2022 on Linux.

2
  • because longtable is the best package ever? Nov 24, 2022 at 12:23
  • tabularray does have manual, see section 3.1.5 for how to use \verb Nov 24, 2022 at 12:26

1 Answer 1

1

enter image description here

In common with any environment that grabs the environment body, you can't use \verb directly. tblr has a verb key that enables \verb but this is apparently not set up in the long version, so I used \detokenize here

\documentclass[12pt]{book}
\usepackage{breqn}
\usepackage{amsmath}
\DeclareMathOperator{\arctanh}{arctanh}
\usepackage{tabularray}

\begin{document}


\begin{longtblr}{|p{0.4in}|p{2in}|p{4in}|}\hline
\# & ODE & solution \\\hline
92&
A
&
{\small 
\begin{dmath*}
-\ln \left(\frac{y \left(x \right)}{x}\right)+\arctanh \left(\frac{1}{\sqrt{\frac{y \left(x \right)^{2}}{x^{2}}+1}}\right)-\ln \left(x \right)-c_{1} = 0
\end{dmath*}
Verified OK. \texttt{\detokenize{{0 < x}}}
}\\ \hline
\end{longtblr}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .