summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-10-28 18:13:43 +0000
committerKarl Berry <karl@freefriends.org>2014-10-28 18:13:43 +0000
commit1eff88f8256fc97ff44035cfd29e162947e4fd67 (patch)
tree6692db9b3126e2d835a9b44cd06c4b6592b228db /Build
parent008767912be7e11cc539028818b0688a59d4e4a5 (diff)
[24.355]: deactivate enctex when reading \^^ab control sequences.
(Following full description from Petr is slightly edited for English). Date: Wed, 30 Jul 2014 10:08:40 +0200 From: Petr Olsak To: Karl Berry Consider this input file: ------------------------- \catcode`\{=1 \catcode`\}=2 \catcode`^=7 \mubyte A XY\endmubyte \mubytein=1 \mubyteout=0 \mubytelog=0 \def\a{\^^58YZ \XYZ XYZ} \show\a \end ------------------------- Then run pdftex -ini -enc ./file.tex The buggy behavior is: \a=macro: ->\AZ \AZ AZ. because encTeX's conversion XY -> A have to be done *before* tokenisation as the manual says. I.e., ^^58 -> X is done *after* encTeX's level and the good result would be: \a=macro: ->\XYZ \AZ AZ. The consequence of this curious bug is the question at http://tex.stackexchange.com/questions/191002/csplain-and-url-package-not-working-with-pdftex Removing this bug isn't trivial because of the bad concept of TeX source in \S 355 where is "goto start_cs" which returns the reading of the control sequence to the start and reads again. But the buffer includes the result of ^^ab conversion which is again transformed by encTeX. I decided to do only a simple correction which supposes that there are "normal" control sequences and two other types: with encTeX's output in their names or with ^^ab in their names. Mixing these types is still not allowed because the implementation needs new data structures and much code. IMHO: 1) probability of such mix is almost zero, 2) I don't want to add much code only because of a bad concept with "goto" in the TeX original code. The change is "robust" for the case where encTeX isn't in use, because there is the conditional "if mubyte_in>0" which is false when encTeX isn't activated. git-svn-id: svn://tug.org/texlive/trunk@35457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog4
-rw-r--r--Build/source/texk/web2c/enctex.ch7
2 files changed, 11 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 822cb9a225c..cac74597106 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-28 Karl Berry <karl@tug.org>
+
+ * enctex.ch: patch for \^^ab control sequences from Petr Olsak.
+
2014-09-25 Peter Breitenlohner <peb@mppmu.mpg.de>
* w2c/config.h: Bug fix: integer64 must always be a 64bit type,
diff --git a/Build/source/texk/web2c/enctex.ch b/Build/source/texk/web2c/enctex.ch
index 13ff30d1faf..c0f5bfe4fa5 100644
--- a/Build/source/texk/web2c/enctex.ch
+++ b/Build/source/texk/web2c/enctex.ch
@@ -315,6 +315,13 @@ begin
end;
@z
+@x [24.355] - encTeX: deactivated when reading such \^^ab control sequences
+ limit:=limit-d; first:=first-d;
+@y
+ limit:=limit-d; first:=first-d;
+ if mubyte_in>0 then mubyte_keep := k-loc;
+@z
+
@x [24.356] - encTeX: access the buffer via read_buffer
begin repeat cur_chr:=buffer[k]; cat:=cat_code(cur_chr); incr(k);
until (cat<>letter)or(k>limit);