I need a sans-serif math capital letter looking similar to the Greek Π or Cyrillic П but with a little bit more horizontal space between the vertical bars (assuming the same height) to fit the small Latin letter "o" inside on need. The letter П,Π, with and without the "o" inside, will be used as a function symbol, as in Π(x)=z. The symbol number 0e18c in STIXNonUnicode-Regular.otf is not wide enough, neither is the Cyrillic symbol number 041F in cmunss.otf. In general, I wish to compile with xelatex and would be happy if the solution would also work with lualatex (even if it involves an if-then-else-fi-checking of which engine is running).
Here are my attempts so far:
\documentclass{article}
\usepackage{unicode-math}
%%% General font set-up that fits the rest of the document typographically started.
\setmainfont[
Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic
]{texgyrepagella}
\setsansfont[
Extension = .otf,
UprightFont = *ss,
BoldFont = *sx,
ItalicFont = *si,
BoldItalicFont = *so
]{cmun}
\setmonofont[
Extension = .otf,
UprightFont = *-regular,
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic
]{texgyrecursor}
\setmathfont[Extension=.otf]{texgyrepagella-math}
\setmathfont[Extension=.otf,range={\setminus,\mathcal,\mathbfcal,\precneq,\olessthan,\llangle,\rrangle}]{Asana-Math}
\setmathfont[Extension=.otf,range={\smalltriangleleft},BoldFont = *bold]{xits-math}
%%% General font set-up that fits the rest of the document typographically finished.
%%% Now particular junk for the letter in question starts.
\newcommand{\mySymbol}{\textsf{\fontspec{STIXNonUnicode-Regular.otf}\symbol{"0E18C}}}%%% That's similar to what we want. But: in normal size the letter is a little bit too narrow to fit the "o" inside. Also, always puts a normalsize letter :-(.
%\setmathfont[Extension=.otf,
% BoldFont = cmunsx,
% ItalicFont = cmunsi,
% BoldItalicFont = cmunso,
% range={"041F}
%]{cmunss}%%% Won't work
%\newcommand{\mySymbol}{\textsf{\fontspec{cmunss.otf}\symbol{"041F}}}%%% That's also similar to what we want. But: in normal size the letter is a little bit too narrow to fit the "o" inside. Also, always puts a normalsize letter :-(.
%\newcommand{\mySymbol}{П}%%% Doesn't work at all.
%\newcommand{\mySymbol}{\mathsf{П}}%%% Cyrillic sans-serif П. Doesn't work either.
\newcommand\mySymbolOutputNormal{{%
\setbox0\hbox{\ensuremath{\mySymbol}}%
\rlap{\hbox to \wd0{\hss\ensuremath{\scriptstyle\mathrm{o}}\hss}}\box0%
}}
\newcommand\mySymbolOutputScript{{%
\setbox0\hbox{\ensuremath{\scriptstyle\mySymbol}}%
\rlap{\hbox to \wd0{\hss\ensuremath{\scriptscriptstyle\mathrm{o}}\hss}}\box0%
}}
\newcommand\mySymbolOutputScriptScript{{%
\setbox0\hbox{\ensuremath{\scriptscriptstyle\mySymbol}}%
\rlap{\hbox to \wd0{\hss\ensuremath{\scriptscriptstyle\mathrm{o}}\hss}}\box0%
}}
\newcommand{\mySymbolOutput}{\mathchoice{\mySymbolOutputNormal}{\mySymbolOutputNormal}{\mySymbolOutputScript}{\mySymbolOutputScriptScript}}
\begin{document}
\(\mySymbol(x)_{\mySymbol(y)_{\mySymbol(z)}}\ \mySymbolOutput(x)_{\mySymbolOutput(y)_{\mySymbolOutput(z)}}\)
\[\mySymbol(x)_{\mySymbol(y)_{\mySymbol(z)}}\ \mySymbolOutput(x)_{\mySymbolOutput(y)_{\mySymbolOutput(z)}}\]
\end{document}
In the output of xelatex below you see that this special symbol won't scale down in script and scriptscript. Further, there is not enough horizontal space for "o" in normalsize. How do I get all that to work?
\mbfsansPi
. You might also try\prod
. Maybe see if GFS Neohellenic Math works for you? – Davislor Dec 6 '18 at 3:33o
in a box and shrink it to fit your Pi symbol. – Davislor Dec 6 '18 at 3:34\scalebox
fromgraphicx
. You could also load a font with a Scale= parameter. – Davislor Dec 6 '18 at 3:43\newfontface\tgheros{TeX Gyre Heros}[Scale=MatchUppercase]
. Then, the symbol command would expand to something like\mbox{\tgheros Π}
. You might change the math character class to match its usage, such as an operator rather than an ordinary variable. – Davislor Dec 6 '18 at 3:56