[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add typeset version of l3prefixes (e6a9c6c)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Jun 11 11:26:37 CEST 2019


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

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

commit e6a9c6c6069e9550ae0d2d56d988b6b847b9dd67
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Jun 11 10:26:37 2019 +0100

    Add typeset version of l3prefixes


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

e6a9c6c6069e9550ae0d2d56d988b6b847b9dd67
 build-config.lua        |    2 +-
 l3kernel/build.lua      |    5 +--
 l3kernel/l3prefixes.tex |   83 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+), 3 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index 09952bb..bb235e5 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -23,7 +23,7 @@ unpacksuppfiles = unpacksuppfiles or {"docstrip.tex"}
 
 packtdszip  = true
 
-typesetcmds = typesetcmds or "\\AtBeginDocument{\\DisableImplementation}"
+typesetcmds = typesetcmds or "\\AtBeginDocument{\\csname DisableImplementation\\endcsname}"
 
 if checksearch == nil then
   checksearch = false
diff --git a/l3kernel/build.lua b/l3kernel/build.lua
index dcdf586..1d307ea 100644
--- a/l3kernel/build.lua
+++ b/l3kernel/build.lua
@@ -12,7 +12,7 @@ maindir = ".."
 -- Non-standard settings
 checkfiles   = {"l3names.def"}
 cleanfiles   = {"*.fmt", "*.log", "*.pdf", "*.zip"}
-docfiles     = {"source3body.tex"}
+docfiles     = {"source3body.tex", "l3prefixes.csv"}
 installfiles =
   {
     "l3dvipdfmx.def", "l3dvips.def", "l3dvisvgm.def", "l3pdfmode.def",
@@ -33,7 +33,8 @@ tagfiles     =
 typesetfiles =
   {
     "expl3.dtx", "l3docstrip.dtx","interface3.tex", "l3syntax-changes.tex",
-    "l3styleguide.tex", "l3term-glossary.tex", "source3.tex"
+    "l3styleguide.tex", "l3term-glossary.tex", "source3.tex",
+    "l3prefixes.tex"
   }
 typesetskipfiles = {"source3-body.tex"}
 typesetruns      = 3
diff --git a/l3kernel/l3prefixes.tex b/l3kernel/l3prefixes.tex
new file mode 100644
index 0000000..06b58ea
--- /dev/null
+++ b/l3kernel/l3prefixes.tex
@@ -0,0 +1,83 @@
+\iffalse meta-comment
+
+File:l3prefixes.tex
+
+Copyright (C) 2019 The LaTeX3 Project
+
+It may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this
+license or (at your option) any later version.  The latest version
+of this license is in the file
+
+   https://www.latex-project.org/lppl.txt
+
+This file is part of the "l3kernel bundle" (The Work in LPPL)
+and all files in that bundle must be distributed together.
+
+The released version of this bundle is available from CTAN.
+
+-----------------------------------------------------------------------
+
+The development version of the bundle can be found at
+
+   https://github.com/latex3/latex3
+
+for those people who are interested.
+
+\fi
+
+\documentclass{article}
+\usepackage{expl3}
+\usepackage{array}
+\usepackage{booktabs}
+\usepackage{longtable}
+\ExplSyntaxOn
+\cs_new_protected:Npn \__prefix_readi:w #1 " #2 " #3 \q_stop
+  {
+    \quark_if_nil:nTF {#2}
+      { \__prefix_readii:w #1 \q_stop }
+      { \__prefix_readi:w #1 {#2} #3 \q_stop }
+  }
+\cs_new_protected:Npn \__prefix_readii:w #1 , #2 , #3 , #4 \q_stop
+  { \__prefix_readiii:nnw {#1} {#3} #2 , \q_stop }
+\cs_new_protected:Npn \__prefix_readiii:nnw #1 #2 #3 , #4 \q_stop
+  {
+    \tl_put_right:Nn \l_tmpb_tl { #1 & #3 & #2 \\ }
+    \tl_if_blank:nF {#4}
+      { \clist_map_inline:nn {#4} { \tl_put_right:Nn \l_tmpb_tl { & ##1 \\ } } }
+  }
+\ior_new:N \l_tmpa_ior
+\ior_open:Nn \l_tmpa_ior { l3prefixes.csv }
+\ior_get:NN \l_tmpa_ior \l_tmpa_tl % Throw away
+\cs_new_protected:Npn \PrintTable
+  {
+    \tl_set:Nn \l_tmpb_tl
+      {
+        \begin { longtable } { @{} *{2}{>{\ttfamily}l} l @{} }
+        \toprule
+          \multicolumn{1}{@{}l}{Prefix}
+          & \multicolumn{1}{l@{}}{Module}
+          & Registrant \\
+        \midrule
+        \endhead
+        \bottomrule
+        \endfoot
+      }
+    \ior_map_inline:Nn \l_tmpa_ior
+      { \__prefix_readi:w ##1 " \q_nil " \q_stop }
+    \tl_put_right:Nn \l_tmpb_tl { \end { longtable } }
+    \tl_replace_all:Nnn \l_tmpb_tl { LaTeX3 } { \LaTeX3 }
+    \tl_use:N \l_tmpb_tl
+  }
+\ExplSyntaxOff
+\begin{document}
+
+This file lists the prefixes which have been registered with the \LaTeX{}
+team for use in \textsf{expl3} code. Programmers are invited to register their
+(public) prefix use by contacting the team. We recommend that short prefixes
+are avoided as there are a limited number of these very general names available.
+The file \texttt{l3prefixes.csv} contains more details on each module, for
+example any information on source repository or issue tracker.
+
+\PrintTable
+\end{document}
\ No newline at end of file





More information about the latex3-commits mailing list