-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New environment with xltabular does not reach end statements #15
Comments
It works this way:
\documentclass{article}
\usepackage{xltabular}
\newenvironment{tx}
{\tabularx{\textwidth}{XXX}}
{\endtabularx}
\newenvironment{xlt}
{\xltabular{\textwidth}{XXX}}
{\endxltabular}
\begin{document}
\begin{tx}
tabularx & 2 & 3 \\
final row & final row & final row \\%
\end{tx}
\begin{xlt}
xltabular & 2 & 3 \\
final row & final row & final row \\%
\end{xlt}
\end{document}
Herbert
… Am 01.05.2021 um 16:42 schrieb Laurens R Krol ***@***.***>:
I have come across an issue that, as far as I could see, appears to be related to xltabular. When I begin an xltabular environment within a newly defined custom environment, this custom environment does not reach its end statements. Below is an MWE.
\documentclass{article
}
\usepackage{xltabular
}
\newenvironment{tx}[0]%
{
%
\tabularx{\textwidth}{XXX}%
}{
%
final row & final row & final row
\\%
\endtabularx%
\asdf%
}
\newenvironment{xlt}[0]%
{
%
\xltabular{\textwidth}{XXX}%
}{
%
final row & final row & final row
\\%
\endxltabular%
\asdf%
}
\begin{document
}
\begin{tx
}
tabularx & 2 & 3
\\
\end{tx
}
\begin{xlt
}
xltabular & 2 & 3
\\
\end{xlt
}
\end{document}
In the MWE, two custom environments are defined, tx and xlt. These environments either use tabularx or xltabular to open a tabular environment; they are otherwise identical. When ending the custom environments, they add one final row, close the tabular environment, and execute a nonexistent asdf command.
Compiling this (in my case, with pdfLaTeX in TeX Live 2020; output attached), no final row is added in the environment using xltabular. Also, an error is generated for the undefined control sequence at the end of the tx environment, but not for the same command at the end of the xlt environment. It simply appears to never reach this point.
Can I use xltabular within a custom environment, and have that custom environment execute the specified commands at its end?
xltabular_mwe.log
xltabular_mwe.pdf
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks for the reply, Herbert! In your example however, the issue is not solved. If the command |
I apologise for the bump, but any ideas how to solve this issue? |
Am 30.05.2021 um 14:14 schrieb Laurens R Krol ***@***.***>:
I apologise for the bump, but any ideas how to solve this issue?
The problem is the fact that the tabularx environment does all with
\endtabularx and nearly nothing at the beginning of the environment at
\tabularx. I suppose that there will be no solution for xltabular which is
More or less only a wrapper for tabularx and longtable .
Herbert
|
Thanks again for your response, Herbert -- although I didn't quite get what causes the issue. Are you saying xltabular already calls Either way, I guess I'll have to see if I can use longtable directly, then. |
I have come across an issue that, as far as I could see, appears to be related to xltabular. When I begin an xltabular environment within a newly defined custom environment, this custom environment does not reach its end statements. Below is an MWE.
In the MWE, two custom environments are defined,
tx
andxlt
. These environments either use tabularx or xltabular to open a tabular environment; they are otherwise identical. When ending the custom environments, they add one final row, close the tabular environment, and execute a nonexistentasdf
command.Compiling this (in my case, with pdfLaTeX in TeX Live 2020; output attached), no final row is added in the environment using xltabular. Also, an error is generated for the undefined control sequence at the end of the
tx
environment, but not for the same command at the end of thexlt
environment. It simply appears to never reach this point.Can I use xltabular within a custom environment, and have that custom environment execute the specified commands at its end?
xltabular_mwe.log
xltabular_mwe.pdf
The text was updated successfully, but these errors were encountered: