2

I'm looking for a way to disable Lua's Microtype (note the capital M - to distinguish from the lower case microtype package) in the first tabular column of the MWE given below:

\documentclass[a4paper]{article}

\usepackage{fontspec}

\pdfprotrudechars=2
\pdfadjustspacing=2
\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\directlua{fonts.protrusions.setups.default.factor=.5}
\setmainfont[Microtype, Numbers={OldStyle, Proportional}, Ligatures=TeX]{Verdana}

\usepackage{tabularx}

\begin{document}

\begin{tabularx}{\textwidth}{@{}*{1}{l|}*{1}{X}@{}}

aaaaaaaaaaaa & \textbf{bbbbbbbbbb} \\
&\emph{ccccccccccccccc}\\

\end{tabularx}

\end{document}

This MWE isn't "optimized" to show the effect(s) of M/microtype, and thus perhaps ought to be improved accordingly...

4
\documentclass[a4paper]{article}

\usepackage{fontspec}

\pdfprotrudechars=2
\pdfadjustspacing=2
\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\directlua{fonts.protrusions.setups.default.factor=.5}
\setmainfont[Microtype, Numbers={OldStyle, Proportional}, Ligatures=TeX]{Verdana}
\newfontface\NoMicrotype[Numbers={OldStyle, Proportional}, Ligatures=TeX]{Verdana}

\usepackage{tabularx}

\begin{document}

\begin{tabularx}{\textwidth}{@{} >{\NoMicrotype}l | X @{}}

aaaaaaaaaaaa & \textbf{bbbbbbbbbb} \\
             & \emph{ccccccccccccccc} \\
\end{tabularx}

\end{document}

for the first l-column it already has no effect. you can see it in the X column with more text when there are linebreaks.

  • LaTeX Font Warning: Some font shapes were not available, defaults substituted. ? – nutty about natty Jul 10 '13 at 8:52
  • I cannot see such a message with lualatex from currrent TL2013 – user2478 Jul 10 '13 at 8:57
  • hmm, I'm still on TL2012... you think that's the bottleneck? – nutty about natty Jul 10 '13 at 8:59
  • maybe. However, Verdana has no font features for Numbers. – user2478 Jul 10 '13 at 9:00
  • That could also be a reason... in my "real-world" example, it is a column of numbers (e.g. 08/2010 – 11/2010). Does that mean that \newfontface\NoMicrotype[... would not work / be ineffective for such a column in this scenario? – nutty about natty Jul 10 '13 at 9:05
1

Even though I believe – judging from your comments – that the microtypographical features have nothing to do with your actual problem (whatever this may be ...), let me just add for completeness' sake that the simplest solution to disable protrusion and expansion is to say:

\pdfprotrudechars=0
\pdfadjustspacing=0

They can be enabled again by setting both values to 2, or by enclosing the text in a group.

Note, however, that you cannot use this methods to change settings within one paragraph; those settings that are in effect at the end of the paragraph will apply to the whole paragraph. In order to temporarily disable the features for only part of a paragraph, you can resort to Herbert's solution. (This is a general remark for future readers and not directed towards your problem.)

  • Extending on your v helpful remarks, this is what (also) works for me in my text (as you indicate) within a given paragraph: \NoMicrotype{some text}, as defined by Herbert in his answer. – nutty about natty Jul 11 '13 at 20: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.