[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect @math spacing for PDF output with an empty macro
From: |
Vincent Lefevre |
Subject: |
Re: incorrect @math spacing for PDF output with an empty macro |
Date: |
Tue, 25 Oct 2022 14:41:48 +0200 |
User-agent: |
Mutt/2.2.7+51 (a318ca5a) vl-149028 (2022-10-21) |
On 2022-10-16 12:18:51 +0100, Gavin Smith wrote:
> On Sat, Oct 15, 2022 at 12:40:32PM +0200, Vincent Lefevre wrote:
> > The spaces in math mode can normally stretch and shrink (not in
> > the same way as outside of math mode, though). But there are some
> > TeX commands that changes spaces to fixed spaces in math mode.
> > I just wanted to be sure that @w did not change anything in this
> > respect.
>
> The answer is I do not know, although I don't expect there would be
> a problem.
@w doesn't work correctly in math mode:
------------------------------------------------------------
\input texinfo @c -*-texinfo-*-
@documentencoding UTF-8
@node Top
@node Test
Formatting test.
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @math{a + b}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
zzzzzzzzzzzzzzzzzz @w{@math{a + b}}
@bye
------------------------------------------------------------
One can see that with @w, spaces do not stretch.
However, a solution is to define a macro with @iftex and @ifnottex
so that @w is not used for TeX. Basically, @math{T} for TeX, @w{T}
otherwise. (I recall that the goal is to use that when T is a very
simple math expression, so that it is OK for Info and HTML without
any special handling.)
For instance:
------------------------------------------------------------
\input texinfo @c -*-texinfo-*-
@documentencoding UTF-8
@iftex
@macro m {T}
@math{\T\}
@end macro
@end iftex
@ifnottex
@macro m {T}
@w{\T\}
@end macro
@end ifnottex
@node Top
@node Test
Formatting test.
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
zzzzzzzzzzzzzzzzzz @m{a + b}
@bye
------------------------------------------------------------
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
- Re: behavior of @math with HTML output, (continued)
- Re: behavior of @math with HTML output, Gavin Smith, 2022/10/13
- Re: behavior of @math with HTML output, Vincent Lefevre, 2022/10/13
- Re: behavior of @math with HTML output, Gavin Smith, 2022/10/14
- incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/14
- Re: incorrect @math spacing for PDF output with an empty macro, Gavin Smith, 2022/10/14
- Re: incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/14
- Re: incorrect @math spacing for PDF output with an empty macro, Jacob Bachmeyer, 2022/10/14
- Re: incorrect @math spacing for PDF output with an empty macro, Gavin Smith, 2022/10/15
- Re: incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/15
- Re: incorrect @math spacing for PDF output with an empty macro, Gavin Smith, 2022/10/16
- Re: incorrect @math spacing for PDF output with an empty macro,
Vincent Lefevre <=
- Re: incorrect @math spacing for PDF output with an empty macro, Gavin Smith, 2022/10/25
- Re: incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/25
- Re: incorrect @math spacing for PDF output with an empty macro, Gavin Smith, 2022/10/26
- Re: incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/26
- Re: incorrect @math spacing for PDF output with an empty macro, Patrice Dumas, 2022/10/26
- Re: incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/26
- Re: incorrect @math spacing for PDF output with an empty macro, Patrice Dumas, 2022/10/26
- Re: incorrect @math spacing for PDF output with an empty macro, Vincent Lefevre, 2022/10/26
- Re: incorrect @math spacing for PDF output with an empty macro, Gavin Smith, 2022/10/26
- Re: behavior of @math with HTML output, Patrice Dumas, 2022/10/13