我根据这个从 STIX 导入了一个符号回答\varnothing
(参见 MWE)将其与我的普通字体 lmodern 一起使用。效果很好,但和字符的基线存在差异\varnothingstix
。
是否有可能获得相同的基线对齐?
平均能量损失
\documentclass{article}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{stix}{m}{n}
\newcommand*\varnothingstix{%
\text{%
\fontencoding{LS1}%
\fontfamily{stix}%
\fontseries{\textmathversion}%
\fontshape{n}%
\selectfont\symbol{"C9}}}
\makeatletter
% the current math version is saved in \math@version
\newcommand*\textmathversion{\csname textmv@\math@version\endcsname}
\newcommand*\textmv@normal{m}
\newcommand*\textmv@bold{b}
\makeatother
\begin{document}
$\varnothingstix$ Some text
$\varnothing$ Some text
\end{document}
答案1
您可以举起符号:
\documentclass{article}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amssymb}
\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{stix}{m}{n}
\newcommand*\varnothingstix{%
\text{%
\usefont{LS1}{stix}{\textmathversion}{n}\raisebox{.15ex}{\symbol{"C9}}%
}
}
\makeatletter
% the current math version is saved in \math@version
\newcommand*\textmathversion{\csname textmv@\math@version\endcsname}
\newcommand*\textmv@normal{m}
\newcommand*\textmv@bold{b}
\makeatother
\begin{document}
$\varnothingstix$ Some text\llap{\vrule height0pt depth.1pt width 3cm}
$\varnothing$ Some text\llap{\vrule height0pt depth.1pt width 3cm}
\end{document}