3

Using microtype package I'm trying to activate a specific set of microtype parameters for a portion of my text and I found the environment microtypecontext devoted to this purpose. I actually get an error when I try to specify the parameters of the features.

\usepackage{microtype}

\newcommand\TextIta{Cristo, risorto dai morti, che con la morte ha calpestato la morte, e a coloro che stavano nelle tombe ha donato la vita.}

\begin{document}

\begin{microtypecontext}{expansion=true, shrink = 270, stretch = 270} 

\TextIta

\end{microtypecontext}

\TextIta

\end{document}

With this code I get the error:

Package Keyval Error: shrink undefined.
  • Reading the manual, it seems that neither shrink nor stretch are valid options for microtypecontext. – egreg Nov 12 '16 at 17:06
  • I actually don't understand from the manual a way to specify the parameters... – Paolo Polesana Nov 12 '16 at 17:22
2

You have to define a context:

\documentclass{article}
\usepackage{microtype}

\SetExpansion[
  context=paolo,
  shrink=270,
  stretch=270,
]{encoding=*}{}

\newcommand\TextIta{Cristo, risorto dai morti, che con la morte
ha calpestato la morte, e a coloro che stavano nelle tombe ha
donato la vita.}

\begin{document}

\begin{microtypecontext}{expansion=paolo}
\TextIta
\end{microtypecontext}

\TextIta

\end{document}

enter image description here

  • Thank you! It was easy, but I didn't understand the manual! – Paolo Polesana Nov 12 '16 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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