[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: use \obeylines instead of \obeycr
From: |
Gavin D. Smith |
Subject: |
branch master updated: use \obeylines instead of \obeycr |
Date: |
Sun, 15 Aug 2021 06:11:35 -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 d9057a2 use \obeylines instead of \obeycr
d9057a2 is described below
commit d9057a22c36c0d99b4d4561c860ac583f674fa36
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Aug 15 11:11:15 2021 +0100
use \obeylines instead of \obeycr
---
tp/Texinfo/Convert/LaTeX.pm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index 3ea8959..fbdcd38 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -45,7 +45,8 @@
# LaTeX flushleft and flushright are filled but not aligned.
#
# Other non filled environments @example, @display... No similar
-# environment found in LaTeX. Basic implementation done with \obeycr.
+# environment found in LaTeX. Basic implementation done with \obeylines
+# from plain TeX.
#
# @group should also be done together with the non filled environments.
#
@@ -1543,13 +1544,14 @@ sub _convert($$)
if ($LaTeX_block_commands{$command}) {
$result .= "\\begin{".$LaTeX_block_commands{$command}."}\n";
} elsif ($preformatted_commands{$command}) {
- $result .= '\\par\\begingroup\\obeycr';
- # TODO how to indent block?
+ $result .= '\\par\\begingroup\\obeylines\\obeyspaces\\frenchspacing';
+ # TODO indent block correct amount
+ $result .= '\\leftskip=2em\\relax\\parskip=0pt\\relax';
if ($preformatted_code_commands{$command}) {
$result .= '\\ttfamily';
}
- $result .= '\\noindent{}';
+ $result .= '{}';
}
if ($block_raw_commands{$command}) {
push @{$self->{'style_context'}->[-1]->{'context'}}, 'raw';
@@ -2051,7 +2053,7 @@ sub _convert($$)
if ($LaTeX_block_commands{$command}) {
$result .= "\\end{".$LaTeX_block_commands{$command}."}\n";
} elsif ($preformatted_commands{$command}) {
- $result .= '\\endgroup{}'; # \obeycr
+ $result .= '\\endgroup{}'; # \obeylines
}
# as explained in the Texinfo manual start headers after titlepage
if ($command eq 'titlepage') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: use \obeylines instead of \obeycr,
Gavin D. Smith <=