[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: @exdent in LaTeX
From: |
Gavin D. Smith |
Subject: |
branch master updated: @exdent in LaTeX |
Date: |
Sat, 06 Aug 2022 16:37:03 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new accd9e9cf2 @exdent in LaTeX
accd9e9cf2 is described below
commit accd9e9cf23f42c5165fd3beb6a91e2331cbd5d7
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Aug 6 21:36:43 2022 +0100
@exdent in LaTeX
* tp/Texinfo/Convert/LaTeX.pm (_convert) <@exdent>:
Output \noindent command or a negative kern depending on the context.
---
ChangeLog | 7 ++
tp/Texinfo/Convert/LaTeX.pm | 8 +-
.../res_parser/formatting_latex/formatting.tex | 110 ++++++++++++++++-----
3 files changed, 98 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1934ce7f5e..e538d88d60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-08-06 Gavin Smith <gavinsmith0123@gmail.com>
+
+ @exdent in LaTeX
+
+ * tp/Texinfo/Convert/LaTeX.pm (_convert) <@exdent>:
+ Output \noindent command or a negative kern depending on the context.
+
2022-08-06 Patrice Dumas <pertusus@free.fr>
Use encoded characters in plain text from HTML if not ascii
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index b1614b5501..7e66ec2026 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -28,8 +28,6 @@
#\tableofcontents
#}
#
-# @exdent is not implemented
-#
# flushleft and flushright
# the flushleft and flushright in Texinfo are not the same as in
# LaTeX, as, in addition to come from a possibly different margin,
@@ -118,6 +116,8 @@
# output, but the description of quote does not really match with what is
# supposed to be the @quotation output.
#
+# Proper indenting of nested environments, @exdent from nested environment
+#
#
# CAN WAIT
#
@@ -3273,9 +3273,13 @@ sub _convert($$)
return $result;
} elsif ($cmdname eq 'exdent') {
if
(scalar(@{$self->{'formatting_context'}->[-1]->{'preformatted_context'}})) {
+ $result .= '\\noindent ';
$result .= $self->_convert({'contents' =>
$element->{'args'}->[0]->{'contents'}})."\n";
} else {
+ $result .= "\\\\\n";
+ $result .= "\\hbox{\\kern -\\leftmargin}%\n";
$result .= $self->_convert({'contents' =>
$element->{'args'}->[0]->{'contents'}})."\n";
+ $result .= "\\\\\n";
}
return $result;
} elsif ($cmdname eq 'verbatiminclude') {
diff --git a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
index 0f65aff5cd..163b556de3 100644
--- a/tp/tests/layout/res_parser/formatting_latex/formatting.tex
+++ b/tp/tests/layout/res_parser/formatting_latex/formatting.tex
@@ -498,24 +498,39 @@ indent in quotation
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line and dash --- in quotation
+\\
\end{quote}
\begin{quote}
Not exdented followed by exdented
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
Followed by not exdented
\end{quote}
\begin{quote}
quotation1
+\\
+\hbox{\kern -\leftmargin}%
in exdented protected eol \ {}
+\\
following
+\\
+\hbox{\kern -\leftmargin}%
in exdented a @* \leavevmode{}\\ and following
+\\
after exdented
\end{quote}
@@ -649,16 +664,16 @@ example with empty and non empty args mix
Exam{-}{-}{-}ple
\endgroup{}%
-Other li---ne
+\noindent Other li---ne
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
not exdented
\endgroup{}%
-exdented and dash --- in example
+\noindent exdented and dash --- in example
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented one
\endgroup{}%
-exdented two
+\noindent exdented two
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented two
\endgroup{}%
@@ -669,7 +684,7 @@ Example Hoho.
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Nested Other line
\endgroup{}%
-exdented nested other line
+\noindent exdented nested other line
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily\footnotesize{}%
s{-}{-}mallexample
@@ -1826,24 +1841,39 @@ indent in quotation
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line and dash --- in quotation
+\\
\end{quote}
\begin{quote}
Not exdented followed by exdented
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
Followed by not exdented
\end{quote}
\begin{quote}
quotation1
+\\
+\hbox{\kern -\leftmargin}%
in exdented protected eol \ {}
+\\
following
+\\
+\hbox{\kern -\leftmargin}%
in exdented a @* \leavevmode{}\\ and following
+\\
after exdented
\end{quote}
@@ -1977,16 +2007,16 @@ example with empty and non empty args mix
Exam{-}{-}{-}ple
\endgroup{}%
-Other li---ne
+\noindent Other li---ne
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
not exdented
\endgroup{}%
-exdented and dash --- in example
+\noindent exdented and dash --- in example
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented one
\endgroup{}%
-exdented two
+\noindent exdented two
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented two
\endgroup{}%
@@ -1997,7 +2027,7 @@ Example Hoho.
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Nested Other line
\endgroup{}%
-exdented nested other line
+\noindent exdented nested other line
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily\footnotesize{}%
s{-}{-}mallexample
@@ -3175,24 +3205,39 @@ indent in quotation
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line and dash --- in quotation
+\\
\end{quote}
\begin{quote}
Not exdented followed by exdented
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
Followed by not exdented
\end{quote}
\begin{quote}
quotation1
+\\
+\hbox{\kern -\leftmargin}%
in exdented protected eol \ {}
+\\
following
+\\
+\hbox{\kern -\leftmargin}%
in exdented a @* \leavevmode{}\\ and following
+\\
after exdented
\end{quote}
@@ -3326,16 +3371,16 @@ example with empty and non empty args mix
Exam{-}{-}{-}ple
\endgroup{}%
-Other li---ne
+\noindent Other li---ne
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
not exdented
\endgroup{}%
-exdented and dash --- in example
+\noindent exdented and dash --- in example
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented one
\endgroup{}%
-exdented two
+\noindent exdented two
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented two
\endgroup{}%
@@ -3346,7 +3391,7 @@ Example Hoho.
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Nested Other line
\endgroup{}%
-exdented nested other line
+\noindent exdented nested other line
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily\footnotesize{}%
s{-}{-}mallexample
@@ -4502,24 +4547,39 @@ indent in quotation
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line and dash --- in quotation
+\\
\end{quote}
\begin{quote}
Not exdented followed by exdented
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
\end{quote}
\begin{quote}
+\\
+\hbox{\kern -\leftmargin}%
exdented quotation line
+\\
Followed by not exdented
\end{quote}
\begin{quote}
quotation1
+\\
+\hbox{\kern -\leftmargin}%
in exdented protected eol \ {}
+\\
following
+\\
+\hbox{\kern -\leftmargin}%
in exdented a @* \leavevmode{}\\ and following
+\\
after exdented
\end{quote}
@@ -4653,16 +4713,16 @@ example with empty and non empty args mix
Exam{-}{-}{-}ple
\endgroup{}%
-Other li---ne
+\noindent Other li---ne
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
not exdented
\endgroup{}%
-exdented and dash --- in example
+\noindent exdented and dash --- in example
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented one
\endgroup{}%
-exdented two
+\noindent exdented two
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented two
\endgroup{}%
@@ -4673,7 +4733,7 @@ Example Hoho.
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Nested Other line
\endgroup{}%
-exdented nested other line
+\noindent exdented nested other line
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily\footnotesize{}%
s{-}{-}mallexample
@@ -5925,7 +5985,7 @@ indent in quotation
\endgroup{}%
\begin{quote}
-exdented quotation line and dash --- in quotation
+\noindent exdented quotation line and dash --- in quotation
\end{quote}
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
@@ -5934,13 +5994,13 @@ exdented quotation line and dash --- in quotation
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented followed by exdented
\endgroup{}%
-exdented quotation line
+\noindent exdented quotation line
\end{quote}
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
\endgroup{}%
\begin{quote}
-exdented quotation line
+\noindent exdented quotation line
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Followed by not exdented
\endgroup{}%
@@ -5952,11 +6012,11 @@ Followed by not exdented
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
quotation1
\endgroup{}%
-in exdented protected eol \ {}
+\noindent in exdented protected eol \ {}
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
following
\endgroup{}%
-in exdented a @* \leavevmode{}\\ and following
+\noindent in exdented a @* \leavevmode{}\\ and following
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
after exdented
\endgroup{}%
@@ -6213,18 +6273,18 @@ example with empty and non empty args mix
Exam{-}{-}{-}ple
\endgroup{}%
-Other li---ne
+\noindent Other li---ne
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
not exdented
\endgroup{}%
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
\endgroup{}%
-exdented and dash --- in example
+\noindent exdented and dash --- in example
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented one
\endgroup{}%
-exdented two
+\noindent exdented two
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Not exdented two
\endgroup{}%
@@ -6237,7 +6297,7 @@ Example Hoho.
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
Nested Other line
\endgroup{}%
-exdented nested other line
+\noindent exdented nested other line
\par\begingroup\obeylines\obeyspaces\frenchspacing\leftskip=2em \parskip=0pt
\parindent=0pt \ttfamily{}%
\endgroup{}%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: @exdent in LaTeX,
Gavin D. Smith <=