Gents,
I would like to know how to set parameters back to thier original values (not nesecerally default, but defined ealier in the document).
E.g. I changed the distance \doublerulesep via \setlength, but other parts of the document should maintain orininal value of this parameter (defined somewhere ealier and i do not know these original values).
So I need to set the parameter back to its originally defined value.
So I am looking to do somethinhg like that:
1. oldValue = getValue(\doublerulesep)
2. % draw table
3. \setlength\doublerulesep{oldValue}
Please advise !
Thanks a lot !
General ⇒ Preserving original values fpr parameters
Preserving original values fpr parameters
LaTeX length assignments are local, so introduce a group to have them restored automatically:Note that nearly every environment introduces such a group, so if you put the \setlength command and your tabular environment in another environment (perhaps a table environment), you don't need the extra \begingroup ... \endgroup.
Code: Select all
Code, edit and compile here:
\documentclass{article}\begin{document}\begingroup\setlength\doublerulesep{6pt}\begin{tabular}{l||l}a & a\end{tabular}\endgroup\begin{tabular}{l||l}a & a\end{tabular}\end{document}