TeX - LaTeX Asked by Concept7 on July 31, 2020
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}
Correct answer by Steven B. Segletes on July 31, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP