[OS X TeX] Gobble left

Morten Høgholm morten.hoegholm at latex-project.org
Sun Apr 17 14:55:54 CEST 2005


On Fri, 15 Apr 2005 08:22:28 +0200, Peter Pagin  
<peter.pagin at philosophy.su.se> wrote:

> Hi, all.
> Here's a TeX question, I guess. By means of
>
> \def\gobble #1{}
>
> a command \gobble is defined that deletes the next character (or space)  
> to the right, or replaces it by whatever one puts between the curly  
> brackets in the definition. My question is whether there is a method for  
> doing the same to the character to the left, i.e. preceding the  
> occurrence of the command.

You can sometimes investigate what came right before your command and base  
future actions on it but you can only remove a kern, skip or penalty.

Some languages require this ability in order to do fully automated  
typesetting so it is something that'd be nice to have. However it would  
require the engine to determine which character came before it and if it  
was part of a ligature or not etc. and I doubt it's possible to implement  
in the TeX engine - Jonathan can probably comment on this.
-- 
Morten
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list