19

In English text, TeX follows the convention of putting extra space after a period by default, which I like. However, in the case of abbreviations it causes a problem. To suppress the extra space, one can use \  or ~, which is useful for lower case abbreviations such as “e.g.”

Unfortunately, for upper-case abbreviations, TeX archaically assumes that the period is part of the abbreviation, and uses a narrow space. You can force a wide space in LaTeX via the \@. macro:

\documentclass{article}
\begin{document}
Wrong: \\
First.  An abbreviation, e.g. PC.  Second. \\
First.  An abbreviation, e.g.\ PC\@.  Second. \\
:Right
\end{document}

In ConTeXt, this causes an error – the \@. macro is not defined.

\starttext
Wrong: \\
First.  An abbreviation, e.g. PC.  Second. \\
First.  An abbreviation, e.g.\ PC\@.  Second. \\  % Error here.
:Right
\stoptext

So, is there an equivalent of \@. for ConTeXt?

  • 9
    For what it's worth, the simple definition of \@ in LaTeX is \def\@{\spacefactor1000 } and the same definition should have the same effect in ConTeXt – egreg Feb 5 '13 at 18:46
18

I'm not aware that ConTeXt has an equivalent for \@. But it's easy to build, since it just uses \spacefactor.

\define\fullstop
  {\spacefactor\plusthousand}

\starttext
  An abbreviation, e.g. PC. Second.           \\
  An abbreviation, e.g. PC\fullstop. Second.  \\
  An abbreviation, e.g.\ PC.\ Second.         \\
  An abbreviation, e.g. PC.\ Second.          \\
\stoptext

result

  • 6
    +1 for using a readable name \fullstop instead of \@. – Aditya Feb 5 '13 at 21:50
  • 4
    @Aditya problem with \fullstop as opposed to \@ is that it eats the trailing spaces in case you use it as e.g.\@ PC which I a lot prefer over e.g.\ PC That is the reason why a non-letter one-symbol control sequence is used for this. In LaTeX, the correct form is of course: An abbreviation, e.g.\@ PC\@. Second. – yo' Feb 5 '13 at 22:38
  • @tohecz: Thanks, I had no idea “\@” was that general. The main disadvantage from my point of view is that “\@” is really not fun to search the web for! – Gareth Jones Feb 5 '13 at 22:50
  • 4
    well, \spacefactor1000 after the . tells TeX that the following space is a normal inter-word space. But if you put it before the dot, TeX doesn't see what was before, so even if it was PC before, TeX considers the . to be a full stop. It is a bit crazy distinction between .\@ and \@. that took me some time to understand. – yo' Feb 5 '13 at 22:52

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.