texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/Convert/LaTeX.pm: use Texinfo::Commo


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/LaTeX.pm: use Texinfo::Common::document_settable_at_commands for informatinve commands. Do not consider ignored commands in preamble commands.
Date: Sun, 02 Jan 2022 08:14:33 -0500

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 ea4f17c1ec * tp/Texinfo/Convert/LaTeX.pm: use 
Texinfo::Common::document_settable_at_commands for informatinve commands. Do 
not consider ignored commands in preamble commands.
ea4f17c1ec is described below

commit ea4f17c1ec79cc7b040e9d1344dfcf20d3ee55dd
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 2 14:14:20 2022 +0100

    * tp/Texinfo/Convert/LaTeX.pm: use 
Texinfo::Common::document_settable_at_commands
    for informatinve commands.
    Do not consider ignored commands in preamble commands.
---
 ChangeLog                                                  |  6 ++++++
 tp/Texinfo/Convert/LaTeX.pm                                | 14 +++-----------
 tp/tests/layout/res_parser/formatting_latex/formatting.tex |  4 ++--
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d4ff0e307b..71b9e57c94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-01-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/LaTeX.pm: use 
Texinfo::Common::document_settable_at_commands
+       for informatinve commands.
+       Do not consider ignored commands in preamble commands.
+
 2022-01-02  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/LaTeX.pm (_convert): simpler formatting of
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 6a72089fde..933d47c044 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -201,15 +201,8 @@ my %paper_geometry_commands = (
   'smallbook' => 'paperheight=9.25in,paperwidth=7in',
 );
 
-my @informative_global_commands = ('paragraphindent', 'firstparagraphindent',
-'frenchspacing', 'documentencoding', 'footnotestyle', 'documentlanguage',
-'contents', 'shortcontents', 'summarycontents', 'deftypefnnewline',
-'allowcodebreaks', 'kbdinputstyle', 'setchapternewpage', 'headings',
-'xrefautomaticsectiontitle', 'fonttextsize', 'pagesizes', 
sort(keys(%paper_geometry_commands))
-);
-
 my %informative_commands;
-foreach my $informative_command (@informative_global_commands) {
+foreach my $informative_command (keys 
(%Texinfo::Common::document_settable_at_commands)) {
   $informative_commands{$informative_command} = 1;
 }
 
@@ -248,7 +241,7 @@ my %preamble_commands = %Texinfo::Common::preamble_commands;
 delete $preamble_commands{'titlepage'};
 delete $preamble_commands{'shorttitlepage'};
 
-foreach my $kept_command (@informative_global_commands,
+foreach my $kept_command (keys(%informative_commands),
   keys(%default_index_commands),
   keys(%headings_specification_commands), keys(%in_heading_commands),
   keys(%formattable_misc_commands),
@@ -974,8 +967,7 @@ sub output($$)
     while (scalar(@first_element_contents)) {
       my $content = $first_element_contents[0];
       if (($content->{'cmdname'}
-           and not $preamble_commands{$content->{'cmdname'}}
-           and not $self->{'ignored_commands'}->{$content->{'cmdname'}})
+           and not $preamble_commands{$content->{'cmdname'}})
           or ($content->{'type'} and $content->{'type'} eq 'paragraph')) {
         last;
       }
diff --git a/tp/tests/layout/res_parser/formatting_latex/formatting.tex 
b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
index 347753c524..e19ead8734 100644
--- a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
+++ b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
@@ -119,13 +119,13 @@ roundcorner=10pt}
 \pagestyle{empty}%
 
 
+\begin{document}
 
+\GNUTexinfofrontmatter
 
 
 
-\begin{document}
 
-\GNUTexinfofrontmatter
 \begin{titlepage}
 \begingroup
 \newskip\titlepagetopglue \titlepagetopglue = 1.5in



reply via email to

[Prev in Thread] Current Thread [Next in Thread]