[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Spaces in examples from macros (was backslashes, macros, indexes, texinf
From: |
Gavin Smith |
Subject: |
Spaces in examples from macros (was backslashes, macros, indexes, texinfo) |
Date: |
Mon, 10 Aug 2015 21:30:56 +0100 |
On 10 August 2015 at 19:47, Gavin Smith <address@hidden> wrote:
> The space itself is being expanded. Since space was \let equal to \tie
> with \sepspaces when \example was opened, the space is expanding to
> the definition of \tie.
>
> Adding an extra line
>
> \catcode`\ =\other
>
> eliminates this expansion.
Because the definition of space isn't changed when the macro body is
read, I believe that multiple spaces are collapsed to one by TeX's
input processor. I found that this could give an inconsistency in an
@example. With the following input:
@macro Mac
@example
x x
@end example
@end macro
@example
x x
@end example
@Mac
the first space is doubled but the second, from the macro expansion, isn't.
I wondered if a @macro within an @example would break for a similar
reason, but it breaks for a different reason, not that anybody would
ever want to do that.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Spaces in examples from macros (was backslashes, macros, indexes, texinfo),
Gavin Smith <=