0

I would like to have commands \smalloplus and \smallotimes that prints same symbols as oplus and otimes but in a smaller size.

It would look like (but in a more beautiful way and the symbols should be "centered" with respect to the letter) the following

enter image description here

Is there a classical or convenient way to do it?

1

2 Answers 2

4

This will do the job, provided you only want these symbols in text and display style, not in scriptstyle og scriptscriptstyle. If you do, then we'd have to work a bit harder:

\documentclass[]{article}
\newcommand\smallmath[2]{#1{\raisebox{\dimexpr \fontdimen 22 \textfont 2
      - \fontdimen 22 \scriptscriptfont 2 \relax}{$\scriptscriptstyle #2$}}}
\newcommand\smalloplus{\smallmath\mathbin\oplus}
\newcommand\smallotimes{\smallmath\mathbin\otimes}
\begin{document}
\noindent
$ a \oplus b \otimes c$\\
$ a \smalloplus b \smallotimes c$
\end{document}

Comparison of normal and small operators

Explanation: The \fontdimen 22 parameters denote the axis height of the math font. As we set the symbol in scriptscriptstyle inside a textstyle setting, we need to raise the symbol by the difference of the two axis heights. Note that \dimexpr requires eTeX; if your LaTeX is not using eTeX, your TeX installation is very old and should be upgraded.

Of course, you may opt for replacing all the \scriptscript… by \script…, if this is too extreme.

4
  • What about a screenshot comparing both?
    – Sigur
    Commented Sep 15, 2018 at 14:08
  • @Sigur As you wish. Commented Sep 15, 2018 at 14:15
  • Ow, very nice! And different.
    – Sigur
    Commented Sep 15, 2018 at 14:17
  • Thanks 👍 I have replaced by scriptsize.
    – Colas
    Commented Sep 15, 2018 at 15:06
4

First version:

\documentclass{article}

\makeatletter
\newcommand{\smalloplus}{\mathbin{\mathpalette\make@small\oplus}}
\newcommand{\smallotimes}{\mathbin{\mathpalette\make@small\otimes}}

\newcommand{\make@small}[2]{%
  \vcenter{\hbox{%
    $\m@th\ifx#1\displaystyle\scriptstyle\else\ifx#1\textstyle\scriptstyle
     \else\scriptscriptstyle\fi\fi#2$%
  }}%
}
\makeatother

\begin{document}

$a\smalloplus b\smallotimes c_{x\smalloplus y\smallotimes z}$

\end{document}

enter image description here

Second version (adjust the scaling factor to suit):

\documentclass{article}
\usepackage{graphicx}

\makeatletter
\newcommand{\smalloplus}{\mathbin{\mathpalette\make@small\oplus}}
\newcommand{\smallotimes}{\mathbin{\mathpalette\make@small\otimes}}

\newcommand{\make@small}[2]{%
  \vcenter{\hbox{%
    \scalebox{0.6}{$\m@th#1#2$}%
  }}%
}
\makeatother

\begin{document}

$a\smalloplus b\smallotimes c_{x\smalloplus y\smallotimes z}$

\end{document}

enter image description here

2
  • Please let me know how to get a smaller \bigstar symbol throughout a document. I was trying to use these codes, but it is not working. Commented Sep 27, 2023 at 8:30
  • @ShivaniSengupta If you mean \bigstar from amssymb, then it's fundamentally different from \bigoplus and \bigotimes. Please, open a new question explaining your problem and aim.
    – egreg
    Commented Sep 27, 2023 at 8:43

You must log in to answer this question.

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