TeX - LaTeX Asked on November 9, 2021
I have the following:
documentclass{article}
usepackage{amsmath}
usepackage{witharrows}
begin{document}
defvar{x}
[
begin{WithArrows}
varvar&=defvar{y}varvar\
var
end{WithArrows}
]
end{document}
I wanted to change the var
value to y but it only works for the var
immediatly after the def
and on that line.
The result of the compilation is:
And I’m wondering why the var
on the second line is not affected by the instruction above.
Change def
to gdef
, to make the definition global. Inside the environment, each subline is its own group, so the def
does not carry over outside of it.
documentclass{article}
usepackage{amsmath}
usepackage{witharrows}
begin{document}
defvar{x}
[
begin{WithArrows}
varvar&=gdefvar{y}varvar\
var
end{WithArrows}
]
end{document}
Answered by Steven B. Segletes on November 9, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP