8

I want to create a table for comparing TeX's typography with that of (approximated) other document solutions. I'd like to turn off all TeXnical enhancements for a single column of text—no ligatures, no good kerning, etc. I'm trying to use fontspec to do this, since Computer Modern simply doesn't have the ligatures I'm also looking to show off (fj for example).

Since the solution doesn't particularly ride on being usable in a table (to my knowledge), any solution where such typography is turned off within a group would work. :-)

Here is my attempt at a solution:

\documentclass{article}
\usepackage{fontspec,booktabs,array}
\begin{document}
\begin{table}
  \centering
{
  \setmainfont{Hoefler Text} % Linux Libertine also has fj I believe,
                             % but I do not have it installed on my system
  \begin{tabular}{ c >{\addfontfeature{Ligatures=NoCommon}}c }
    \toprule
    \TeX & \MicrosoftWord \\
    \midrule
    Table & T{}a{}b{}l{}e \\
    SALT  & S{}A{}L{}T    \\
    AVAST & A{}V{}A{}S{}T \\
    \midrule
    efficient firefly & e{}f{}f{}i{}c{}i{}e{}n{}t f{}i{}r{}e{}f{}l{}y \\
    \bottomrule
  \end{tabular}
}
  \caption{A comparison of \TeX\ and other word processing solutions
    (such as \MicrosoftWord) in regards to
    kerning, ligatures, and small capitals}
  \label{tab:compare}
\end{table}
\end{document}

which does successfully turn off ligatures, but I've no idea how to 'turn off' kerning other than what I'm doing right now, which is very much not in the spirit of TeX (one that I am actively trying to advertise).

6

Dangit, should have looked closer at the manual.

If the font is OpenType, you can turn kerning on and off as well with a simple Kerning=(on|off) switch:

\begin{table}
  \centering
{
  \setmainfont{Corbel}
  \begin{tabular}{ c >{\addfontfeature{Ligatures=NoCommon,Kerning=Off}}c }
    \toprule
    \TeX & \MicrosoftWord \\
    \midrule
    Table & Table \\
    SALT  & SALT    \\
    AVAST & AVAST \\
    \midrule
    efficient firefly & efficient firefly \\
    \bottomrule
  \end{tabular}
}
  \caption{A comparison of \TeX\ and other word processing solutions
    (such as \MicrosoftWord) in regards to
    kerning, ligatures, and small capitals}
  \label{tab:compare}
\end{table}

The trick now is finding an OTF that looks nice with the rest of my document. Anyway, hope this helps anybody else who might be looking for such a thing!

  • 1
    An off-topic hint on making your code more reader- and debug-friendly: Since you're (presumably) still loading the array package, you could issue the command \newcolumntype{Z}{>{\addfontfeature{Ligatures=NoCommon,Kerning=Off}}c} in the preamble and then type \begin{tabular}{cZ} later on. – Mico Sep 3 '13 at 0:53
  • @Mico Tip taken and very much appreciated! Makes the actual tabular-spec a lot cleaner. – Sean Allred Sep 3 '13 at 19:40

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.