Document ClassesProblems with mathtools' formatting of equation numbers

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Problems with mathtools' formatting of equation numbers

Post by Bozack »

Hi, I use the mathtools package to format my equation numbers to something a little smaller, but when I reference to the equation with \eqref, I get the same formatting as the one at the equation itself.

What can I do to make the formatting of the reference the same formatting as the surrounding text, like it is when I use the normal \ref instead of \eqref?

Code: Select all

% --- Inside preamble --- %
\usepackage{mathtools}
	\newtagform{myformat}[]{\footnotesize(}{)}
	\usetagform{myformat}
\numberwithin{equation}{section}
% --- Inside document --- %
Here's an equation:
\begin{equation}
	-\frac{\hbar^2}{2m}\nabla^2 u+V(\vec{r}) u = i \hbar \frac{\partial u}{\partial  t} ,
	\label{eq:sch}
\end{equation}
and now I'm referencing to it: \verb+\eqref+ gives \eqref{eq:sch} and \verb+\ref+ gives \ref{eq:sch}
I've attached both the tex-source and a PDF I've compiled at my own computer via MiKTeX.
Attachments
equationformat.pdf
The compiled version
(24.56 KiB) Downloaded 378 times
equationformat.tex
The tex-source-code
(718 Bytes) Downloaded 404 times
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Problems with mathtools' formatting of equation numbers

Post by Stefan Kottwitz »

Hi Bozack,

you could redefine \eqref after setting up mathtools:

Code: Select all

\renewcommand\eqref[1]{(\ref{#1})}
Stefan
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Re: Problems with mathtools' formatting of equation numbers

Post by Bozack »

Oh, duh! I din't thougth about that :D Thanks!
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Post Reply