Latex Equation Numbering: Change eqref to "eqn.

  • Context: LaTeX 
  • Thread starter Thread starter Apteronotus
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

The discussion focuses on customizing equation references in LaTeX to display as "(eqn. 1)" instead of the default "(1)" produced by the \eqref{} command. Users can achieve this by either manually surrounding the \ref{} command with parentheses or by defining a new macro. The suggested macro is \newcommand\eqnrf[1]{(eqn.~\ref{#1})}, which allows for cleaner referencing by using \eqnrf{abc} to produce the desired output.

PREREQUISITES
  • Familiarity with LaTeX document preparation system
  • Understanding of LaTeX commands and macros
  • Basic knowledge of referencing equations in LaTeX
  • Experience with LaTeX preamble configurations
NEXT STEPS
  • Explore LaTeX macro creation and usage
  • Research advanced LaTeX referencing techniques
  • Learn about customizing LaTeX document styles
  • Investigate the use of packages for enhanced LaTeX functionality
USEFUL FOR

LaTeX users, academic writers, and researchers looking to customize equation formatting and improve document presentation.

Apteronotus
Messages
201
Reaction score
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
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}).
 
Yes, that works.
Thank you.
 
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)")
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 12 ·
Replies
12
Views
4K