[latex3-commits] [git/LaTeX3-latex3-latex3] xmarks: some late night thoughts ... maybe rubbish [ci skip] (0044d76)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Nov 22 14:09:19 CET 2018


Repository : https://github.com/latex3/latex3
On branch  : xmarks
Link       : https://github.com/latex3/latex3/commit/0044d76c6809b9166e7ee30a0da82b52a8c48c27

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

commit 0044d76c6809b9166e7ee30a0da82b52a8c48c27
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Nov 22 00:41:56 2018 +0100

    some late night thoughts ... maybe rubbish [ci skip]


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

0044d76c6809b9166e7ee30a0da82b52a8c48c27
 l3trial/xmarks/testfiles/xmarks-001.tlg |    1 +
 l3trial/xmarks/testfiles/xmarks-003.tlg |    1 +
 l3trial/xmarks/testfiles/xmarks-005.tlg |    3 +++
 l3trial/xmarks/xmarks2.dtx              |   14 +++++++++++---
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/l3trial/xmarks/testfiles/xmarks-001.tlg b/l3trial/xmarks/testfiles/xmarks-001.tlg
index af31ab7..58de835 100644
--- a/l3trial/xmarks/testfiles/xmarks-001.tlg
+++ b/l3trial/xmarks/testfiles/xmarks-001.tlg
@@ -5,6 +5,7 @@ Marks: new mark: bar on line ...
 Marks: set foo <- 'figure' on line ...
 Marks: set ltxright <- '\protect \MakeUppercase  {1\hskip 1em\relax A test}' on line ...
 Marks: set ltxrightnonempty <- '\protect \MakeUppercase  {1\hskip 1em\relax A test}' on line ...
+Marks: set ltxleft <- '' on line ...
 Marks: set foo <- 'first foo' on line ...
 OR: (oneside) ltxleft:
     page (current):||||
diff --git a/l3trial/xmarks/testfiles/xmarks-003.tlg b/l3trial/xmarks/testfiles/xmarks-003.tlg
index f858080..828c20b 100644
--- a/l3trial/xmarks/testfiles/xmarks-003.tlg
+++ b/l3trial/xmarks/testfiles/xmarks-003.tlg
@@ -5,6 +5,7 @@ Marks: new mark: bar on line ...
 Marks: set foo <- 'figure' on line ...
 Marks: set ltxright <- '\protect \MakeUppercase  {1\hskip 1em\relax A test}' on line ...
 Marks: set ltxrightnonempty <- '\protect \MakeUppercase  {1\hskip 1em\relax A test}' on line ...
+Marks: set ltxleft <- '' on line ...
 Marks: set foo <- 'first foo' on line ...
 OR: (oneside first column) ltxleft:
     page (current):||||
diff --git a/l3trial/xmarks/testfiles/xmarks-005.tlg b/l3trial/xmarks/testfiles/xmarks-005.tlg
index 82ff206..5fcb969 100644
--- a/l3trial/xmarks/testfiles/xmarks-005.tlg
+++ b/l3trial/xmarks/testfiles/xmarks-005.tlg
@@ -4,10 +4,13 @@ Marks: set ltxleft <- '\protect \MakeUppercase  {1\hskip 1em\relax A}' on line .
 Marks: set ltxright <- '' on line ...
 Marks: set ltxright <- '1.1\hskip 1em\relax S-1' on line ...
 Marks: set ltxrightnonempty <- '1.1\hskip 1em\relax S-1' on line ...
+Marks: set ltxleft <- '\protect \MakeUppercase  {1\hskip 1em\relax A}' on line ...
 Marks: set ltxright <- '1.2\hskip 1em\relax S-2' on line ...
 Marks: set ltxrightnonempty <- '1.2\hskip 1em\relax S-2' on line ...
+Marks: set ltxleft <- '\protect \MakeUppercase  {1\hskip 1em\relax A}' on line ...
 Marks: set ltxright <- '1.3\hskip 1em\relax S-3' on line ...
 Marks: set ltxrightnonempty <- '1.3\hskip 1em\relax S-3' on line ...
+Marks: set ltxleft <- '\protect \MakeUppercase  {1\hskip 1em\relax A}' on line ...
 Marks: set ltxleft <- '\protect \MakeUppercase  {2\hskip 1em\relax B}' on line ...
 Marks: set ltxright <- '' on line ...
 OR: (twoside-even) ltxleft:
diff --git a/l3trial/xmarks/xmarks2.dtx b/l3trial/xmarks/xmarks2.dtx
index 9ea4188..499cf79 100644
--- a/l3trial/xmarks/xmarks2.dtx
+++ b/l3trial/xmarks/xmarks2.dtx
@@ -842,13 +842,21 @@
   {\typeout{\noexpand\markboth patch~ successful}}
   {\typeout{\noexpand\markboth patch~ failed}}
 %    \end{macrocode}
-%    Same game with \cs{markright} except that we only add one mark.    
+%    Same game with \cs{markright} more or less \ldots
 %    \begin{macrocode}
 \patchcmd\markright
     {\mark}
     {
-      \marks_put:nn{ltxright}{#1}
-      \tl_if_empty:nF{#1}{ \marks_put:nn{ltxrightnonempty}{#1} }
+     \marks_put:nn{ltxright}{#1}
+     \tl_if_empty:nF{#1}{ \marks_put:nn{ltxrightnonempty}{#1} }
+%    \end{macrocode}
+%    Not sure this is a good idea --- needs some further thoughts
+%    probably: We add here another ltxleft mark using the value it had
+%    before. This mimics the way \LaTeX{} currently handles its marks,
+%    i.e. if a sub-mark (ie right mark) is set the corresponding main
+%    mark also is getting a mark.
+%    \begin{macrocode}
+      \marks_put:nn{ltxleft}{\exp_after:wN \use_i:nn \@themark }
       \mark
     }
   {\typeout{\noexpand\markright patch~ successful}}





More information about the latex3-commits mailing list