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.

See the following example:

\documentclass{article}

\begin{document}
Hello?``world!''
\end{document}

The ?` will be replaced by a bottom-up question mark, If add a space between them will avoid this but I want to know the reason.

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

The cmr10 font (and others) contain a ligature for this. If you run tftopl cmr10.tfm, you will see this in the output:

(CHARACTER O 77
   (CHARWD R 0.472224)
   (CHARHT R 0.694445)
   (COMMENT
      (LIG O 140 O 76)
      )
   )

Octal 77 is the question mark, octal 140 is the backtick, and octal 76 is the upside down question mark in the font (which code, incidentally, coincides with the code for > in ASCII – and so typing the latter also produces ¿).

To avoid the ligature, if you don't want a space, type \relax or {} between the two characters.

share|improve this answer
add comment

The pair of characters ?` produces ¿, and the pair of characters !` produces ¡. Since the input is parsed left to right, the ?` is found first, yielding the ¿. For a full list of the Latin1 code table in LaTeX see Table 329 of the LaTeX Symbols Guide.

share|improve this answer
    
It has nothing to do with the input encoding and everything to do with the kerning table of the font. –  Harald Hanche-Olsen May 6 '11 at 6:32
    
@Harald Thanks. I've adjusted my answer. –  Alan Munn May 6 '11 at 6:49
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.