[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: normalize endlinechar for #286 (ac9a61ae)

David Carlisle d.p.carlisle at gmail.com
Thu Aug 13 22:31:03 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/ac9a61ae1a65727f5735c2fd735894f6e5d97a28

>---------------------------------------------------------------

commit ac9a61ae1a65727f5735c2fd735894f6e5d97a28
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Thu Aug 13 21:31:03 2020 +0100

    normalize endlinechar for #286


>---------------------------------------------------------------

ac9a61ae1a65727f5735c2fd735894f6e5d97a28
 required/graphics/changes.txt                                    | 6 +++++-
 required/graphics/graphics.dtx                                   | 3 +++
 required/graphics/testfiles/endlinechar-gh286.lvt                | 9 +++++++++
 .../graphics/testfiles/endlinechar-gh286.tlg                     | 2 ++
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/required/graphics/changes.txt b/required/graphics/changes.txt
index 73aaf870..1a3f8694 100644
--- a/required/graphics/changes.txt
+++ b/required/graphics/changes.txt
@@ -4,9 +4,13 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2020-08-13  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* graphics.dtx: Normalise \endlinechar while reading files gh/286
+
 2020-08-09  David Carlisle  <David.Carlisle at latex-project.org>
 
-	* Move viewport and trim code from graphicx to graphics.
+	* graphics.dtx: Move viewport and trim code from graphicx to graphics.
 
 2020-05-28  David Carlisle  <David.Carlisle at latex-project.org>
 
diff --git a/required/graphics/graphics.dtx b/required/graphics/graphics.dtx
index a964def2..2e2ff678 100644
--- a/required/graphics/graphics.dtx
+++ b/required/graphics/graphics.dtx
@@ -1474,9 +1474,12 @@
 %     {Allow TAB in DSC comments graphics/2587}
 % \changes{v1.0i}{1999/01/07}
 %     {Fix catcode of hyphen. graphics/2846}
+% \changes{v1.4b}{2020/08/09}
+%     {Normalise \cs{endlinechar} gh/286}
 %    \begin{macrocode}
   \catcode`\ 10 %
   \catcode`\^^I10 %
+  \endlinechar13 %
   \catcode\endlinechar5 %
   \@makeother\:%
   \@makeother\-%
diff --git a/required/graphics/testfiles/endlinechar-gh286.lvt b/required/graphics/testfiles/endlinechar-gh286.lvt
new file mode 100644
index 00000000..e438654e
--- /dev/null
+++ b/required/graphics/testfiles/endlinechar-gh286.lvt
@@ -0,0 +1,9 @@
+\documentclass{article}
+\input{test2e}
+\usepackage{graphicx}
+%should not error.
+\begin{document}
+\START
+{\endlinechar-1
+\includegraphics{foo.bar.eps}}
+\END
\ No newline at end of file
diff --git a/base/testfiles/github-0060.xetex.tlg b/required/graphics/testfiles/endlinechar-gh286.tlg
similarity index 63%
copy from base/testfiles/github-0060.xetex.tlg
copy to required/graphics/testfiles/endlinechar-gh286.tlg
index 1d0c6975..81a0c6fd 100644
--- a/base/testfiles/github-0060.xetex.tlg
+++ b/required/graphics/testfiles/endlinechar-gh286.tlg
@@ -1,2 +1,4 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+File: foo.bar.eps Graphic file (type eps)
+<foo.bar.eps>





More information about the latex3-commits mailing list.