Vincent Lefevre wrote:
On 2022-10-14 21:42:27 +0100, Gavin Smith wrote:
[...]
In your use case, you can avoid line breaks using the @w command:

@deftypefun int f4 ()
@w{@math{@var{n} = -2}}.
@end deftypefun

If the @w ignored in math mode?

[...]

For PDF output, I want the spaces to be the usual ones that are
generated in math mode.

For TeX, Texinfo "@w{...}" is effectively TeX "\hbox{...}". The key to Gavin's example is that the @math{} is the argument to @w{}. This suppresses line breaks, but sets the expression in ordinary math mode, so the spaces will be the normal math spacing. In plain TeX, that line would be "\hbox{$\var{n} = -2$}" (assuming a \var macro as Texinfo defines) if that helps.


-- Jacob

Reply via email to