[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] @group => <pre>...</pre>?
From: |
Gavin Smith |
Subject: |
Re: [help-texinfo] @group => <pre>...</pre>? |
Date: |
Sat, 27 Apr 2019 18:38:12 +0100 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Sat, Apr 27, 2019 at 10:12:56AM +0200, Akim Demaille wrote:
> In HTML, I would have expected @address@hidden group to be ignored, but
> actually the result is:
>
> > <div class="example">
> > <pre class="example">$ <kbd>bison -Wmidrule-value mid.y</kbd>
> > </pre><pre class="example">mid.y:2.6-13: <b
> > style="color:purple">warning</b>: unset value: $$
> > 2 | exp: <b style="color:purple">{ a(); }</b> "b" { $$ = c(); } { d();
> > } "e" { f = $1; };
> > | <b style="color:purple">^~~~~~~~</b>
> > </pre><pre class="example">mid.y:2.19-31: <b
> > style="color:purple">warning</b>: unused value: $3
> > 2 | exp: { a(); } "b" <b style="color:purple">{ $$ = c(); }</b> { d();
> > } "e" { f = $1; };
> > | <b style="color:purple">^~~~~~~~~~~~~</b>
> > </pre></div>
>
>
> I don't understand why these <pre> are here.
It is as a result of the way the input is parsed and it would be hard to
change. (Each <pre> corresponds to a 'preformatted' element in the
parse tree of the document.)
> The problem is that, since they have the same class as the div, they inherit
> from the margins of the div. So the output looks like it has additional
> empty lines:
I am not sure if it is due to the element class. When I edited the HTML
to remove the element classes the result looked the same, with vertical
space between the <pre> elements (this is with the default CSS; it might
be different with the CSS for the Bison manual).
Just using a single @group within an @example and making it contain the
entire contents of the @example may give good enough results for printed
output. In fact, I would not use @group at all unless a bad break
actually occurs.
Another idea is to specify "pre.example {margin: 0em}", but I doubt that
is a very good idea.