The exercise is to reproduce the two possible typings of ``` (three leftquotes). Immediately beforehand there is an explanation of how to do the same thing with three rightquotes, which I will rewrite in my own words to check I really understand it:

If you type ''', then TeX assumes that this is a double \rq followed by a single \rq, and spaces appropriately. If you group them this way, you have: ''' vs. ''{'}, which I expect to look identical (they do). But if you want a single \rq followed by a double \rq, then grouping does not work: '{''} because the space is too small. So you have to manually insert the \thinspace: to get '\thinspace''

For the exercise, I figured that three leftquotes in a row ``` would be parsed as "double \lq followed by single \lq", and that therefore the spacing would agree with ``\thinspace', but it doesn't. I know from elsewhere that two adjacent backticks get turned into a ligature. I assumed that the spacing between this ligature and the surrounding text was determined dynamically (somehow), but if the `` ligature actually has some space hard-coded (i.e. that it really becomes \thinspace``) then I think I understand (in particular, Don's remarks about spacing in the previous paragraph also seem to make sense). Is this correct?


In cmr10.tfm you find, after transforming it in human readable form with tftopl,

   (LABEL O 47)
   (LIG O 47 O 42)
   (KRN O 77 R 0.111112)
   (KRN O 41 R 0.111112)

as part of LIGTABLE. This means that if octal 47 (decimal 39, right quote/apostrophe) is followed by the same character, TeX will replace the two characters with the glyph in position octal 42 (decimal 34, double quote/quotation mark). If followed by octal 77 (decimal 63, question mark) or octal 41 (decimal 33, exclamation mark) a kern is added.

The table has no entry for O 42, so no kerning is used after the double quote.

Indeed, if you try





you get

Completed box being shipped out [1]
.\vbox(0.0+0.0)x469.75499, glue set 14.0fil
..\glue -22.5
..\hbox(8.5+0.0)x469.75499, glue set 469.75499fil
...\glue 0.0 plus 1.0fil
..\glue 0.0 plus 1.0fil minus 1.0fil
.\vbox(643.20255+0.0)x469.75499, glue set 633.20255fill
..\glue(\topskip) 3.05556
..\hbox(6.94444+0.0)x469.75499, glue set 441.97719fil
...\tenrm " (ligature '')
...\tenrm '
...\penalty 10000
...\glue(\parfillskip) 0.0 plus 1.0fil
...\glue(\rightskip) 0.0
..\glue 0.0 plus 1.0fill
.\glue(\baselineskip) 24.0
.\hbox(0.0+0.0)x469.75499, glue set 469.75499fil
..\glue 0.0 plus 1.0fil

showing no kern. However, one has to take into account how the glyphs sit in their bounding box.



\setlength{\fboxrule}{0.1pt}% hairline
\setlength{\fboxsep}{-\fboxrule}% takes no space



enter image description here

So you see that a “thin space” is somewhat hardwired in the double quote. Different fonts may behave in a different way.

  • So, to summarise, there is not an explicit space after the character box for '' , but there appears to be one because of where the '' ligature sits inside its character box? – preferred_anon Jul 22 '18 at 11:41
  • @DanielLittlewood Exactly. Also add the placement of the single quote. – egreg Jul 22 '18 at 12:49

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.