General ⇒ How do I save values temporarily?
-
- Posts: 72
- Joined: Sun Nov 16, 2008 1:26 pm
How do I save values temporarily?
How would I do that?
Thanks
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
How do I save values temporarily?
you can use the grouping mechanism to keep changes local. The following code illustrates this (the font change produced by \myfontb will apply only to its argument):
Code: Select all
\documentclass{book}
\newcommand\myfonta[1]{\fontsize{20}{24}\selectfont#1}
\newcommand\myfontb[1]{{\fontsize{20}{24}\selectfont#1}}
\begin{document}
text text \myfonta{text text} text text
\normalsize
text text \myfontb{text text} text text
\end{document}
-
- Posts: 72
- Joined: Sun Nov 16, 2008 1:26 pm