![使用 Stix 使文本和数学公式具有相同的字体](https://linux22.com/image/384587/%E4%BD%BF%E7%94%A8%20Stix%20%E4%BD%BF%E6%96%87%E6%9C%AC%E5%92%8C%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F%E5%85%B7%E6%9C%89%E7%9B%B8%E5%90%8C%E7%9A%84%E5%AD%97%E4%BD%93.png)
答案1
我不确定出版商为什么想要质量较低的 PDF。据我所知,STIXMath-Italic 中的字形与 STIXGeneral-Italic 中的字形相同,但数学字体具有适合数学的包装。
无论如何,您可以执行以下操作,更改字母的数学代码以使用 STIXGeneral-Italic。
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{stix}
\makeatletter
\DeclareSymbolFont{itletters}{OT1}{stix}{m}{it}
\SetSymbolFont{itletters}{bold}{OT1}{stix}{b}{it}
\DeclareSymbolFontAlphabet{\mathit} {itletters}
\stix@MathSymbol{A} {\mathalpha}{itletters} {`A}
\stix@MathSymbol{B} {\mathalpha}{itletters} {`B}
\stix@MathSymbol{C} {\mathalpha}{itletters} {`C}
\stix@MathSymbol{D} {\mathalpha}{itletters} {`D}
\stix@MathSymbol{E} {\mathalpha}{itletters} {`E}
\stix@MathSymbol{F} {\mathalpha}{itletters} {`F}
\stix@MathSymbol{G} {\mathalpha}{itletters} {`G}
\stix@MathSymbol{H} {\mathalpha}{itletters} {`H}
\stix@MathSymbol{I} {\mathalpha}{itletters} {`I}
\stix@MathSymbol{J} {\mathalpha}{itletters} {`J}
\stix@MathSymbol{K} {\mathalpha}{itletters} {`K}
\stix@MathSymbol{L} {\mathalpha}{itletters} {`L}
\stix@MathSymbol{M} {\mathalpha}{itletters} {`M}
\stix@MathSymbol{N} {\mathalpha}{itletters} {`N}
\stix@MathSymbol{O} {\mathalpha}{itletters} {`O}
\stix@MathSymbol{P} {\mathalpha}{itletters} {`P}
\stix@MathSymbol{Q} {\mathalpha}{itletters} {`Q}
\stix@MathSymbol{R} {\mathalpha}{itletters} {`R}
\stix@MathSymbol{S} {\mathalpha}{itletters} {`S}
\stix@MathSymbol{T} {\mathalpha}{itletters} {`T}
\stix@MathSymbol{U} {\mathalpha}{itletters} {`U}
\stix@MathSymbol{V} {\mathalpha}{itletters} {`V}
\stix@MathSymbol{W} {\mathalpha}{itletters} {`W}
\stix@MathSymbol{X} {\mathalpha}{itletters} {`X}
\stix@MathSymbol{Y} {\mathalpha}{itletters} {`Y}
\stix@MathSymbol{Z} {\mathalpha}{itletters} {`Z}
\stix@MathSymbol{a} {\mathalpha}{itletters} {`a}
\stix@MathSymbol{b} {\mathalpha}{itletters} {`b}
\stix@MathSymbol{c} {\mathalpha}{itletters} {`c}
\stix@MathSymbol{d} {\mathalpha}{itletters} {`d}
\stix@MathSymbol{e} {\mathalpha}{itletters} {`e}
\stix@MathSymbol{f} {\mathalpha}{itletters} {`f}
\stix@MathSymbol{g} {\mathalpha}{itletters} {`g}
\stix@MathSymbol{h} {\mathalpha}{itletters} {`h}
\stix@MathSymbol{i} {\mathalpha}{itletters} {`i}
\stix@MathSymbol{j} {\mathalpha}{itletters} {`j}
\stix@MathSymbol{k} {\mathalpha}{itletters} {`k}
\stix@MathSymbol{l} {\mathalpha}{itletters} {`l}
\stix@MathSymbol{m} {\mathalpha}{itletters} {`m}
\stix@MathSymbol{n} {\mathalpha}{itletters} {`n}
\stix@MathSymbol{o} {\mathalpha}{itletters} {`o}
\stix@MathSymbol{p} {\mathalpha}{itletters} {`p}
\stix@MathSymbol{q} {\mathalpha}{itletters} {`q}
\stix@MathSymbol{r} {\mathalpha}{itletters} {`r}
\stix@MathSymbol{s} {\mathalpha}{itletters} {`s}
\stix@MathSymbol{t} {\mathalpha}{itletters} {`t}
\stix@MathSymbol{u} {\mathalpha}{itletters} {`u}
\stix@MathSymbol{v} {\mathalpha}{itletters} {`v}
\stix@MathSymbol{w} {\mathalpha}{itletters} {`w}
\stix@MathSymbol{x} {\mathalpha}{itletters} {`x}
\stix@MathSymbol{y} {\mathalpha}{itletters} {`y}
\stix@MathSymbol{z} {\mathalpha}{itletters} {`z}
\makeatother
\begin{document}
This is for test \textit{test}
\[
abcABC
\]
\end{document}
的输出pdffonts
是
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
LHJDKK+STIXGeneral-Regular Type 1 yes yes no 4 0
GQLIBX+STIXGeneral-Italic Type 1 yes yes no 5 0
GQLIBX+STIXGeneral-Italic Type 1 yes yes no 6 0
如果没有更改,输出将是
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
LHJDKK+STIXGeneral-Regular Type 1 yes yes no 4 0
EUZLLL+STIXGeneral-Italic Type 1 yes yes no 5 0
URGOEX+STIXMath-Italic Type 1 yes yes no 6 0
但是,你应该意识到输出肯定更糟糕。例如,在 中会应用连字$fl$
;数学公式中斜体字母之间的间距是错误的。