[latex3-commits] [git/LaTeX3-latex3-latex3] master: added JAW comments (19e321047)

Frank Mittelbach frank.mittelbach at latex-project.org
Mon Jul 1 11:13:51 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/19e3210472ac10442b0681e2d9b4e895740852be

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

commit 19e3210472ac10442b0681e2d9b4e895740852be
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Jul 1 11:13:51 2019 +0200

    added JAW comments


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

19e3210472ac10442b0681e2d9b4e895740852be
 .gitignore                                         |  20 ++++++-------
 discussionpapers/2019-07-thoughts-on-hooks.pdf     | Bin 0 -> 273265 bytes
 ...-on-hooks.tex => 2019-07-thoughts-on-hooks.tex} |  31 ++++++++++++++++++++-
 3 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/.gitignore b/.gitignore
index 037602c2b..61db684e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,22 +5,18 @@ build/*
 
 *.pdf
 !*/testfiles/*.pdf
+!/discussionpapers/*.pdf
 
-xpackages/xfrontm/*.aux
-xpackages/xfrontm/*.bbl
-xpackages/xfrontm/*.idx
-xpackages/xfrontm/*.ilg
-xpackages/xfrontm/*.ind
-xpackages/xfrontm/*.lof
-xpackages/xfrontm/*.log
-xpackages/xfrontm/*.lot
-xpackages/xfrontm/*.toc
 *.*~
-*.toc
+
 *.aux
-*.log
-*.gz
+*.bbl
 *.glo
+*.gz
 *.hd
 *.idx
+*.ilg
+*.ind
+*.log
 *.out
+*.toc
diff --git a/discussionpapers/2019-07-thoughts-on-hooks.pdf b/discussionpapers/2019-07-thoughts-on-hooks.pdf
new file mode 100644
index 000000000..1fba3c4ea
Binary files /dev/null and b/discussionpapers/2019-07-thoughts-on-hooks.pdf differ
diff --git a/discussionpapers/2019-06-thoughts-on-hooks.tex b/discussionpapers/2019-07-thoughts-on-hooks.tex
similarity index 92%
rename from discussionpapers/2019-06-thoughts-on-hooks.tex
rename to discussionpapers/2019-07-thoughts-on-hooks.tex
index e24137732..6c2678e51 100644
--- a/discussionpapers/2019-06-thoughts-on-hooks.tex
+++ b/discussionpapers/2019-07-thoughts-on-hooks.tex
@@ -7,7 +7,7 @@
 %                        \and  
   \LaTeX{} Project Team}
 
-\date{2019-06-30}
+\date{2019-07-01}
 
 \newcounter{hook}
 \newcounter{config}
@@ -24,6 +24,10 @@
     \item[\textbf{Config (\theconfig):}]\textbf{#3} (#2/\textit{#1})}
    {\end{itemize}}
 
+\newenvironment{comment}[2][]  % initial / date
+               {\par[#1 #2]\itshape}
+               {\par}
+   
 \newcommand\cs[1]{\texttt{\textbackslash #1}}               
 \newcommand\pkg[1]{\texttt{#1}}
 
@@ -207,6 +211,31 @@ However, is this general enough or is more control needed?
 In short I'm not yet convinced that the distinction is useful, is it?
 If so how/why? Example please.
 
+\begin{comment}[JAW]{2019-07-01}
+  The starting point for the split is that it makes sense to namespace
+  document-wide hooks in one place: it does not really matter which
+  module adds them. That of course could be handled by
+\begin{verbatim}
+    \hook_new:nn { document } { name-of-hook }
+\end{verbatim}
+
+The second thing is that the next/all mechanism is redundant for such
+hooks. So I thought I'd just make a dedicated interface that did not
+have quite the same overhead.
+
+The third and perhaps most important thing is that document hooks can
+only be used once and this affects adding to them. If you look at
+current \cs{AtBeginDocument}, it can still be 'added to' after \cs{document},
+but is a simple \cs{@firstofone}. To do that, the hook needs to 'know'
+it's a one-shot. I was aiming for something similar, although I've
+currently gone for an error rather than silently dumping the
+tokens. My thinking is that
+\begin{verbatim}
+    \hook_use:nn { document } { name }
+    \hook_gpush:nnnn { document } { name } { pkg } { content }
+\end{verbatim}
+is going to be quite surprising.
+\end{comment}
 
 
 





More information about the latex3-commits mailing list