[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in dumpdef's documentation
From: |
Eric Blake |
Subject: |
Re: Bug in dumpdef's documentation |
Date: |
Tue, 26 Oct 2021 15:21:19 -0500 |
User-agent: |
NeoMutt/20211022-17-2c6998 |
On Tue, Oct 26, 2021 at 07:45:06PM +0200, Patrice Dumas wrote:
> > @c @tabchar{}
> > @c ----------
> > @c The testsuite expects literal tab output in some examples, but
> > @c literal tabs in texinfo lead to formatting issues.
> > @macro tabchar
> > @ @c
> > @end macro
> >
> > So maybe the problem is that the macro expansion is leaving a bare @c
> > which then eats the rest of the line when using the macro within
> > @example.
>
> It is indeed what happens, the expansion of the texinfo conserves the
> @c. (macro expansion can be tested with the -M option). So `Hello world.'
> and <define> disappear:
>
...
> One possibility is to add an end of line in the macro definition, which
> should work for texi2any:
>
> @c @tabchar{}
> @c ----------
> @c The testsuite expects literal tab output in some examples, but
> @c literal tabs in texinfo lead to formatting issues.
> @macro tabchar
> @ @c
>
> @end macro
>
> However, this needs to be tested with texi2pdf, as texi2pdf may need
> something else.
Yay, that did it! I tested info, html, and pdf output, and all of
them rendered the way I wanted once I added the newline (my worry was
an unexpected mid-line break appearing in the rendered example, but
thankfully that did not happen); and the testsuite still passed (it
extracts @examples from the manual, and uses sed to convert @tabchar{}
into a literal tab to match what m4 actually produces).
I'll commit the fix into m4.git shortly, although the online manual
won't be updated until the 1.4.20 release.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org