summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3prefixes.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/l3kernel/l3prefixes.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3prefixes.tex')
-rw-r--r--macros/latex/contrib/l3kernel/l3prefixes.tex83
1 files changed, 83 insertions, 0 deletions
diff --git a/macros/latex/contrib/l3kernel/l3prefixes.tex b/macros/latex/contrib/l3kernel/l3prefixes.tex
new file mode 100644
index 0000000000..06b58ea660
--- /dev/null
+++ b/macros/latex/contrib/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