# Alternative \otimes to use with Euler Math

I use the Euler Math font (classicthesis). But the \otimes command produces something that looks like CM. Is there another package I can load to get something that fits better?

• \otimes is a perfectly symmetric circle around a perfectly symmetric \times. What else should it be? ... – yo' Jul 24 '15 at 17:14
• @yo' it is too thin compared to the rest. Too, fragile compared to the rest of the eulervm font. – NOhs Jul 24 '15 at 17:26

You can use picture mode for fixing it:

\documentclass{article}
\usepackage{eulervm,pict2e}

\DeclareRobustCommand{\eulerosym}[1]{%
\mathbin{\mathpalette\eulerosymaux{#1}}%
}

\makeatletter
\newcommand{\eulerosymaux}[2]{%
\vcenter{\hbox{%
\sbox\z@{$\m@th#1#2$}%
\dimen@=\ht\z@
\unitlength=.5\dimen@
\kern.085\dimen@
\begin{picture}(2,2)
\linethickness{.4pt}
\put(1,1){\makebox(0,0){$\m@th#1#2$}}
\put(1,1){\circle{2}}
\end{picture}%
\kern.085\dimen@
}}%
}
\makeatother

\begin{document}
$\frac{1}{1}\otimes\oplus\times+$ \fboxsep=0pt \fbox{$\otimes$} \fbox{$\eulerosym{\times}$}

$a\otimes b$ $a\oplus b$

$a\eulerosym{\times}b$ $a\eulerosym{+}b$

$\eulerosym{\times}_{\eulerosym{\times}_{\eulerosym{\times}}}$
$\eulerosym{+}_{\eulerosym{+}_{\eulerosym{+}}}$

$a\times b \eulerosym{\times} c$
$a+b\eulerosym{+} c$
\end{document}


It's then a matter of redefining \otimes and \oplus to use the new macro. Note that the circled plus in second level subscripts appears wrong; I don't think it's solvable, because the plus at that size is not bounded by a square.

• I will go with this answer as the symbol looks more like what everybody knows (no gap between cross and circle) – NOhs Jul 24 '15 at 22:56

Do you like the \times - symbol from that font? (based upon: How do I put a circle around an operator? )

\documentclass{article}

\usepackage{eulervm}

\makeatletter
\newcommand\incircbin
{%
\mathpalette\@incircbin
}
\newcommand\@incircbin[2]
{%
\mathbin%
{%
\ooalign{\hidewidth$#1#2$\hidewidth\crcr$#1\bigcirc$}%
}%
}
\newcommand{\fauxtimes}{\incircbin{\times}}
\makeatother
\begin{document}

$$a\otimes b$$
$$a\fauxtimes b$$

\end{document}


edit: re scaling (needs graphicx package)

\newcommand{\fauxtimes}{\raisebox{0.1345ex}{\scalebox{0.7421}{$\incircbin{\times}$}}}


• Can one reduce the size of the new symbol? It looks a bit massive. – NOhs Jul 24 '15 at 15:09
• I added an update. Use any number you see fit in the scalebox and then raise roughly half of the difference to one – Bort Jul 24 '15 at 15:19
• Burying \mathbin inside a box serves no purpose: you need to lift it out of \raisebox. – GuM Jul 24 '15 at 18:22

The classicthesis package with the euler option sets the text font to Palatino and the math font to AMS Euler. AMS Euler does not come with symbols for \otimes or \oplus (page 32 of the AMS Fonts Guide), so eulervm substitutes the ones from cmex10 instead.

There are several math fonts designed to match Palatino and that do contain these symbols. These include the series mathpple, mathpazo, pxfonts and newpx, although today you would probably use a newer package based on Young Ryu’s designs. I’ll give two simple examples.

## In a Modern Toolchain

Palatino, AMS Euler and newpx all have free clones in OpenType format, usable through unicode-math. I don’t define a matching sans-serif or monospace font here, but Optima (or its clone URW Classico) and Inconsolata are ones that match well.

\documentclass[varwidth, preview]{standalone}

\usepackage[math-style=upright]{unicode-math}

\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TeX Gyre Pagella}[
Scale = 1.0,
Ligatures = {Common, Discretionary, TeX},
Numbers = OldStyle ]
\setmathfont{Asana Math}
\setmathfont[range = { up/{Latin,latin,Greek,greek},
bfup/{Latin,latin,Greek,greek},
cal, bfcal, frak, bffrak },
script-features = {},
sscript-features = {}
]{Neo Euler}

\begin{document}
$$a \otimes_{\otimes_\otimes} b, \alpha \oplus_{\oplus_\oplus} \gamma$$
\end{document}


That sample sets the text font to a Palatino clone, uses Neo Euler only for letters in math mode, and Asana Math (based on pxfonts) for everything else, including digits and operators.

If you want more or less Euler in your document, edit the range = statement in \setmathfont. For example, if you add \otimes and \oplus to the range=, here is what you get:

\setmathfont[range = { up/{Latin,latin,Greek,greek},
bfup/{Latin,latin,Greek,greek},
cal, bfcal, frak, bffrak,
\otimes, \oplus },
script-features = {},
sscript-features = {}
]{Neo Euler}


Since Neo Euler is an incomplete font that is no longer being maintained, and some of its symbols are very idiosyncratic, it is a good idea to load Neo Euler with the range= option. Load a fallback math font before it, as I did with Asana Math here. Libertinus Math, also by Khaled Hosny, is another good choice. That way, if your document uses any symbols that Neo Euler is missing, your fallback font will provide them.

## In PDFLaTeX

The eulerpx package combines math symbols and digits from newpxmath with math letters from euler. It is up-to-date and still being maintained as of 2018, and is probably the simplest way to get the results you want.

\documentclass[varwidth, preview]{standalone}

\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage{newtxtext}
\usepackage[utf8]{eulerpx}
% Other font packages that might be useful to load: classico (for sans-serif),
% inconsolata (typewriter), mathalfa and isomath (additional math alphabets).

\begin{document}
$$a \otimes_{\otimes_\otimes} b, \alpha \oplus_{\oplus_\oplus} \gamma$$
\end{document}


## Kitbashing in Legacy NFSS

If you’re trying to use legacy packages in PDFLaTeX, or (so far as I know) the classicthesis document class itself, you might be forced to fall back on redefining individual macros.

You can, if necessary, try to load individual symbols from either pxfonts or newpxmath. This example loads eulervm over newpxmath, then redefines \oplus and \otimes to use the font from newpxmath. (It doesn’t make the most efficient use of math alphabets.)

\documentclass[varwidth, preview]{standalone}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage{newtxtext, newtxmath}

% Other font packages that might be useful to load: classico (for sans-serif),
% inconsolata (typewriter), mathalfa and isomath (additional math alphabets).

\usepackage{eulervm}

%% From newpxmath.sty:
% \DeclareFontEncoding{LMS}{}{}
% \DeclareFontSubstitution{LMS}{npxsy}{m}{n}
\DeclareSymbolFont{newpxsym}{LMS}{npxsy}{m}{n}
\SetSymbolFont{newpxsym}{bold}{LMS}{npxsy}{b}{n}

\DeclareMathSymbol{\oplus}{\mathbin}{newpxsym}{8}
\let\circledplus\oplus
\DeclareMathSymbol{\otimes}{\mathbin}{newpxsym}{10}
\let\circledtimes\otimes

\begin{document}
$$a \otimes_{\otimes_\otimes} b, \alpha \oplus_{\oplus_\oplus} \gamma$$
\end{document}