[NTG-context] Spacing after defined word: beginner's question

Wolfgang Schuster schuster.wolfgang at googlemail.com
Mon Dec 25 19:04:33 CET 2006


On Mon, 25 Dec 2006 16:45:15 +0000
cormullion at mac.com wrote:

> This must be a beginner's question, but I can't find the answer to it  
> in the manuals...
> 
> Take this ConTeXt source:
> 
> --
> \def\Acme{%
> 	{\ss\sc ACME}}
> 
> Welcome from \Acme. \Acme make fine products.
> --
> 
> When this is made into a PDF, it looks like this:
> 
> --
> Welcome from ACME. ACMEmake fine products.
> --
> 
> - because I didn't have a space in the definition, I don't get a  
> space in the second sentence, but the period didn't interfere with  
> the execution of the first occurrence. But if I put a space in the  
> definition after the 'E', I get this:
> 
> --
> Welcome from ACME . ACME make fine products.
> --
> 
> - and there's a space after the first 'E', which I don't want, even  
> though there is now a space after the second...
> 
> What am I doing wrong?

Hi ???,

TeX ignores spaces after commands. This is now problem when your
command is before an period, comma ...,but it will it up the next space
in a sentence.

You can write you sentence in the following ways:
  Welcome from \Acme. \Acme\ make fine products.
  Welcome from \Acme. \Acme{} make fine products.
  Welcome from \Acme. {\Acme} make fine products.

There is also a predefined command to define and setup your own
abbreviations and syonyms. You can find an example at page 55 in the
beginners manual (ma-cb-en.pdf).

Wolfgang


More information about the ntg-context mailing list