[latex3-commits] [l3svn] branch master updated: Remove "examples" dir [ci skip]
noreply at latex-project.org
noreply at latex-project.org
Mon Nov 2 15:45:26 CET 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
The following commit(s) were added to refs/heads/master by this push:
new 48d4a9e Remove "examples" dir [ci skip]
48d4a9e is described below
commit 48d4a9ee6e0e8cba009267ba0adafee0acafcacb
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Nov 2 14:44:46 2015 +0000
Remove "examples" dir [ci skip]
These are not really maintained and if required by the team are in the
version history.
---
README.md | 1 -
examples/l3keys.tex | 253 -------------------------------------------------
examples/l3precom.tex | 135 --------------------------
3 files changed, 389 deletions(-)
diff --git a/README.md b/README.md
index edcf627..8f5cdb9 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,6 @@ Documentation is found in:
* `articles`: discussion of LaTeX3 concepts by team members for
publication in [_TUGBoat_](http://www.tug.org/tugboat) or elsewhere.
-* `examples`: demonstration documents showing how to use LaTeX3 concepts.
* `news`: source for _LaTeX3 News_.
The repository also contains the directory `xpackages`. This
diff --git a/examples/l3keys.tex b/examples/l3keys.tex
deleted file mode 100644
index e48f755..0000000
--- a/examples/l3keys.tex
+++ /dev/null
@@ -1,253 +0,0 @@
-
-%% NB: this file needs updating and does not work with the current version of expl3!
-
-\documentclass{article}
-\usepackage[T1]{fontenc}
-\usepackage{expl3,lmodern,xparse}
-\usepackage[parfill]{parskip}
-
-% The document commands for using keys is very simple.
-
-\ExplSyntaxOn
-\DeclareDocumentCommand \SetModuleKeys { m } {
- \keys_set:nn { module } {#1}
-}
-\ExplSyntaxOff
-
-\begin{document}
-
-% Each test starts with a short piece of text explaining the property
-% being used. Under this, the expected output is given, followed
-% if relevant by the text of any error messages expected.
-
-% Test one: Simply creating a key with one argument and then using it.
-% Notice that the text length determines the limits of the argument:
-% spaces at either end are ignored. Literal spaces between text are
-% counted, as are those enclosed in braces.
-% ----------------------------------------------------------------------
-% You said: `Hello World'
-% You said: ` Hello World '
-% You said: `'
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-
-\keys_define:nn { module } {
- key .code:n = {You~said:~`#1'\\},
-}
-\ExplSyntaxOff
-
-\SetModuleKeys{
- key = Hello World ,
- key = { Hello World },
- key
-}
-
-% Test two: Variants of .code:n and .code:Nn exist which carry out a
-% full expansion on code definition. First the :x variant is tested.
-% ----------------------------------------------------------------------
-% Temp holds: ABC
-% Temp holds: 123
-% ----------------------------------------------------------------------
-\newcommand*{\temp}{123}
-
-\ExplSyntaxOn
-\keys_define:nn { module } {
- key-one .code:n = Temp~holds:~\temp\\,
- key-two .code:x = Temp~holds:~\temp,
-}
-\ExplSyntaxOff
-
-\renewcommand*{\temp}{ABC}
-
-\SetModuleKeys{
- key-one,
- key-two
-}
-
-% Test three: Values can be required and forbidden with the
-% .value_required: and .value_forbidden: properties.
-% ----------------------------------------------------------------------
-% All okay
-% All okay
-% ----------------------------------------------------------------------
-% The key `module/key-one' cannot taken a value:
-% the given input `Not allowed' is being ignored.
-%
-% The key `module/key-two' requires a value
-% and is being ignored.
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\keys_define:nn { module } {
- key-one .code:n = All~okay\\,
- key-one .value_forbidden:,
- key-two .code:n = #1,
- key-two .value_required:
-}
-\ExplSyntaxOff
-
-\SetModuleKeys{
- key-one,
- key-one = Not allowed,
- key-two = All okay,
- key-two
-}
-
-% Test four: Keys can be given a default value, to be used if nothing is
-% specified by the user. This can be done by name or by value.
-% ----------------------------------------------------------------------
-% Default
-% Real
-% Stuff
-% Real
-% Literal
-% Real
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\renewcommand*{\temp}{Stuff}
-\keys_define:nn { module } {
- key-one .code:n = #1\\,
- key-one .default:n = \temp,
- key-two .code:n = #1\\,
- key-two .default:V = \temp,
- key-three .code:n = #1\\,
- key-three .default:n = Literal,
-}
-\ExplSyntaxOff
-\renewcommand*{\temp}{Default}
-
-\SetModuleKeys{
- key-one,
- key-one = Real,
- key-two,
- key-two = Real,
- key-three,
- key-three = Real
-}
-
-% Test five: Keys can be created to store data both locally and
-% globally. This is illustrated using token list variables.
-% ----------------------------------------------------------------------
-% Some content
-% Outside
-% Some content
-% Some content
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\tl_new:N \l_temp_tl \tl_set:Nn \l_temp_tl {Outside}
-\tl_new:N \g_temp_tl \tl_gset:Nn \g_temp_tl {Outside}
-\keys_define:nn { module } {
- key-one .tl_set:N = \l_temp_tl,
- key-two .tl_gset:N = \g_temp_tl,
-}
-
-\begingroup
-\SetModuleKeys{
- key-one = Some~content
-}
-\l_temp_tl\\
-\endgroup
-\l_temp_tl\\
-
-\begingroup
-\SetModuleKeys{
- key-two = Some~content
-}
-\g_temp_tl\\
-\endgroup
-\g_temp_tl\\
-\ExplSyntaxOff
-
-% Test six: An expanded version for setting token lists.
-% ----------------------------------------------------------------------
-% Unexpanded
-% Expanded
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\tl_set:Nn \l_temp_tl {Expanded}
-\tl_new:N \l_tempa_tl
-\tl_new:N \l_tempb_tl
-\keys_define:nn { module } {
- key-one .tl_set:N = \l_tempa_tl,
- key-two .tl_set_x:N = \l_tempb_tl,
-}
-
-\SetModuleKeys{
- key-one = \l_temp_tl,
- key-two = \l_temp_tl,
-}
-\tl_set:Nn \l_temp_tl {Unxpanded}
-\l_tempa_tl\\
-\l_tempb_tl\\
-
-\ExplSyntaxOff
-
-% Test seven: Choices can be created either from a list of options or
-% one by one. Both are tested here by creating a list then adding to it
-% with an extra key. Unknown choices lead to an error message.
-% ----------------------------------------------------------------------
-% Choice `a' is number 1
-% Choice `b' is number 2
-% Choice `c' is number 3
-% An extra choice
-% ----------------------------------------------------------------------
-% Choice `e' unknown for key `module/key':
-% the key is being ignored.
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\keys_define:nn { module } {
- key .choice_code:n = {
- Choice~`\l_keys_choice_tl'~is~number~\int_use:N \l_keys_choice_int\\
- },
- key .generate_choices:n = {a,b,c},
- key/d .code:n = An~extra~choice \\
-}
-\ExplSyntaxOff
-
-\SetModuleKeys{
- key = a,
- key = b,
- key = c,
- key = d,
- key = e
-}
-
-% Test eight: Meta-keys for setting sub-choices.
-% ----------------------------------------------------------------------
-% `Value' and `Value'
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\keys_define:nn { module } {
- key-one .meta:n = { key-two = #1, key-three = #1 },
- key-two .code:n = `#1'~,
- key-three .code:n = and~`#1'
-}
-\ExplSyntaxOff
-\SetModuleKeys{
- key-one = Value
-}
-
-% Test nine: A completely unknown key should cause an error.
-% ----------------------------------------------------------------------
-% The key `module/unknown key' is unknown and is being ignored.
-% ----------------------------------------------------------------------
-\SetModuleKeys{
- unknown key = some value
-}
-
-% Test ten: If the special `unknown' key has been set up, however,
-% unknown input can be re-directed.
-% ----------------------------------------------------------------------
-% You tried to set key `unknown key' to `some value'
-% ----------------------------------------------------------------------
-\ExplSyntaxOn
-\keys_define:nn { module } {
- unknown .code:n = You~tried~to~set~key~`\l_keys_key_tl'~to~`#1'
-}
-\ExplSyntaxOff
-
-\SetModuleKeys{
- unknown key = some~value
-}
-
-\end{document}
-
diff --git a/examples/l3precom.tex b/examples/l3precom.tex
deleted file mode 100644
index 5f41896..0000000
--- a/examples/l3precom.tex
+++ /dev/null
@@ -1,135 +0,0 @@
-% \iffalse
-%% File: test2 Copyright (C) 1990-2006 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
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% This file is part of the ``expl3 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
-%%
-%% http://www.latex-project.org/cgi-bin/cvsweb.cgi/
-%%
-%% for those people who are interested.
-%%
-%%%%%%%%%%%
-%% NOTE: %%
-%%%%%%%%%%%
-%%
-%% Snapshots taken from the repository represent work in progress and may
-%% not work or may contain conflicting material! We therefore ask
-%% people _not_ to put them into distributions, archives, etc. without
-%% prior consultation with the LaTeX Project Team.
-%%
-%% -----------------------------------------------------------------------
-%%
-% \fi
-\documentclass{article}
-
-\usepackage{expl3}
-
-% let's dump what is known about the LaTeX internals so far.
-% this will not be much as the very basic stuff doesn't get
-% dumped and we haven't got anything else.
-%
-\dumpLaTeXstate{test1}
-
-\ExplSyntaxOn
-
-% we need some variants of tl_set which are not yet
-% defined for use in the code below.
-%
-\cs_generate_variant:Nn \tl_set:Nn {o}
-\cs_generate_variant:Nn \tl_gset:Nn {o}
-
-% okay, here we either load a dump file (testdump.cmp)
-% and then jump tp \cs_dump: or we compile one for next time.
-% don't forget that if you change code below it will only have any
-% affect if a new dump file is written so you may have to remove
-% the existing one.
-%
-\cs_load_dump:n{testdump}
-
-% two test definitions
-%
-\cs_new:Npn\foo{some foo}
-\cs_new:Npn\baz{some baz}
-
-% we say that \foo should be dumped in the compiled style.
-% this is pretty useless as it is certainly not faster than defining
-% it in the first place. but this is only done for showing that it
-% works. just assume that \foo is actually a pretty difficult
-% definition which does need a lot of static compilation due to
-% parsing, comparing values, etc., so that it is much faster load the
-% final version rather than do the compilation each time again.
-%
-% btw note that \baz is not dumped and will not be available in the
-% production run (ie the one using the cmp file)
-%
-\cs_record_name:N\foo
-
-% get our self a scratch register (again this will not be available in
-% the production run)
-%
-\tl_new:N \l_scratch_tl
-
-% now we generate a unique cs name and assign it the string "foo".
-% again pretty useless example. but with this mechansim you can build
-% complex graph structures etc using these names as pointers, etc. and
-% in such a case you need to dump the state of your graph at some
-% point to be able to load it very fast in production.
-%
-\cs_gen_sym:N\l_scratch_tl{}
-\tl_set:on \l_scratch_tl {foo}
-
-% ditto for a global unique name
-%
-\cs_ggen_sym:N\l_scratch_tl{}
-\tl_gset:on \l_scratch_tl {bar}
-
-% and now we dump the whole rubbish. In the current implementation
-% only csnames can be precompiled, perhaps registers should be handled
-% similarly.
-%
-\cs_dump:
-
-% and some int register to show something in the second LaTeX state
-% dump.
-%
-\int_new:N\l_my_int
-\int_set:Nn\l_my_int{42}
-%
-% as the allocation routines are not distributed we have to do this
-% manually.
-%
-\register_record_name:N\l_my_int
-
-\dumpLaTeXstate{test2}
-
-% and changing something ... what happens with the LaTeX state?
-%
-\int_set:Nn\l_my_int{0}
-\cs_set:Npn\file_not_found:nTF#1#2#3{}
-
-\dumpLaTeXstate{test3}
-
-\ExplSyntaxOff
-
-\begin{document}
-
-\LaTeX\ still works!
-
-\end{document}
-
-
-
-
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list