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 (_convert): add \le


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/LaTeX.pm (_convert): add \leavevmode{} for @exdent \\ to avoid an error.
Date: Sun, 14 Aug 2022 11:11:46 -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 03cc4b5103 * tp/Texinfo/Convert/LaTeX.pm (_convert): add \leavevmode{} 
for @exdent \\ to avoid an error.
03cc4b5103 is described below

commit 03cc4b5103d57099fa0ec7aa57261ca7a95cfb95
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 14 17:11:31 2022 +0200

    * tp/Texinfo/Convert/LaTeX.pm (_convert): add \leavevmode{}
    for @exdent \\ to avoid an error.
---
 ChangeLog                                          |  5 ++
 tp/Texinfo/Convert/LaTeX.pm                        |  5 +-
 .../res_parser/formatting_latex/formatting.tex     | 60 ++++++++--------------
 3 files changed, 29 insertions(+), 41 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f36ee7dd19..fed345eb87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-08-14  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/LaTeX.pm (_convert): add \leavevmode{}
+       for @exdent \\ to avoid an error.
+
 2022-08-14  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/LaTeX.pm: do not use EmbracMakeKnown,
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 53c23f4813..17d73e06d3 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -3253,7 +3253,10 @@ sub _convert($$)
         $result .= '\\noindent ';
         $result .= $self->_convert({'contents' => 
$element->{'args'}->[0]->{'contents'}})."\n";
       } else {
-        $result .= "\\\\\n";
+        # FIXME \leavevmode{} is added to avoid
+        # ! LaTeX Error: There's no line here to end.
+        # but it is not clearly correct
+        $result .= "\\leavevmode{}\\\\\n";
         $result .= "\\hbox{\\kern -\\leftmargin}%\n";
         $result .= $self->_convert({'contents' => 
$element->{'args'}->[0]->{'contents'}})."\n";
         $result .= "\\\\\n";
diff --git a/tp/tests/layout/res_parser/formatting_latex/formatting.tex 
b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
index 8c1eec61d3..45f1e7b4ba 100644
--- a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
+++ b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
@@ -506,7 +506,7 @@ indent in quotation
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line   and dash --- in quotation
 \\
@@ -514,14 +514,14 @@ exdented quotation line   and dash --- in quotation
 
 \begin{quote}
 Not exdented followed by exdented
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
@@ -530,12 +530,12 @@ Followed by not exdented
 
 \begin{quote}
 quotation1
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented protected eol \ {}
 \\
 following
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented a @* \leavevmode{}\\ and following
 \\
@@ -890,15 +890,11 @@ def--fn
 \end{tabularx}
 
 
-\EmbracMakeKnown{textbf}%
 \noindent\begin{tabularx}{\linewidth}{@{}Xr}
 \rightskip=5em plus 1 fill
 \hangindent=2em
 \noindent\texttt{a \EmbracOn{}\textnormal{\textsl{b c d e \textbf{f g} h 
i}}\EmbracOff{}}& [truc]
 \end{tabularx}
-\ExplSyntaxOn%
-\cs_undefine:N{\embrac_textbf:nn}\cs_undefine:N{\embrac_orig_textbf:n}\cs_undefine:N{\__embrac_textbf:n}%
-\ExplSyntaxOff%
 
 \index[fn]{a@\texttt{a}}%
 
@@ -2197,7 +2193,7 @@ indent in quotation
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line   and dash --- in quotation
 \\
@@ -2205,14 +2201,14 @@ exdented quotation line   and dash --- in quotation
 
 \begin{quote}
 Not exdented followed by exdented
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
@@ -2221,12 +2217,12 @@ Followed by not exdented
 
 \begin{quote}
 quotation1
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented protected eol \ {}
 \\
 following
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented a @* \leavevmode{}\\ and following
 \\
@@ -2581,15 +2577,11 @@ def--fn
 \end{tabularx}
 
 
-\EmbracMakeKnown{textbf}%
 \noindent\begin{tabularx}{\linewidth}{@{}Xr}
 \rightskip=5em plus 1 fill
 \hangindent=2em
 \noindent\texttt{a \EmbracOn{}\textnormal{\textsl{b c d e \textbf{f g} h 
i}}\EmbracOff{}}& [truc]
 \end{tabularx}
-\ExplSyntaxOn%
-\cs_undefine:N{\embrac_textbf:nn}\cs_undefine:N{\embrac_orig_textbf:n}\cs_undefine:N{\__embrac_textbf:n}%
-\ExplSyntaxOff%
 
 \index[fn]{a@\texttt{a}}%
 
@@ -3909,7 +3901,7 @@ indent in quotation
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line   and dash --- in quotation
 \\
@@ -3917,14 +3909,14 @@ exdented quotation line   and dash --- in quotation
 
 \begin{quote}
 Not exdented followed by exdented
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
@@ -3933,12 +3925,12 @@ Followed by not exdented
 
 \begin{quote}
 quotation1
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented protected eol \ {}
 \\
 following
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented a @* \leavevmode{}\\ and following
 \\
@@ -4293,15 +4285,11 @@ def--fn
 \end{tabularx}
 
 
-\EmbracMakeKnown{textbf}%
 \noindent\begin{tabularx}{\linewidth}{@{}Xr}
 \rightskip=5em plus 1 fill
 \hangindent=2em
 \noindent\texttt{a \EmbracOn{}\textnormal{\textsl{b c d e \textbf{f g} h 
i}}\EmbracOff{}}& [truc]
 \end{tabularx}
-\ExplSyntaxOn%
-\cs_undefine:N{\embrac_textbf:nn}\cs_undefine:N{\embrac_orig_textbf:n}\cs_undefine:N{\__embrac_textbf:n}%
-\ExplSyntaxOff%
 
 \index[fn]{a@\texttt{a}}%
 
@@ -5599,7 +5587,7 @@ indent in quotation
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line   and dash --- in quotation
 \\
@@ -5607,14 +5595,14 @@ exdented quotation line   and dash --- in quotation
 
 \begin{quote}
 Not exdented followed by exdented
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
 \end{quote}
 
 \begin{quote}
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 exdented quotation line
 \\
@@ -5623,12 +5611,12 @@ Followed by not exdented
 
 \begin{quote}
 quotation1
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented protected eol \ {}
 \\
 following
-\\
+\leavevmode{}\\
 \hbox{\kern -\leftmargin}%
 in exdented a @* \leavevmode{}\\ and following
 \\
@@ -5983,15 +5971,11 @@ def--fn
 \end{tabularx}
 
 
-\EmbracMakeKnown{textbf}%
 \noindent\begin{tabularx}{\linewidth}{@{}Xr}
 \rightskip=5em plus 1 fill
 \hangindent=2em
 \noindent\texttt{a \EmbracOn{}\textnormal{\textsl{b c d e \textbf{f g} h 
i}}\EmbracOff{}}& [truc]
 \end{tabularx}
-\ExplSyntaxOn%
-\cs_undefine:N{\embrac_textbf:nn}\cs_undefine:N{\embrac_orig_textbf:n}\cs_undefine:N{\__embrac_textbf:n}%
-\ExplSyntaxOff%
 
 \index[fn]{a@\texttt{a}}%
 
@@ -8053,15 +8037,11 @@ def{-}{-}fn
 \end{tabularx}
 
 
-\EmbracMakeKnown{textbf}%
 \noindent\begin{tabularx}{\linewidth}{@{}Xr}
 \rightskip=5em plus 1 fill
 \hangindent=2em
 \noindent\texttt{a \EmbracOn{}\textnormal{\textsl{b c d e \textbf{f g} h 
i}}\EmbracOff{}}& [truc]
 \end{tabularx}
-\ExplSyntaxOn%
-\cs_undefine:N{\embrac_textbf:nn}\cs_undefine:N{\embrac_orig_textbf:n}\cs_undefine:N{\__embrac_textbf:n}%
-\ExplSyntaxOff%
 
 \index[fn]{a@\texttt{a}}%
 



reply via email to

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