[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] Problems with inconsistent indentation in a @table in
From: |
Gavin Smith |
Subject: |
Re: [help-texinfo] Problems with inconsistent indentation in a @table in an @itemize. |
Date: |
Sun, 10 Mar 2019 11:00:50 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Mar 06, 2019 at 06:52:16PM +0000, Alan Mackenzie wrote:
> Hello, Texinfo.
>
> In a part of the (Emacs) CC Mode manual, I'm now seeing this
> indentation in text built by makeinfo in Texinfo 6.6:
>
> Style
> File Style(2)
> Top-level command or "customization interface"
> Hook
> File Local Variable setting
>
> , where originally the following correct indentation was generated:
>
> Style
> File Style(2)
> Top-level command or "customization interface"
> Hook
> File Local Variable setting
>
> . The source which produces these snippets is:
Hello Alan, I have found a fix that produces a consistent indent
(although with a 5 space indent instead of 4.) It is commited as
git commit 9a5b20e. Please let us know if it suits your purposes.
(I can't say I completely understand the code, though, and what the
role of 'text_element_context' exactly is.)
I recommended using Texinfo constructs in a more conventional way, however.
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index d63a306..6e466c2 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -1376,6 +1376,7 @@ sub ensure_end_of_line($$)
$self->{'count_context'}->[-1]->{'lines'} -= 1;
}
$text .= "\n";
+ $self->{'text_element_context'}->[-1]->{'counter'} = 0;
_add_text_count($self, "\n");
_add_lines_count($self, 1);
return $text;