[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Avoid empty line in @*table inter item formatting
From: |
Patrice Dumas |
Subject: |
branch master updated: Avoid empty line in @*table inter item formatting |
Date: |
Thu, 11 Aug 2022 08:09:01 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new ee6be3525b Avoid empty line in @*table inter item formatting
ee6be3525b is described below
commit ee6be3525b2960ba5073ea1fce51dccb264ea941
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Aug 11 14:08:50 2022 +0200
Avoid empty line in @*table inter item formatting
* tp/Texinfo/Convert/LaTeX.pm (_convert): ignore empty
lines if 'nr_table_items_context' is set, as the inter item
is formatted in a parbox which cannot contain paragraphs
and therefore cannot contain empty lines.
---
ChangeLog | 9 +++++++++
tp/Texinfo/Convert/LaTeX.pm | 16 ++++++++++------
.../res_latex/inter_item_commands_in_table.tex | 2 --
.../inter_item_commands_in_table_in_example.tex | 1 -
.../indices_in_begin_tables_lists.tex | 2 --
.../indices_in_begin_tables_lists.tex | 2 --
6 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 51337eefa8..3df8c4edd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-08-11 Patrice Dumas <pertusus@free.fr>
+
+ Avoid empty line in @*table inter item formatting
+
+ * tp/Texinfo/Convert/LaTeX.pm (_convert): ignore empty
+ lines if 'nr_table_items_context' is set, as the inter item
+ is formatted in a parbox which cannot contain paragraphs
+ and therefore cannot contain empty lines.
+
2022-08-11 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Common.pm (output_files_open_out): return an
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 51f53e34b7..0fc342984c 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -34,8 +34,6 @@
# the text is not filled at all in Texinfo, each line is left as is.
# LaTeX flushleft and flushright are filled but not aligned.
#
-# indentation in @example, @display... still needs to be done
-#
# @group should also be added together with the non filled environments.
#
# Texinfo TeX leaves more space for the category on the right
@@ -76,9 +74,6 @@
#
# in @deftype* arguments, spaces after a punctuation mark is stretched
#
-# empty line in xtable inter_item_commands_in_table_in_example test leads
-# to ! Paragraph ended before \@item was complete.
-#
#
# RELEVANT BUT NOT DECISIVE
#
@@ -2278,7 +2273,16 @@ sub _convert($$)
}
if ($type and ($type eq 'empty_line')) {
- return "\n";
+ # if nr_table_items_context the whole @item/@itemx formatting
+ # is put in a parbox, in which there should not be paragraphs,
+ # so we remove empty lines.
+ # FIXME this conditions is probably checked a lot in a document
+ # formatting may be better to avoid.
+ if
(scalar(@{$self->{'formatting_context'}->[-1]->{'nr_table_items_context'}})) {
+ return '';
+ } else {
+ return "\n";
+ }
}
# FIXME same as ignoring. Handle with @def*
if ($type and ($type eq 'after_description_line')) {
diff --git
a/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
b/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
index ffe04e05f4..95a0b7e0ea 100644
---
a/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
+++
b/tp/t/results/xtable/inter_item_commands_in_table/res_latex/inter_item_commands_in_table.tex
@@ -109,8 +109,6 @@ l--ine
\item[{\parbox[b]{\linewidth}{%
\GNUTexinfocommandstyletextvar{c}\\
\index[fn]{c@\texttt{c}}%
-
-
\GNUTexinfocommandstyletextvar{d}
\index[fn]{d@\texttt{d}}%
}}]
diff --git
a/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
b/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
index c01cf307fc..6d0490676b 100644
---
a/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
+++
b/tp/t/results/xtable/inter_item_commands_in_table_in_example/res_latex/inter_item_commands_in_table_in_example.tex
@@ -75,7 +75,6 @@
\GNUTexinfocommandstyletextvar{a--b}\\
\index[cp]{index entry between item and itemx}%
\GNUTexinfocommandstyletextvar{b}\\
-
\GNUTexinfocommandstyletextvar{c}}}]
\begin{GNUTexinfopreformatted}
\leftskip=2em\relax\ttfamily%
diff --git
a/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
b/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
index 7bb5dffafa..c0ce349c3e 100644
---
a/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
+++
b/tp/tests/indices/res_parser/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
@@ -166,8 +166,6 @@ l--ine
\item[{\parbox[b]{\linewidth}{%
\GNUTexinfocommandstyletextvar{c}\\
\index[fn]{c@\texttt{c}}%
-
-
\GNUTexinfocommandstyletextvar{d}
\index[fn]{d@\texttt{d}}%
}}]
diff --git
a/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
b/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
index 7bb5dffafa..c0ce349c3e 100644
---
a/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
+++
b/tp/tests/indices/res_parser_info/indices_in_begin_tables_lists_latex/indices_in_begin_tables_lists.tex
@@ -166,8 +166,6 @@ l--ine
\item[{\parbox[b]{\linewidth}{%
\GNUTexinfocommandstyletextvar{c}\\
\index[fn]{c@\texttt{c}}%
-
-
\GNUTexinfocommandstyletextvar{d}
\index[fn]{d@\texttt{d}}%
}}]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Avoid empty line in @*table inter item formatting,
Patrice Dumas <=