4

Is it possible to set the font size for the \tag{} content from the align environment globally?

MWE:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
1+1=2 \tag{test}  
\end{align*}
\end{document}

I want the tag text to be \small without having to specify it every time.

2 Answers 2

5

You can patch \maketag@@@ with the help of \patchcmd from etoolbox.

\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\maketag@@@}{\normalfont}{\normalfont\tiny}{}{}   %% Change \tiny to \small
\makeatother
\begin{document}
\begin{align*}
1+1=2 \tag{test}
\end{align*}
\end{document}

enter image description here

1
  • this works, ty. I assume nobody does change the size of tags since you need to patch the original command...
    – BeeGirl
    Dec 7, 2013 at 23:27
1

If you are inserting \tag manually, why not to define, say, \Tag in the following way:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\newcommand{\Tag}[1]{\tag{\small #1\normalsize}}

\begin{align*}
1+1=2 \tag{test}  
\end{align*}

\begin{align*}
1+1=2 \Tag{test}  
\end{align*}
\end{document}

enter image description here

6
  • I tried this too but if you look closer or set, say, scriptsize you'll notice that the first parentheses is still at normal size
    – BeeGirl
    Dec 7, 2013 at 23:20
  • @BeeGirl You are right. I forgot changing to normal size. And your parentheses should be at normal size or also small? Dec 7, 2013 at 23:31
  • to make this work you need something like \newcommand{\Tag}[1]{\tag*{\footnotesize(#1)}}. But seemed like a hack to me (well, the other answer is too :P)
    – BeeGirl
    Dec 7, 2013 at 23:32
  • @BeeGirl I thought that the main problem is reamaining normalsize parentheses and small entry. As I induce from the accepted answer, they should also be small. Dec 7, 2013 at 23:36
  • Yes, that was it. Anyway with your code the second p. does scale to \small. It's only the first that does not. It should have something to do with the definition of \tag, dunno.
    – BeeGirl
    Dec 7, 2013 at 23:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .