3

I would like to align horizontally the two resized circles in the superscript in the following example:

\documentclass{article}
\usepackage{relsize}

\begin{document}
$A^{  \mathlarger{\circ}\mathsmaller{\circ} } $  
\end{document}

A related question has been asked here, but it does not seem to give the solution for this specific issue.

3

Like this?

\documentclass{article}
\usepackage{relsize}
\usepackage{amsmath}

\begin{document}

$A^{\substack{ \mathlarger{\circ}\\[-0.75ex]\mathsmaller{\circ}}} $

\end{document} 

enter image description here

Edit:

For an alignment of the symbols on the same axis, you can use this code:

$A^{\raisebox{\height}{\raisebox{-0.5\height}{$ \mathlarger{\circ} $}\raisebox{-0.5\height}{$ \mathsmaller{\circ} $}}} $

enter image description here

Edit: On the suggestion of @Campa, the \vcenter TeX primitive results is a simpler code for the horizontal alignment:

$ A^{\vcenter{\hbox{$\mathlarger{\circ}$}}\vcenter{\hbox{$\mathsmaller{\circ}$}}} $
| improve this answer | |
  • No, sorry, I meant that I would like to align them horizontally. I revised my question for clarity. – James Apr 11 '18 at 6:56
  • @James: I've added something that corresponds to what you want, if I understand it well. – Bernard Apr 11 '18 at 9:19
  • The TeX primitive \vcenter comes in handy to centre something on the math axis. – campa Apr 11 '18 at 9:41
  • @campa: Thanks for the suggestion! I've completed my answer (with due credits, of course). – Bernard Apr 11 '18 at 12:34
2

I'd define a special \xcirc command:

\documentclass{article}
\usepackage{relsize}

\makeatletter
\newcommand{\xcirc}[1][]{%
  % ensure it's used in math and consider it as an Ord atom
  % \mathpalette will remember the current math style
  \mathord{\mathpalette{\james@xcirc}{#1}}%
}
\newcommand{\james@xcirc}[2]{%
  % center vertically with respect to the math axis
  \vcenter{\hbox{$\m@th#1\@nameuse{james@#2@size}{\circ}$}}%
}
\let\james@@size\@firstofone
\let\james@l@size\mathlarger
\let\james@s@size\mathsmaller
\makeatother

\begin{document}

$A^{\xcirc[l]\xcirc[s]}$

$\scriptstyle A^{\xcirc[l]\xcirc[s]}$

{\Large $A^{\xcirc[l]\xcirc[s]}$\par}

\end{document}

enter image description here

In order to ease input, the optional argument to \xcirc is just a letter (l for “larger”, s for “smaller”) and I define \james@<arg>@size for translating it into the correct call of \mathlarger or \mathsmaller (no optional argument will use the standard size, like {\circ}).

You might want to allow \xcirc[ll] by adding

\newcommand{\james@ll@size}[1]{%
  \mathlarger{\mathlarger{#1}}%
}

so you apply \mathlarger twice. Similarly for \xcirc[ss].

| improve this answer | |
  • @Bernard, I could not get the ll size to work, see this minimal working example ufile.io/ilk24 . May you please help me with this? Thank you. – James Apr 11 '18 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.