数学环境中的 \SetTracking

数学环境中的 \SetTracking

我一直尝试使用该\SetTracking选项来microtype缩小包含一些文本和数学的段落。但是,我注意到只有文本(而不是数学字体)被调整了。下面的 MWE 示例了一个这样的场景:

    % START PREAMBLE
    \documentclass[12pt]{report}
    \usepackage[margin=1.25in]{geometry}

    %Required math packages
    \usepackage{amsmath}
    \usepackage{bm}
    \newcommand\vect[1]{\bm{#1}}%bm{#1}

    %Document and typesetting
    \usepackage{setspace}
    \linespread{1.5}
    \setlength{\parindent}{0in}

    %Microtyping
    \usepackage{microtype}

    % END PREAMBLE

    \begin{document}

    This is without any tracking:

    $
    {{\vect{\varphi }}_{{qj}}} = ({\Psi _{qj1,{m_{qj1}} - 1,}} {\Psi _{qj2,{m_{qj2}} - 1,}},\dots, {\Psi _{qjS,{m_{qjS}} - 1}}),
    {{\vect{\varphi }}_{q}} = ({{\vect{\varphi }}_{{q1}}}, {{\vect{\varphi }}_{{q2}}},\dots, {{\vect{\varphi }}_{{qJ}}}),$
    and 
    ${\vect{\varphi}} = ({{\vect{\varphi}}_{1}}, {{\vect{\varphi}}_{2}},\dots, {{\vect{\varphi}}_{Q}})$
    and 
    ${{\vect{\vartheta}}_{qj}}{\rm{ }} = {\rm{ (}}{\Psi _{qj1,{m_{qj1}},{\rm{ }}}}{\rm{ }}{\Psi _{qj2,{m_{qj2}},{\rm{ }}}},\dots,{\rm{ }}{\Psi _{qjS,{m_{qjS}}}}){\rm{, }}
    {\vect{\vartheta }_{q}} = {\rm{(}}{\vect{\vartheta }_{{q1}}}, {\vect{\vartheta }_{{q2}}}{\rm{ , }}\dots{\rm{, }}{\vect{\vartheta }_{{qJ}}})$
    and 
    $\vect{\vartheta } = {\rm{ (}}{\vect{\vartheta }_{1}}, {\vect{\vartheta }_{2}},\dots, {\vect{\vartheta }_{Q}}).
    $

    \vspace{7mm}

    This is with tracking:

    \SetTracking[spacing={-50*,0*,50*}]{encoding={OT1,T1,TS1,OML,OMS,OMX,U}}{-30}
    \textls{${{\vect{\varphi }}_{{qj}}} = ({\Psi _{qj1,{m_{qj1}} - 1,}} {\Psi _{qj2,{m_{qj2}} - 1,}},\dots, {\Psi _{qjS,{m_{qjS}} - 1}}),
    {{\vect{\varphi }}_{q}} = ({{\vect{\varphi }}_{{q1}}}, {{\vect{\varphi }}_{{q2}}},\dots, {{\vect{\varphi }}_{{qJ}}}),$
    and 
    ${\vect{\varphi}} = ({{\vect{\varphi}}_{1}}, {{\vect{\varphi}}_{2}},\dots, {{\vect{\varphi}}_{Q}})$
    and 
    ${{\vect{\vartheta}}_{qj}}{\rm{ }} = {\rm{ (}}{\Psi _{qj1,{m_{qj1}},{\rm{ }}}}{\rm{ }}{\Psi _{qj2,{m_{qj2}},{\rm{ }}}},\dots,{\rm{ }}{\Psi _{qjS,{m_{qjS}}}}){\rm{, }}
    {\vect{\vartheta }_{q}} = {\rm{(}}{\vect{\vartheta }_{{q1}}}, {\vect{\vartheta }_{{q2}}}{\rm{ , }}\dots{\rm{, }}{\vect{\vartheta }_{{qJ}}})$
    and 
    $\vect{\vartheta } = {\rm{ (}}{\vect{\vartheta }_{1}}, {\vect{\vartheta }_{2}},\dots, {\vect{\vartheta }_{Q}}).
    $
    }

    \end{document}

我们可以清楚地看出,只有and段落内的发生了变化 - 数学字体保持不变。我该如何解决这个问题?

答案1

这是一个类似于microtype你在pdfTeX 字体扩展错误 - microtype 包中的 \SetExpansion通过在序言中添加以下几行来修复它:

\makeatletter
\DeclareRobustCommand\lsstyle{%
  \not@math@alphabet\lsstyle\textls
  \let\glb@currsize\@empty % <- added
  \def\MT@feat{tr}%
  \let\MT@tracking\MT@set@tr@codes
  \selectfont
}
\makeatother

看来我应该再次仔细看看数学字体设置。

相关内容