Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have been trying to use the \SetTracking option in microtype to shrink a paragraph that has some text and math. However, I notice that only the text - and not the math fonts - are being adjusted. The MWE below samples one such scenario:

    % 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}

We can clearly discern that only the and within the paragraph is being changed - the math fonts remains the same. How can I get around this issue?

share|improve this question
1  
I don't think it's possible to apply tracking to math formulas. –  egreg Nov 14 '12 at 10:49
add comment

1 Answer 1

up vote 2 down vote accepted

This is a similar bug in microtype as the one you stumbled upon in pdfTeX font expansion error - \SetExpansion in microtype package. Fix it by adding the following lines to the preamble:

\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

It seems like I should take a closer look at math font setup again.

share|improve this answer
    
This did fix it... Is there a general way to write out these fixes? –  RazorXsr Nov 16 '12 at 21:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.