groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Allowing user also to check if a line starts with horizontal


From: Werner LEMBERG
Subject: Re: [Groff] Allowing user also to check if a line starts with horizontal space
Date: Sun, 15 Feb 2009 16:24:37 +0100 (CET)

> Excellent!  I've experimented with it for a while, and it works as
> documented except for one bit of strange behavior:
> 
> If the first thing that occurs in the text following leading spaces
> is a font-switch, the font-switch doesn't take effect.  [...]
>
> .de LSM
> .LP
> ..
> .lsm LSM
>
> ...
>        \fIfor
>        all
>        good
>
> The "for" is not italicized. [...]  The lsm macro seems to be
> reading away all initial escapes.

I'll document this better, but it is correct behaviour.  The \fI is
read while skipping the spaces -- there are a bunch of other escapes
(\F, \H, \m, \M, ...) which don't lead to a token but modify the
current `groff state' immediately.  Right before processing the `f' of
the word `for', your `LSM' macro is called, which in turn calls `LP'.
However, `LP' resets the current font, cancelling the effect of \fI.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]