8

I am using LuaLaTeX and the unicode-math package with Libertinus Math as main font (it's a good match for Minion Pro).

This is probably intended to be so, but I feel some symbols, e.g., the tensor product, are exceedingly small, and maybe not exactly centered.

Is there a way to get them bigger? And maybe a little higher up?

MWE:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
\begin{document}
$A\otimes B$ and $A\oplus B$.
\end{document}

enter image description here

3

3 Answers 3

11

You load those two symbols with a different Scale.

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Libertinus Math}
\begin{document}

$A\otimes B$ and $A\oplus B$.

\setmathfont[range={`⊕,`⊗},Scale=1.2]{Libertinus Math}
%         or range={\oplus,\otimes}
%         or range={"2295,"2297}
$A\otimes B$ and $A\oplus B$.

\end{document}

enter image description here

6
  • +1. A nice side-effect of this scaling (with a factor 1.2) is that the centering of the symbols relative to the math axis is improved as well. As the OP noted (and as can be confirmed), Libertinus Math places the \otimes and \oplus symbols slightly too low relative to the math axis. Scaling these two symbols just happens to take care of the vertical-centering issue as well. :-)
    – Mico
    Mar 30, 2018 at 21:33
  • Also I upvote Henri and egreg.
    – Sebastiano
    Mar 30, 2018 at 21:34
  • 2
    Great! May I ask why do you insert a backtick prior to the symbols? E.g., `⊕ instead of simply ⊕?
    – vap
    Mar 30, 2018 at 21:57
  • 2
    @vap To get the number of the character slot (try putting $\number`⊕$ in your document). That is equivalent to putting in the numbers explicitly ("2295). Maybe it works without, I haven't tried. Mar 30, 2018 at 23:59
  • 1
    @Timm You can scale all binary operator (such as +, -, \otimes, etc.) using \setmathfont[range={\mathbin},Scale=1.2]{Libertinus Math} but that is most likely not what you should do. Apr 22, 2018 at 22:38
8

I agree that those symbols are ugly.

You can borrow glyphs from other math fonts. Here's XITS Math (but scaled down a bit):

\documentclass{article}

\usepackage{unicode-math}
\setmainfont{Libertinus Serif}
\setmathfont{Libertinus Math}
\setmathfont{XITS Math}[
  range={\oplus,\otimes},
  Scale=0.8,
]
\setmathfont{Libertinus Math}[range=] % restore the proper font dimens

\begin{document}

$A\otimes B$ and $A\oplus B$.

\end{document}

It is customary to have the symbols a bit below the baseline (compare with the standard Computer Modern fonts) so their geometric center is on the formula axis.

enter image description here

6
  • But my new symbol that I created with ntikz is ugly?:-( Papeeria does not recognize \usepackage{unicode-math} \setmathfont{Libertinus Math}. Hence I have used only CM.
    – Sebastiano
    Mar 30, 2018 at 21:36
  • 1
    @Sebastiano The problem is that a symbol created with TikZ will not survive “copy-paste” from the PDF, so this is a “last resort” method.
    – egreg
    Mar 30, 2018 at 21:39
  • I'm not very good at understanding English. I did not understand what it means: "copy-paste" from the PDF. I tried and thought that my solution could be an alternative.
    – Sebastiano
    Mar 30, 2018 at 21:43
  • With this approach, the horizontal bars in + and \oplus aren't at the same vertical height, viz., the math axis. (Of course, that's a problem with the Libertinus Math font as well; the glyph substitution doesn't change this.) FWIW, the horizontal bars of \oplus is placed on the math axis if Computer/Latin Mondern Math is in use. Is this just a CM/LM relic, or is it something worth preserving in other math fonts?
    – Mico
    Mar 30, 2018 at 21:46
  • @Mico The + in Libertinus Math is, like the default \oplus, not centered on the formula axis.
    – egreg
    Mar 30, 2018 at 22:06
2

You can try also creating the symbol with tikz and to add your preamble.

enter image description here

\documentclass{article}
\usepackage{tikz}
\newcommand{\Bigotimes}[1]{
\begin{tikzpicture}[#1]
\draw [line width=0.1pt] (0.,0.) circle (1.cm);
\draw [line width=0.1pt] (0.,1.)-- (0.,-1.);
\draw [line width=0.1pt] (-1.,0.)-- (1.,0.);
\end{tikzpicture}
}
\begin{document}
We have $A\Bigotimes{scale=0.2}B$ where you can decrease or increase the symbol with the option scale=0.2.
\end{document}
2
  • 4
    Why would you draw them, when the font provides them? This doesn't seem very efficient. Mar 30, 2018 at 21:35
  • In case you did not like the default symbols. I thought about this. And they are not very good as you. :-(
    – Sebastiano
    Mar 30, 2018 at 21:38

You must log in to answer this question.

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