[latex3-commits] [git/l3build] sourcedir: add examples/ with example file for tree structure (e2c46cf)
Will Robertson
will at wspr.io
Sun Dec 10 14:13:25 CET 2017
Repository : https://github.com/latex3/l3build
On branch : sourcedir
Link : https://github.com/latex3/l3build/commit/e2c46cf9740557f9dc97aabd86c87007c8baf13a
>---------------------------------------------------------------
commit e2c46cf9740557f9dc97aabd86c87007c8baf13a
Author: Will Robertson <will at wspr.io>
Date: Sun Dec 10 23:43:25 2017 +1030
add examples/ with example file for tree structure
>---------------------------------------------------------------
e2c46cf9740557f9dc97aabd86c87007c8baf13a
examples/README.md | 21 +++++++++++
examples/Simple-Tree/build.lua | 10 ++++++
examples/Simple-Tree/code/simple-tree.dtx | 50 ++++++++++++++++++++++++++
examples/Simple-Tree/code/simple-tree.ins | 6 ++++
examples/Simple-Tree/doc/simple-tree-doc.tex | 13 +++++++
5 files changed, 100 insertions(+)
diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..eeccdce
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,21 @@
+l3build: a testing and building system for LaTeX3
+=================================================
+
+Examples
+--------
+
+Each sub-directory here is a self-contained example of a package set up to use `l3build`.
+These are intended for both testing and documentation purposes.
+
+The examples are:
+
+| Example | Description |
+| --- | --- |
+| `Simple-Tree` | Demonstrates a simple package in a tree layout |
+
+
+-----
+
+Copyright (C) 2014-2017 The LaTeX3 Project <br />
+<http://latex-project.org/> <br />
+All rights reserved.
diff --git a/examples/Simple-Tree/build.lua b/examples/Simple-Tree/build.lua
new file mode 100755
index 0000000..5524c18
--- /dev/null
+++ b/examples/Simple-Tree/build.lua
@@ -0,0 +1,10 @@
+#!/usr/bin/env texlua
+
+module = "simple-tree"
+
+sourcefiledir = "code"
+docfiledir = "doc"
+typesetfiles = {"*.dtx","*.tex"}
+
+kpse.set_program_name("kpsewhich")
+dofile(kpse.lookup("l3build.lua"))
diff --git a/examples/Simple-Tree/code/simple-tree.dtx b/examples/Simple-Tree/code/simple-tree.dtx
new file mode 100644
index 0000000..0619a00
--- /dev/null
+++ b/examples/Simple-Tree/code/simple-tree.dtx
@@ -0,0 +1,50 @@
+% \iffalse
+%
+%<*driver>
+\ProvidesFile{simple-tree.dtx}
+%</driver>
+%<pkg>\ProvidesPackage{simple-tree}
+%<*pkg>
+ [2017/12/10 v0.1 Simple tree example]
+%</pkg>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \GetFileInfo{simple-tree.dtx}
+% \title{The \textsf{simple-tree} example}
+% \date{\filedate\qquad\fileversion}
+% \maketitle
+% \begin{abstract}
+% This is the implementation of the simple-tree example.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% In the simple-tree example, code is located in code/ and documentation is located in doc/.
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*pkg>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\typeout{Actually this isn't a real package!}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</pkg>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/examples/Simple-Tree/code/simple-tree.ins b/examples/Simple-Tree/code/simple-tree.ins
new file mode 100644
index 0000000..9255566
--- /dev/null
+++ b/examples/Simple-Tree/code/simple-tree.ins
@@ -0,0 +1,6 @@
+
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{pkg}}}
+\endbatchfile
diff --git a/examples/Simple-Tree/doc/simple-tree-doc.tex b/examples/Simple-Tree/doc/simple-tree-doc.tex
new file mode 100644
index 0000000..87f4812
--- /dev/null
+++ b/examples/Simple-Tree/doc/simple-tree-doc.tex
@@ -0,0 +1,13 @@
+\documentclass{article}
+
+\begin{document}
+
+\title{Documentation for simple tree example}
+\maketitle
+
+\section{Introduction}
+
+There's not much more to say right here.
+This is where the user documentation for the simple tree example goes.
+
+\end{document}
More information about the latex3-commits
mailing list