On 10 August 2015 at 19:47, Gavin Smith <gavinsmith0...@gmail.com> 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.

Reply via email to