Text Formatting ⇒ Get value of ref argument
Get value of ref argument
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?
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
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