texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: tp/t/test_utils.pl: -o latex use header formattin


From: Patrice Dumas
Subject: branch master updated: tp/t/test_utils.pl: -o latex use header formatting function
Date: Sun, 31 Jul 2022 07:31:34 -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 903f4cf8bd tp/t/test_utils.pl: -o latex use header formatting function
903f4cf8bd is described below

commit 903f4cf8bda3f67ddc7e785909fb6d7f9e569aaa
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jul 31 13:30:24 2022 +0200

    tp/t/test_utils.pl: -o latex use header formatting function
---
 tp/t/test_utils.pl | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index a4b57f3a08..c1ce17ffa5 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -166,17 +166,7 @@ my %outfile_preamble = (
 ', "</texinfo>\n"],
  # done dynamically for CSS
  'html_text' => \&output_preamble_postamble_html,
-# FIXME do dynamically
- 'latex' => ['\documentclass{book}
-\usepackage{makeidx}\makeindex
-\usepackage{amsfonts}
-\usepackage[gen]{eurosym}
-\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
-\begin{document}
-',
-'\end{document}
-']
+ 'latex' => \&output_preamble_postamble_latex,
 );
 
 my $arg_generate;
@@ -787,6 +777,21 @@ sub output_preamble_postamble_html($$)
   }
 }
 
+sub output_preamble_postamble_latex($$)
+{
+  my $converter = shift;
+  my $postamble = shift;
+
+  if ($postamble) {
+    return '\end{document}
+';
+  } else {
+    return $converter->_latex_header()
+       .'\begin{document}
+';
+  }
+}
+
 # Run a single test case.  Each test case is an array
 # [TEST_NAME, TEST_TEXT, PARSER_OPTIONS, CONVERTER_OPTIONS]
 sub test($$)



reply via email to

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