sans-serif math wide П or Π in OTF font for xelatex?
up vote
0
down vote
favorite
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.
setmathfont[Extension=.otf,
BoldFont = cmunsx,
ItalicFont = cmunsi,
BoldItalicFont = cmunso,
range={"041F}
]{cmunss}
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 :-(.
%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.
newcommandmySymbolOutputNormal{{%
setbox0hbox{ensuremath{mySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScript{{%
setbox0hbox{ensuremath{scriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScriptScript{{%
setbox0hbox{ensuremath{scriptscriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{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 space for the "o". How do I get all that to work?

math-mode xetex symbols unicode-math sans-serif
add a comment |
up vote
0
down vote
favorite
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.
setmathfont[Extension=.otf,
BoldFont = cmunsx,
ItalicFont = cmunsi,
BoldItalicFont = cmunso,
range={"041F}
]{cmunss}
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 :-(.
%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.
newcommandmySymbolOutputNormal{{%
setbox0hbox{ensuremath{mySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScript{{%
setbox0hbox{ensuremath{scriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScriptScript{{%
setbox0hbox{ensuremath{scriptscriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{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 space for the "o". How do I get all that to work?

math-mode xetex symbols unicode-math sans-serif
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
setmathfont[Extension=.otf,
BoldFont = cmunsx,
ItalicFont = cmunsi,
BoldItalicFont = cmunso,
range={"041F}
]{cmunss}
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 :-(.
%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.
newcommandmySymbolOutputNormal{{%
setbox0hbox{ensuremath{mySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScript{{%
setbox0hbox{ensuremath{scriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScriptScript{{%
setbox0hbox{ensuremath{scriptscriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{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 space for the "o". How do I get all that to work?

math-mode xetex symbols unicode-math sans-serif
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.
setmathfont[Extension=.otf,
BoldFont = cmunsx,
ItalicFont = cmunsi,
BoldItalicFont = cmunso,
range={"041F}
]{cmunss}
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 :-(.
%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.
newcommandmySymbolOutputNormal{{%
setbox0hbox{ensuremath{mySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScript{{%
setbox0hbox{ensuremath{scriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{o}}hss}}box0%
}}
newcommandmySymbolOutputScriptScript{{%
setbox0hbox{ensuremath{scriptscriptstylemySymbol}}%
rlap{hbox to wd0{hssensuremath{scriptscriptstylemathrm{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 space for the "o". How do I get all that to work?

math-mode xetex symbols unicode-math sans-serif
math-mode xetex symbols unicode-math sans-serif
edited 22 mins ago
asked 29 mins ago
user49915
42116
42116
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463445%2fsans-serif-math-wide-%25d0%259f-or-%25ce%25a0-in-otf-font-for-xelatex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown