1

As far as I understand, LaTeX itself provides the following way: <<quoted text>>. However, russian babel package provides also this way: "<quoted text">. They both look the same in the output document but the first one looks nicer in the source code and easier to type but it seems like the second way is more right when you use babel (or why does "< even exist there). Can someone explain the differences between << and "<? Is there any document that explains all the language specific sequences for Russian (such as hyphens, quotes and dashes, starting with ") and how they exactly affect the appearance of these punctuation marks?

1

There's no difference at all. In russianb.ldf we find

\declare@shorthand{russian}{"<}{\guillemotleft}
\declare@shorthand{russian}{">}{\guillemotright}

This means that the shorthands "< and "> are translated respectively into \guillemotleft and \guillemotright.

When the Russian language is used, the output encoding is T2A and in t2aenc.def we find

\DeclareTextSymbol{\guillemotleft}{\LastDeclaredEncoding}{190}
\DeclareTextSymbol{\guillemotright}{\LastDeclaredEncoding}{191}

which basically means: \guillemotleft typesets the character in slot 190 of the current font; similarly for \guillemotright.

Let's look what happens with a T2A encoded font; the default one is larm1000 and doing

tftopl larm1000

shows

(LIGTABLE
   [...omitted...]
   (LABEL O 74)
   (LIG O 74 O 276)
   (STOP)
   (LABEL O 76)
   (LIG O 76 O 277)
   (STOP)
   [...omitted...]
)

The tftopl program decodes a TFM (font metric) file into human readable format.

Note that numbers here are given in octal representation; octal 74 is the slot for <, octal 76 is the slot for >; octal 276 is decimal 190 and octal 277 is decimal 191.

The ligature table says: when < is followed by <, print instead of them the character in slot 190. Similarly for >>.

There would be a difference if a T2A encoded font misses the ligature, which can happen, but is only detected by wrong output. No issue derives from space factor codes, because Russian babel sets \frenchspacing.

Just for checking, run LaTeX over the following file

\documentclass{article}
\usepackage[russian]{babel}

\begin{document}

\showboxbreadth=\maxdimen
\showboxdepth=\maxdimen

\sbox0{"<qt">}\showbox0
\sbox0{<<qt>>}\showbox0

\end{document}

TeX will stop twice like for errors; hit return to go past the stop. The relevant part of the log file will be

> \box0=
\hbox(6.1493+1.94397)x20.27283
.\T2A/cmr/m/n/10 <BE>
.\T2A/cmr/m/n/10 q
.\T2A/cmr/m/n/10 t
.\T2A/cmr/m/n/10 <BF>


! OK.
l.9 \sbox0{"<qt">}\showbox0

? 
> \box0=
\hbox(6.1493+1.94397)x20.27283
.\T2A/cmr/m/n/10 <BE> (ligature <<)
.\T2A/cmr/m/n/10 q
.\T2A/cmr/m/n/10 t
.\T2A/cmr/m/n/10 <BF> (ligature >>)

! OK.
l.10 \sbox0{<<qt>>}\showbox0

Note that hexadecimal BE and BF are decimal 190 and 191.

The output is exactly the same (apart from the annotation that in the second case TeX has done a ligature).

Well, a difference can be made. You might redefine the shorthands "< and "> to do something different, for instance adding some unbreakable space after « and before » (as the French use to do). Such spaces could not be added with using << and >> (at least, not automatically).

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.