我尝试了一下longtblr
,发现它出现了错误。longtable
在相同的输入下工作正常。
第一次尝试longtblr
。是否需要执行某些操作才能longtblr
处理相同的输入?
\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}
现在
>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}
?
比较一下,同一个文件,只是更改 longtblr
为longtable
,现在可以编译了
\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}
现在
>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.
>
没问题。
Linux 上的 TL 2022。
答案1
与任何抓取环境主体的环境一样,您不能\verb
直接使用。tblr
有一个verb
启用的键\verb
,但这显然没有在长版本中设置,所以我\detokenize
在这里使用
\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}