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'm trying to compile the following code based on "more realistic example" from microtype.sty manual, Sect. 5.3. It works without babel (or with, say, french option) or without mathdesign. But with both them present, I get equal tracking for all 3 input lines.

How can it be fixed?

\documentclass[10pt]{book}
\usepackage[russian]{babel}
\usepackage[T2A]{fontenc}

\usepackage[mdbch,expert]{mathdesign}

\usepackage[babel=true,tracking=true]{microtype}
\DeclareMicrotypeSet*[tracking]{my}
   { encoding = *,
     size     = {-small,Large-},
     font     = */*/*/sc/* }
\SetTracking[ no ligatures = f ]{ encoding = *, shape = sc}{ 100 }
\SetTracking{ encoding = *, size = -small }{  800 }
\SetTracking{ encoding = *, size = Large-  }{ -100 }

\begin{document}

\textsc{this is a test}  $abcd$

{\footnotesize this is a test}

{\Large this is a test}

\end{document}
share|improve this question

1 Answer 1

The Charter font provided by mathdesign is not available in T2A encoding; so the test you try to do does not work, probably because microtype gets confused with the font substitutions.

Without the expert option and with a different language not using the cyrillic script, the result is what's expected.

A tip: always put the call of fontenc before loading babel, particularly when using cyrillic encodings.

As you point out in the comment there's also a glitch with mathdesign that declares the T1 encoding. However, with Russian babel the encoding active after \begin{document} is correctly T2A. However a loading order such as

\usepackage[<options>]{mathdesign}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}

is recommended, so that the T2A encoding, which is specified last, is the default encoding. Always call inputenc after fontenc.

share|improve this answer
    
Isn't it true that mathdesign affects mostly math fonts? I found the only line with reassignment of \rmdefault -- but if I change it back to cmr, nothing happens. –  Vadim Radionov Oct 24 '11 at 16:46
    
No, with \usepackage[charter]{mathdesign} (the same as mdbch, but friendlier) you're asking that the font is Charter for the whole document, text included. Only math is affected with russian because the cyrillic Charter font is not available, so LaTeX changes the text family back to Computer Modern. –  egreg Oct 24 '11 at 16:53
    
Also if I provide t2amdbch.fd with references to my localized Charter analogue, still nothing –  Vadim Radionov Oct 24 '11 at 17:00
    
Ah, I see! mathdesign in its last lines requires [T1]{fontenc}, and loading it before [T2A]{fontenc} solves the problem. Thank you for pointing me to it! –  Vadim Radionov Oct 24 '11 at 17:08

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.