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 want to disable automatic kerning for a few lines in my text as the \textwidth before kerning and after kerning is not the same. And I'm sure there is a simple command to do so, but just can't figure it out.

  • Which command do I use to stop XeLaTeX from doing automatic kerning?
  • Or better still which command do I use to get the \textwidth after automatic kerning has been applied?
  • And does the same command also work for \columnwidth?
share|improve this question
    
As Ulrike says, kerning and \textwidth are completely unrelated: (Xe)TeX typesets the words with kerning and then justifies the lines by setting the interword spaces (taking a whole paragraph into account). You probably are thinking to something different from \textwidth. –  egreg Dec 4 '12 at 11:50
    
@egreg You might be right that I'm missing the mark on this. Although see my comment below on Ulrike's answer for more detail. –  McGafter Dec 4 '12 at 12:05
    
I'd choose a monospaced typeface. They're designed to look well without kerning:-) –  Marc van Dongen Dec 4 '12 at 15:11
add comment

1 Answer

up vote 7 down vote accepted

It depends on the font if you can deactivate kerning:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\setsansfont{Arial}
\begin{document}
AV Ta \textsf{AV Ta}

{\fontspec[Kerning=Off]{Latin Modern Roman}AV Ta} %works
{\fontspec[Kerning=Off]{Arial}AV Ta} %doesn't work
\end{document}

But actually I doubt very much that you really want to do this. I don't understand why you think that kerning affects \textwidth. You should better describe with a minimal example what you want to achieve.

share|improve this answer
    
Thanks for the example. I've had a question in the past where I had to find the width of the text to include some lettrine in front of. tex.stackexchange.com/q/31459/7093 Even though in the general the answers were helpful, there remain always the cases where they just don't seem to work. So I'm just imagining that when I take the \textwidth it is value "A" and by the time the actual kerning and wrapping with value "B" is applied the width has changed to "A + B". Other than that I don't have a reason for thinking this. It's just in a some cases the solutions doesn't work. –  McGafter Dec 4 '12 at 11:27
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.