texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: LaTeX tests, add @verbatim in @smallformat


From: Patrice Dumas
Subject: branch master updated: LaTeX tests, add @verbatim in @smallformat
Date: Sun, 22 Aug 2021 07:19: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 0f077bd  LaTeX tests, add @verbatim in @smallformat
0f077bd is described below

commit 0f077bd02d19f9ac84d47074575230f069e56a10
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 22 13:18:30 2021 +0200

    LaTeX tests, add @verbatim in @smallformat
---
 tp/t/latex_tests.t                                 |  11 +-
 .../results/latex_tests/verbatim_in_smallformat.pl | 179 +++++++++++++++++++++
 .../res_latex/verbatim_in_smallformat.tex          |  75 +++++++++
 3 files changed, 264 insertions(+), 1 deletion(-)

diff --git a/tp/t/latex_tests.t b/tp/t/latex_tests.t
index 9a31be6..0cda8c9 100644
--- a/tp/t/latex_tests.t
+++ b/tp/t/latex_tests.t
@@ -424,7 +424,16 @@ In afourpaper reset
 @pagesizes , 130mm
 
 @pagesizes , 
-']
+'],
+['verbatim_in_smallformat',
+'@setfilename verbatim_in_smallformat.info
+
+@smallformat
+@verbatim
+... still verbatim, but in a smaller font ...
+@end verbatim
+@end smallformat
+'],
 );
 
 foreach my $test (@test_cases) {
diff --git a/tp/t/results/latex_tests/verbatim_in_smallformat.pl 
b/tp/t/results/latex_tests/verbatim_in_smallformat.pl
new file mode 100644
index 0000000..c53a221
--- /dev/null
+++ b/tp/t/results/latex_tests/verbatim_in_smallformat.pl
@@ -0,0 +1,179 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors 
+   %result_indices %result_sectioning %result_nodes %result_menus
+   %result_floats %result_converted %result_converted_errors 
+   %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'verbatim_in_smallformat'} = {
+  'contents' => [
+    {
+      'args' => [
+        {
+          'contents' => [
+            {
+              'parent' => {},
+              'text' => 'verbatim_in_smallformat.info'
+            }
+          ],
+          'extra' => {
+            'spaces_after_argument' => '
+'
+          },
+          'parent' => {},
+          'type' => 'line_arg'
+        }
+      ],
+      'cmdname' => 'setfilename',
+      'extra' => {
+        'spaces_before_argument' => ' ',
+        'text_arg' => 'verbatim_in_smallformat.info'
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 1,
+        'macro' => ''
+      },
+      'parent' => {}
+    },
+    {
+      'parent' => {},
+      'text' => '
+',
+      'type' => 'empty_line'
+    },
+    {
+      'cmdname' => 'smallformat',
+      'contents' => [
+        {
+          'extra' => {
+            'command' => {}
+          },
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line_after_command'
+        },
+        {
+          'cmdname' => 'verbatim',
+          'contents' => [
+            {
+              'extra' => {
+                'command' => {}
+              },
+              'parent' => {},
+              'text' => '
+',
+              'type' => 'empty_line_after_command'
+            },
+            {
+              'parent' => {},
+              'text' => '... still verbatim, but in a smaller font ...
+',
+              'type' => 'raw'
+            }
+          ],
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 4,
+            'macro' => ''
+          },
+          'parent' => {}
+        },
+        {
+          'parent' => {},
+          'text' => '
+',
+          'type' => 'empty_line_after_command'
+        },
+        {
+          'args' => [
+            {
+              'contents' => [
+                {
+                  'parent' => {},
+                  'text' => 'smallformat'
+                }
+              ],
+              'extra' => {
+                'spaces_after_argument' => '
+'
+              },
+              'parent' => {},
+              'type' => 'line_arg'
+            }
+          ],
+          'cmdname' => 'end',
+          'extra' => {
+            'command_argument' => 'smallformat',
+            'spaces_before_argument' => ' ',
+            'text_arg' => 'smallformat'
+          },
+          'line_nr' => {
+            'file_name' => '',
+            'line_nr' => 7,
+            'macro' => ''
+          },
+          'parent' => {}
+        }
+      ],
+      'extra' => {
+        'end_command' => {}
+      },
+      'line_nr' => {
+        'file_name' => '',
+        'line_nr' => 3,
+        'macro' => ''
+      },
+      'parent' => {}
+    }
+  ],
+  'type' => 'text_root'
+};
+$result_trees{'verbatim_in_smallformat'}{'contents'}[0]{'args'}[0]{'contents'}[0]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[0]{'args'}[0];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[0]{'args'}[0]{'parent'} = 
$result_trees{'verbatim_in_smallformat'}{'contents'}[0];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[0]{'parent'} = 
$result_trees{'verbatim_in_smallformat'};
+$result_trees{'verbatim_in_smallformat'}{'contents'}[1]{'parent'} = 
$result_trees{'verbatim_in_smallformat'};
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[0]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1]{'contents'}[0]{'extra'}{'command'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1]{'contents'}[0]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1]{'contents'}[1]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[1]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[2]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[3]{'args'}[0]{'contents'}[0]{'parent'}
 = 
$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[3]{'args'}[0];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[3]{'args'}[0]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[3];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[3]{'parent'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'extra'}{'end_command'}
 = $result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'contents'}[3];
+$result_trees{'verbatim_in_smallformat'}{'contents'}[2]{'parent'} = 
$result_trees{'verbatim_in_smallformat'};
+
+$result_texis{'verbatim_in_smallformat'} = '@setfilename 
verbatim_in_smallformat.info
+
+@smallformat
+@verbatim
+... still verbatim, but in a smaller font ...
+@end verbatim
+@end smallformat
+';
+
+
+$result_texts{'verbatim_in_smallformat'} = '
+... still verbatim, but in a smaller font ...
+';
+
+$result_errors{'verbatim_in_smallformat'} = [];
+
+
+$result_floats{'verbatim_in_smallformat'} = {};
+
+
+
+$result_converted{'latex'}->{'verbatim_in_smallformat'} = '
+\\par\\begingroup\\obeylines\\obeyspaces\\frenchspacing\\leftskip=2em\\relax\\parskip=0pt\\relax\\footnotesize{}%
+\\begin{verbatim}
+... still verbatim, but in a smaller font ...
+\\end{verbatim}
+\\endgroup{}%
+';
+
+1;
diff --git 
a/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
 
b/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
new file mode 100644
index 0000000..a6b1a34
--- /dev/null
+++ 
b/tp/t/results/latex_tests/verbatim_in_smallformat/res_latex/verbatim_in_smallformat.tex
@@ -0,0 +1,75 @@
+\documentclass{book}
+\usepackage{makeidx}\makeindex
+\usepackage{amsfonts}
+\usepackage{amsmath}
+\usepackage[gen]{eurosym}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{graphicx}
+\usepackage{needspace}
+\usepackage{etoolbox}
+\usepackage{fontsize}
+\usepackage{geometry}
+\usepackage{fancyhdr}
+\usepackage{float}
+% use hidelinks to remove boxes around links to be similar with Texinfo TeX
+\usepackage[hidelinks]{hyperref}
+\usepackage[utf8]{inputenc}
+
+% redefine the \mainmatter command such that it does not clear page
+% as if in double page
+\makeatletter
+\renewcommand\mainmatter{\clearpage\@mainmattertrue\pagenumbering{arabic}}
+\makeatother
+% add command aliases to use the same command in book and report
+\newcommand\GNUTexinfomainmatter{\mainmatter}
+\newcommand\GNUTexinfofrontmatter{\frontmatter}
+
+% command that does nothing used to help with substitutions in commands
+\newcommand{\GNUTexinfoplaceholder}[1]{}
+
+% called when setting single headers
+% use \nouppercase to match with Texinfo TeX style
+\newcommand{\GNUTexinfosetsingleheader}{\pagestyle{fancy}
+\fancyhf{}
+\lhead{\nouppercase{\leftmark}}
+\rhead{\thepage}
+}
+
+% called when setting double headers
+\newcommand{\GNUTexinfosetdoubleheader}[1]{\pagestyle{fancy}
+\fancyhf{}
+\fancyhead[LE,RO]{\thepage}
+\fancyhead[RE]{#1}
+\fancyhead[LO]{\nouppercase{\leftmark}}
+}
+
+% for part and chapter, which call \thispagestyle{plain}
+\fancypagestyle{plain}{ %
+ \fancyhf{}
+ \fancyhead[LE,RO]{\thepage}
+}
+
+% match Texinfo TeX style
+\renewcommand{\headrulewidth}{0pt}%
+
+% avoid pagebreak and headings setting for a sectionning command
+\newcommand{\GNUTexinfonopagebreakheading}[2]{\let\clearpage\relax 
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}
+
+
+\renewcommand{\includegraphics}[1]{\fbox{FIG #1}}
+
+% set default for @setchapternewpage
+\makeatletter
+\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{\GNUTexinfoplaceholder{setchapternewpage
 placeholder}\clearpage}{}{}
+\makeatother
+\GNUTexinfosetsingleheader{}%
+
+
+\begin{document}
+\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em\relax\parskip=0pt\relax\footnotesize{}%
+\begin{verbatim}
+... still verbatim, but in a smaller font ...
+\end{verbatim}
+\endgroup{}%
+\end{document}



reply via email to

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