Latex Equation Numbering: Change eqref to "eqn.

  • LaTeX
  • Thread starter Apteronotus
  • Start date
  • Tags
    Latex
In summary, the conversation discusses different ways to reference equations in a latex file. The first method mentioned is using "eqref{}" which produces "(1)". The person then asks for a way to change this to "(eqn. 1)". One solution suggested is to use the /ref keyword and add parens around it. Another solution is to create a macro using a new command.
  • #1
Apteronotus
202
0
Hi, when I want to reference an equation in my latex file I use "eqref{}" with produces "(1)".
I would like to change this so that it appears as "(eqn. 1)"

Is there any way to get the desired affect?

Thanks in advance,
 
Physics news on Phys.org
  • #2
The only way i know how to do that is to go back to using the /ref keyword and put parens around it, yourself. For example, instead of \eqref{abc}, use (eqn. \ref{abc}).
 
  • #3
Yes, that works.
Thank you.
 
  • #4
Alternatively, you can use macros. Add something like

Code:
\newcommand\eqnrf[1]{(eqn.~\ref{#1})}

into your preamble. Then,

Code:
\eqnrf{abc}

will produce something like (eqn. 1)

(Of course, it's a little sloppy to do things like that, since the equation is called (1): you should say something like "eqn. (1)")
 

1. How do I change the equation numbering in Latex?

To change the equation numbering in Latex, you can use the \numberwithin{equation}{section} command. This will number your equations according to the section they are in. You can also use the \renewcommand{\theequation}{eqn. \arabic{equation}} command to change the label of the equation number.

2. How do I reference an equation in Latex?

To reference an equation in Latex, you can use the \eqref{label} command. This will automatically insert the number of the referenced equation, including any changes made to the equation numbering.

3. Can I change the label of the equation number in Latex?

Yes, you can change the label of the equation number in Latex by using the \renewcommand{\theequation}{eqn. \arabic{equation}} command. This will replace the default label "Equation" with "eqn." followed by the equation number.

4. How do I reset the equation numbering in Latex?

To reset the equation numbering in Latex, you can use the \setcounter{equation}{0} command. This will reset the equation counter to 0 and start numbering the equations from the beginning again.

5. Can I change the format of the equation number in Latex?

Yes, you can change the format of the equation number in Latex by using the \renewcommand{\theequation}{format} command. You can use any desired format, such as Roman numerals or letters, in place of "format" to change the appearance of the equation number.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
789
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
973
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
905
  • MATLAB, Maple, Mathematica, LaTeX
Replies
20
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
Back
Top