[latex3-commits] [l3svn] 03/03: l3doc: add an l3packages/l3doc subdir

noreply at latex-project.org noreply at latex-project.org
Sun Nov 12 03:09:31 CET 2017


This is an automated email from the git hooks/post-receive script.

will pushed a commit to branch master
in repository l3svn.

commit b79aa4ee7c0a38fef64311c965b5337a39c91666
Author: Will Robertson <wspr81 at gmail.com>
Date:   Sun Nov 12 12:36:54 2017 +1030

    l3doc: add an l3packages/l3doc subdir
    
    I haven't moved over the .dtx file from l3kernel but I'm not against the idea.
    
    The main reason was to allow for some standalone test files and "example" files for testing purposes.
---
 l3packages/l3doc/build.lua            |   26 ++++++++
 l3packages/l3doc/examples/basics.dtx  |  113 +++++++++++++++++++++++++++++++++
 l3packages/l3doc/examples/build.lua   |    9 +++
 l3packages/l3doc/testfiles/basics.lvt |  107 +++++++++++++++++++++++++++++++
 l3packages/l3doc/testfiles/basics.tlg |    5 ++
 5 files changed, 260 insertions(+)

diff --git a/l3packages/l3doc/build.lua b/l3packages/l3doc/build.lua
new file mode 100644
index 0000000..9ea32cf
--- /dev/null
+++ b/l3packages/l3doc/build.lua
@@ -0,0 +1,26 @@
+#!/usr/bin/env texlua
+
+-- Build script for LaTeX3 "l3doc" files
+
+-- Identify the bundle and module: the module may be empty in the case where
+-- there is no subdivision
+bundle = "l3packages"
+module = "l3doc"
+
+-- Location of main directory: use Unix-style path separators
+maindir = "../.."
+
+-- Load the common build code
+dofile(maindir .. "/build-config.lua")
+
+installfiles = "*.cls"
+
+checkdeps = {maindir .. "/l3packages/xparse"}
+
+checkruns    = 2
+checksearch  = true
+recordstatus = true
+
+-- Find and run the build system
+kpse.set_program_name("kpsewhich")
+dofile(kpse.lookup("l3build.lua"))
diff --git a/l3packages/l3doc/examples/basics.dtx b/l3packages/l3doc/examples/basics.dtx
new file mode 100644
index 0000000..006169f
--- /dev/null
+++ b/l3packages/l3doc/examples/basics.dtx
@@ -0,0 +1,113 @@
+
+% \iffalse
+%<*driver>
+\documentclass[full]{l3doc}
+\begin{document}
+\DocInput{\jobname.dtx}
+\clearpage
+\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \title{Example l3doc document}
+% \author{The \LaTeX3 Project}
+%
+% \maketitle
+%
+% \begin{documentation}
+%
+% \section{Documentation}
+%
+% \begin{function}{\ProcessKeysOptions}
+%   \begin{syntax}
+%     \cs{ProcessKeysOptions} \Arg{module}
+%   \end{syntax}
+%   This function is used to check the current
+%   option list against the keys defined for \Arg{module}. Global (class)
+%   options and local (package) options are checked when this function
+%   is called in a package. Each option which does match a key name is
+%   then used to attempt to set the appropriate key using
+%   \cs{keys_set:nn}. For example, the option defined earlier would be
+%   processed by the line
+%   \begin{verbatim}
+%     \ProcessKeysOptions { module }
+%   \end{verbatim}
+% \end{function}
+%
+% \begin{function}{\l_@@_latexe_options_clist}
+%   An internal variable.
+%   Here is a reference to \cs{bool_set_false:N}.
+% \end{function}
+%
+%\end{documentation}
+%
+% \clearpage
+%
+%\begin{implementation}
+%
+%\section{Implementation}
+%
+%    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ProvidesExplPackage{l3keys2e}{2017/09/18}{}
+  {LaTeX2e option processing using LaTeX3 keys}
+%    \end{macrocode}
+%
+% Non-standard variants.
+%    \begin{macrocode}
+\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
+\cs_generate_variant:Nn \keys_if_exist:nnT  { nx }
+\cs_generate_variant:Nn \keys_if_exist:nnTF { nx }
+%    \end{macrocode}
+%
+% \begin{macro}{\l_@@_latexe_options_clist}
+%   A single list is used for all options, into which they are collected
+%   before processing.
+%    \begin{macrocode}
+\clist_new:N \l_@@_latexe_options_clist
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_process_class_bool}
+%   A flag to indicate that class options should be processed for
+%   packages.
+%    \begin{macrocode}
+\bool_new:N \l_@@_process_class_bool
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ProcessKeysOptions}
+% \begin{macro}{\ProcessKeysPackageOptions}
+%   The user macro are simply wrappers around the internal process. In
+%   contrast to other similar packages, the module name is always required
+%   here.
+%    \begin{macrocode}
+\cs_new_protected:Npn \ProcessKeysOptions #1
+  {
+    \bool_set_true:N \l_@@_process_class_bool
+    \@@_latexe_options:n {#1}
+  }
+\cs_new_protected:Npn \ProcessKeysPackageOptions #1
+  {
+    \bool_set_false:N \l_@@_process_class_bool
+    \@@_latexe_options:n {#1}
+  }
+\@onlypreamble \ProcessKeysOptions
+\@onlypreamble \ProcessKeysPackageOptions
+%    \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+% \end{implementation}
+%
+%
+\endinput
\ No newline at end of file
diff --git a/l3packages/l3doc/examples/build.lua b/l3packages/l3doc/examples/build.lua
new file mode 100644
index 0000000..e8b7739
--- /dev/null
+++ b/l3packages/l3doc/examples/build.lua
@@ -0,0 +1,9 @@
+#!/usr/bin/env texlua
+
+-- Build script for LaTeX3 "l3doc" example files
+
+module = "l3doc-examples"
+
+-- Find and run the build system
+kpse.set_program_name("kpsewhich")
+dofile(kpse.lookup("l3build.lua"))
diff --git a/l3packages/l3doc/testfiles/basics.lvt b/l3packages/l3doc/testfiles/basics.lvt
new file mode 100644
index 0000000..ba5804a
--- /dev/null
+++ b/l3packages/l3doc/testfiles/basics.lvt
@@ -0,0 +1,107 @@
+
+% \iffalse
+%<*driver>
+\input{regression-test}
+\START\OMIT
+\documentclass[full]{l3doc}
+\begin{document}
+\DocInput{\jobname.lvt}
+\PrintIndex
+\TIMO
+\TYPE{Test loading and basic functionality. No logging output expected.}
+\END
+\end{document}
+%</driver>
+% \fi
+%
+% \title{Example l3doc document}
+% \author{The \LaTeX3 Project}
+%
+% \maketitle
+%
+% \begin{documentation}
+%
+% \section{Documentation}
+%
+% \begin{function}{\ProcessKeysOptions}
+%   \begin{syntax}
+%     \cs{ProcessKeysOptions} \Arg{module}
+%   \end{syntax}
+%   The \cs{ProcessKeysOptions} function is used to check the current
+%   option list against the keys defined for \Arg{module}. Global (class)
+%   options and local (package) options are checked when this function
+%   is called in a package. Each option which does match a key name is
+%   then used to attempt to set the appropriate key using
+%   \cs{keys_set:nn}. For example, the option defined earlier would be
+%   processed by the line
+%   \begin{verbatim}
+%     \ProcessKeysOptions { module }
+%   \end{verbatim}
+% \end{function}
+%
+%\end{documentation}
+%
+%\begin{implementation}
+%
+%\section{Implementation}
+%
+%    \begin{macrocode}
+%<*package>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ProvidesExplPackage{l3keys2e}{2017/09/18}{}
+  {LaTeX2e option processing using LaTeX3 keys}
+%    \end{macrocode}
+%
+% Non-standard variants.
+%    \begin{macrocode}
+\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
+\cs_generate_variant:Nn \keys_if_exist:nnT  { nx }
+\cs_generate_variant:Nn \keys_if_exist:nnTF { nx }
+%    \end{macrocode}
+%
+% \begin{macro}{\l_@@_latexe_options_clist}
+%   A single list is used for all options, into which they are collected
+%   before processing.
+%    \begin{macrocode}
+\clist_new:N \l_@@_latexe_options_clist
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_process_class_bool}
+%   A flag to indicate that class options should be processed for
+%   packages.
+%    \begin{macrocode}
+\bool_new:N \l_@@_process_class_bool
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ProcessKeysOptions}
+% \begin{macro}{\ProcessKeysPackageOptions}
+%   The user macro are simply wrappers around the internal process. In
+%   contrast to other similar packages, the module name is always required
+%   here.
+%    \begin{macrocode}
+\cs_new_protected:Npn \ProcessKeysOptions #1
+  {
+    \bool_set_true:N \l_@@_process_class_bool
+    \@@_latexe_options:n {#1}
+  }
+\cs_new_protected:Npn \ProcessKeysPackageOptions #1
+  {
+    \bool_set_false:N \l_@@_process_class_bool
+    \@@_latexe_options:n {#1}
+  }
+\@onlypreamble \ProcessKeysOptions
+\@onlypreamble \ProcessKeysPackageOptions
+%    \end{macrocode}
+%\end{macro}
+%\end{macro}
+%
+%
+%    \begin{macrocode}
+%</package>
+%    \end{macrocode}
+%
+% \end{implementation}
diff --git a/l3packages/l3doc/testfiles/basics.tlg b/l3packages/l3doc/testfiles/basics.tlg
new file mode 100644
index 0000000..8d2b56e
--- /dev/null
+++ b/l3packages/l3doc/testfiles/basics.tlg
@@ -0,0 +1,5 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Test loading and basic functionality. No logging output expected.
+***************
+Compilation 1 of test file completed with exit status 0Compilation 2 of test file completed with exit status 0
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list