[latex3-commits] [git/LaTeX3-latex3-latex3] xmarks: a bit more docu [ci skip] (7c73d49)
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/7c73d494615333bd42a2e34509bbacb802ea3986
>---------------------------------------------------------------
commit 7c73d494615333bd42a2e34509bbacb802ea3986
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Wed Nov 21 17:10:24 2018 +0100
a bit more docu [ci skip]
>---------------------------------------------------------------
7c73d494615333bd42a2e34509bbacb802ea3986
l3trial/xmarks/xmarks2.dtx | 100 +++++++++++++++++++++++++-------------------
1 file changed, 58 insertions(+), 42 deletions(-)
diff --git a/l3trial/xmarks/xmarks2.dtx b/l3trial/xmarks/xmarks2.dtx
index af479b6..9ea4188 100644
--- a/l3trial/xmarks/xmarks2.dtx
+++ b/l3trial/xmarks/xmarks2.dtx
@@ -429,7 +429,7 @@
\cs_new_protected:Npn \@@_new:n #1
{
%<*trace>
- \trace_marks:n { new~mark:~ #1 }
+ \@@_trace:n { new~mark:~ #1 }
%</trace>
\int_gincr:N \g_@@_class_int
\int_const:cn {c_@@_class_ #1 _int}{ \g_@@_class_int }
@@ -613,7 +613,7 @@
\cs_set_eq:NN \glossary \scan_stop:
\unrestored at protected@xdef \g_@@_tmp_tl {#2}
%<*trace>
- \trace_marks:n { set~#1~<-~ '\tl_to_str:V \g_@@_tmp_tl' }
+ \@@_trace:n { set~#1~<-~ '\tl_to_str:V \g_@@_tmp_tl' }
%</trace>
\tex_marks:D \use:c{c_@@_class_ #1 _int}
{
@@ -650,48 +650,52 @@
%
%
%
+% \begin{macro}{\marks_status:n}
% \begin{macro}{\marks_status:nn}
% Some simple tracing, should be changed \ldots
% \begin{macrocode}
- \cs_new:Npn \marks_status:n #1
- {
- \seq_map_inline:Nn \g_@@_types_seq { \marks_status:nn {#1} {##1} }
- }
-
- \cs_new:Npn \marks_status:nn #1#2
- {
- \int_compare:nNnT \tracingmarks > 1
- {
- \typeout{#1~ #2:}
- \typeout{\@spaces page~ (current):
- | \tl_use:c { g_@@_page_top_ #2 _tl }
- | \tl_use:c { g_@@_page_first_ #2 _tl }
- | \tl_use:c { g_@@_page_last_ #2 _tl } |}
- \typeout{\@spaces page~ (verso):
- | \tl_use:c { g_@@_verso_top_ #2 _tl }
- | \tl_use:c { g_@@_verso_first_ #2 _tl }
- | \tl_use:c { g_@@_verso_last_ #2 _tl } |}
- \typeout{\@spaces page~ (recto):
- | \tl_use:c { g_@@_recto_top_ #2 _tl }
- | \tl_use:c { g_@@_recto_first_ #2 _tl }
- | \tl_use:c { g_@@_recto_last_ #2 _tl } |}
-%
- \typeout{\@spaces column~ (current):
- | \tl_use:c { g_@@_col_top_ #2 _tl }
- | \tl_use:c { g_@@_col_first_ #2 _tl }
- | \tl_use:c { g_@@_col_last_ #2 _tl } |}
- \typeout{\@spaces column~ (first):
- | \tl_use:c { g_@@_1col_top_ #2 _tl }
- | \tl_use:c { g_@@_1col_first_ #2 _tl }
- | \tl_use:c { g_@@_1col_last_ #2 _tl } |}
- \typeout{\@spaces column~ (second):
- | \tl_use:c { g_@@_2col_top_ #2 _tl }
- | \tl_use:c { g_@@_2col_first_ #2 _tl }
- | \tl_use:c { g_@@_2col_last_ #2 _tl } |}
- }
+\cs_new:Npn \marks_status:n #1
+ {
+ \seq_map_inline:Nn \g_@@_types_seq { \marks_status:nn {#1} {##1} }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new:Npn \marks_status:nn #1#2
+ {
+ \int_compare:nNnT \tracingmarks > 1
+ {
+ \typeout{#1~ #2:}
+ \typeout{\@spaces page~ (current):
+ | \tl_use:c { g_@@_page_top_ #2 _tl }
+ | \tl_use:c { g_@@_page_first_ #2 _tl }
+ | \tl_use:c { g_@@_page_last_ #2 _tl } |}
+ \typeout{\@spaces page~ (verso):
+ | \tl_use:c { g_@@_verso_top_ #2 _tl }
+ | \tl_use:c { g_@@_verso_first_ #2 _tl }
+ | \tl_use:c { g_@@_verso_last_ #2 _tl } |}
+ \typeout{\@spaces page~ (recto):
+ | \tl_use:c { g_@@_recto_top_ #2 _tl }
+ | \tl_use:c { g_@@_recto_first_ #2 _tl }
+ | \tl_use:c { g_@@_recto_last_ #2 _tl } |}
+ %
+ \typeout{\@spaces column~ (current):
+ | \tl_use:c { g_@@_col_top_ #2 _tl }
+ | \tl_use:c { g_@@_col_first_ #2 _tl }
+ | \tl_use:c { g_@@_col_last_ #2 _tl } |}
+ \typeout{\@spaces column~ (first):
+ | \tl_use:c { g_@@_1col_top_ #2 _tl }
+ | \tl_use:c { g_@@_1col_first_ #2 _tl }
+ | \tl_use:c { g_@@_1col_last_ #2 _tl } |}
+ \typeout{\@spaces column~ (second):
+ | \tl_use:c { g_@@_2col_top_ #2 _tl }
+ | \tl_use:c { g_@@_2col_first_ #2 _tl }
+ | \tl_use:c { g_@@_2col_last_ #2 _tl } |}
+ }
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
%
%
@@ -722,16 +726,16 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\trace_marks:n, \trace_marks_internal:n}
+% \begin{macro}{\@@_trace:n, \@@_trace_internal:n}
% Two trace functions, one more verbose than the other.
% \begin{macrocode}
%<*trace>
-\cs_new_protected:Npn \trace_marks:n #1
+\cs_new_protected:Npn \@@_trace:n #1
{
\int_compare:nNnT \tracingmarks > 0
{ \iow_term:x { Marks:~#1~ \msg_line_context: } }
}
-\cs_new_protected:Npn \trace_marks_internal:n #1
+\cs_new_protected:Npn \@@_trace_internal:n #1
{
\int_compare:nNnT \tracingmarks > 1
{ \iow_term:x { Marks:~#1 } }
@@ -767,10 +771,19 @@
% \subsection{Designer-level interfaces}
%
%
+% \begin{macro}{\DeclareMarkType}
+% \begin{macro}{\PutMark}
+% \begin{macro}[EXP]{\PreviousMark, \FirstMark, \LastMark}
+% Largely simple copies: may change.
+% \begin{macrocode}
% \begin{macrocode}
\cs_new_eq:NN \DeclareMarkType \marks_new:n
\cs_new_eq:NN \PutMark \marks_put:nn
-
+% \end{macrocode}
+% The following commands take an optional argument that defaults to
+% page. There is no checking that the region is actually valid. If
+% not there is simply an empty return.
+% \begin{macrocode}
\NewExpandableDocumentCommand \FirstMark { O{page} m }
{ \marks_use_first:nn {#1}{#2} }
@@ -781,6 +794,9 @@
{ \marks_use_previous:nn {#1}{#2} }
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
%
More information about the latex3-commits
mailing list