We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Expected behavior: \begin{tabularx}{\linewidth}{cc} X & X \\ \end{tabularx}
Actual behavior: \begin{tabularx}{inewidth}{cc} X & X \\ \end{tabularx}
Steps to reproduce
snippet tabu "Regular tabular" b \\begin{tabular$1}${1/(\*)$|(x)$/(?1:{\\\linewidth})(?2:{\\\linewidth})/}{${2:cc}} $0X & X \\\\ \\end{tabular$1} endsnippet
tabu
<TAB>
\begin{tabular}{cc}
r
*
x
{inewidth}
\linewidth
As a comment, it doesn't matter how many times I escape \ in front of linewidth in the snippet
\
linewidth
${1/(\*)$|(x)$/(?1:{\\linewidth})(?2:{\\linewidth})/}
or
${1/(\*)$|(x)$/(?1:{\\\linewidth})(?2:{\\\linewidth})/}
${1/(\*)$|(x)$/(?1:{\\\\linewidth})(?2:{\\\\linewidth})/}
the effect is the same.
:py import sys; print(sys.version)
:py3 import sys; print(sys.version)
The text was updated successfully, but these errors were encountered:
I solved it using a Python interpolation:
snippet tabu "Regular tabular" b \\begin{tabular$1}`!p if t[1] == "x" or t[1] == "*": snip.rv=r"{\linewidth}"`{${2:cc}} $0X & X \\\\ \\end{tabular$1} endsnippet
However, I am going to leave it open because I don't know if what happens with the transformation above is a bug or intended.
Sorry, something went wrong.
No branches or pull requests
Expected behavior:
\begin{tabularx}{\linewidth}{cc}
X & X \\
\end{tabularx}
Actual behavior:
\begin{tabularx}{inewidth}{cc}
X & X \\
\end{tabularx}
Steps to reproduce
tabu
in a LaTeX file and press<TAB>
\begin{tabular}{cc}
and holds on position afterr
*
orx
inserts{inewidth}
in the middle but it should insert\linewidth
.As a comment, it doesn't matter how many times I escape
\
in front oflinewidth
in the snippetor
or
the effect is the same.
:py import sys; print(sys.version)
: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0], and:py3 import sys; print(sys.version)
: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]The text was updated successfully, but these errors were encountered: