I have been given a book where the key of many references has been replaced with the real value.
For example instead of \ref{chonertwo} it writes \ref{1-2} (referencing to equation 1-2).
Of course this results to an error of missing reference.
Is there any way to trick latex to ignore the argument and to display only the value of?
Or I have to get used to the idea that I need to change every ref occurrence in the entire book?
Text Formatting ⇒ Get value of ref argument
NEW: TikZ book now 40% off at Amazon.com for a short time.
Get value of ref argument
You could simply redefine \ref so it will just printout its value, e.g.:yiorgosb wrote:Is there any way to trick latex to ignore the argument and to display only the value of?
Code: Select all
\renewcommand\ref[1]{#1}
Code: Select all
\renewcommand\ref[1]{\textit{#1}}
Get value of ref argument
Thanks.sommerfee wrote:You could simply redefine \ref so it will just printout its value, e.g.:yiorgosb wrote:Is there any way to trick latex to ignore the argument and to display only the value of?
orCode: Select all
\renewcommand\ref[1]{#1}
or whatever you want.Code: Select all
\renewcommand\ref[1]{\textit{#1}}
That will definitely make my life easier.
However, there are still some \ref{} which contain actual references.
So the question now is, if there's a way to identify if a character is numerical or number so to determine which \ref{} it is. Something like
if{isnum{x}}
renewcommand
else
act normal