TeX - LaTeX Asked on September 26, 2021
I want to define a new function juse
which takes 3 parameters and prints the second one.
However, this doesn’t work:
documentclass{article}
newcommandjuse{#1#2#3}{#2}
begin{document}
$juse{ abc } {def} { ghi }$
end{document}
It should print $def$ but gives an error.
To define a command in LaTeX that takes three mandatory arguments you'd only have to add a [3]
to it. So a complete example would be:
documentclass{article}
newcommandjuse[3]{#2}
begin{document}
$juse{ abc } {def} { ghi }$
end{document}
It is a bit unclear however, what you want to achieve with the command in a math enviroment, or if I got you wrong with the $
's.
Correct answer by TobiBS on September 26, 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