Debian Codegraph @

texmf-dist/doc/latex/l3kernel/l3news03.tex

raw
1 % Copyright 2009,2010 The LaTeX Project
2 \documentclass{ltnews}
3 \PassOptionsToPackage{colorlinks}{hyperref}
4
5 \usepackage{metalogo,ragged2e}
6
7 \AtBeginDocument{
8 \renewcommand{\LaTeXNews}{\LaTeX3~News}
9 \RaggedRight
10 }
11
12 \usepackage{url}
13
14 \publicationmonth{January}
15 \publicationyear{2010}
16 \publicationissue{3}
17
18 \begin{document}
19 \maketitle
20 \raisefirstsection
21
22 \section{Happy New Year}
23
24 Welcome to the holiday season edition of `news of our activities' for
25 the \LaTeX3 team.
26
27 \section{Recent developments}
28
29 The last six months has seen two significant releases in the \LaTeX3 code.
30 In the \textsc{ctan} repository for the \pkg{xpackages},\footnote{\url{http://mirror.ctan.org/tex-archive/macros/latex/contrib/xpackages/}} you'll find two items of interest:
31 \begin{itemize}
32 \item A revised version of \textsf{xparse}; and
33 \item The new package \textsf{xtemplate}, a re-implementation of \textsf{template} with a new syntax.
34 \end{itemize}
35 Special thanks to Joseph Wright who handled the implementations above almost single-handedly (with lots of input and feedback from other members of the team and members of the \textsc{latex-l} mailing list).
36
37 These two packages are designed for the \LaTeX\ package author who wishes to define document commands and designer interfaces in a high-level manner.
38
39 \paragraph{\textsf{xparse}}
40 This package allows complex document commands to be constructed with all sorts of optional arguments and flags. Think of how \verb|\newcommand| allows you to create a command with a single optional argument and \textsf{xparse} is a generalisation of that idea.
41
42 \paragraph{\textsf{xtemplate}}
43 This package requires more explanation.
44 \textsf{Xtemplate} is designed to separate the logical information in a
45 document from its visual representation. `Templates' are constructed to fulfil
46 individual typesetting requirements for each set of arguments; to change
47 the look of a certain part of a document, instantiations of templates can be
48 swapped out for another without (a) having to change the markup of the source
49 document, or (b) having to edit some internal \LaTeX\ macro.
50
51
52 \LaTeXe{} packages, such as \textsf{geometry} or \textsf{titlesec}, already provide
53 parameterized interfaces to specific document elements. For example,
54 one may use \textsf{titlesec} to change the
55 layout of a \verb|\section|: one modifies its layout parameters via \verb|\titleformat| and \verb|\titlespacing|.
56 In a way, such packages define a template for a specific document element and
57 some manipulation commands to instantiate it.
58 \pagebreak
59 However, the moment the intended
60 layout is not achievable with one package you are on your own: either you have
61 to resort to low-level programming or find some other high-level package which, of course, comes with its own set of conventions and manipulation commands.
62
63 The \textsf{xtemplate} package can be thought of a generalization of such
64 ideas. It provides a uniform interface for defining and managing templates for
65 any kind of document element and most importantly provides a uniform interface
66 for instantiating the layout.
67
68 Thus the designer activity of defining or modifying a document class is
69 limited to selecting the document elements that should be provided by the
70 class (e.g., \verb|\chapter|, \verb|\section| \verb|\footnote|, lists, \ldots), selecting
71 appropriate ``named'' templates for each of them, and instantiating these
72 templates by specifying values for their layout parameters. If a desired
73 layout can't be achieved with a given template a different template for the
74 same document element can be selected.
75
76 Programming is only necessary
77 if no suitable template for the intended layout is available.
78 It is then that a \LaTeX{} programmer has to build a new template
79 that supports the layout requirements. Once this task is complete, the
80 template may be
81 added to the selection of templates that designers and users may choose from
82 to define or adjust document layouts seamlessly.
83
84 This is a slight gloss over the complexities of the package itself, which you can read about in the documentation. We've tried to document \textsf{xtemplate} clearly but we'd love feedback on whether the ideas make sense to you.
85
86 As an addendum to the introduction of \textsf{xtemplate}, the older \textsf{template} package will be retired in the near future. To our knowledge there is only a single package on \textsc{ctan} that uses \textsf{template}, namely \textsf{xfrac}, and members of the \LaTeX\ team are in the process of switching this package over to \textsf{xtemplate}. If you have any private code that uses \textsf{template}, please let us know!
87
88
89 \section{Upcoming plans}
90
91 Having announced the updated \textsf{xparse} and the new \textsf{xtemplate}, the next stage of development will revolve around using these two systems in the other components of the \textsf{xpackages}, feeding back our experience in practise with the original ideas behind the designs and evaluating if the packages are meeting our expectations.
92
93 \subsection{Packages to tackle}
94
95 \paragraph{\textsf{xhead}}
96 The first work will be to create a new \textsf{xpackage} (probably called \textsf{xhead}), for typesetting section headings and other document divisions.
97 Section headings are one of the more complex areas to work with, so
98 the work should stress \textsf{xtemplate} enough to know if its
99 current design is sufficient for most needs. Nothing has been
100 released yet, but we'll announce further developments on the
101 \textsc{latex-l} mailing
102 list\footnote{For details, see
103 \url{http://www.latex-project.org/code.html}} in the
104 mean time.
105
106
107 \paragraph{\textsf{galley}}
108 We also need to give \textsf{galley} the same treatment as
109 \textsf{xparse} and \textsf{xtemplate} have already had. That is, we have an
110 older implementation (in fact two) that needs some work before we're ready to release it to \textsc{ctan}.
111
112 The \textsf{galley} package is used to place material into the
113 vertical list while typesetting but before page breaks occur. Since it
114 works at such a low level, it is important to solidify this package
115 before writing higher level design templates.
116
117 An issue we have to face is that to achieve best results,
118 \textsf{galley} cannot be used in concert with \LaTeXe\ code. This
119 could limit its usefulness, and we may decide that it's better to
120 scale back the features we're attempting, to allow better
121 interoperability for existing packages and documents. More work
122 remains before we can decide between these options.
123
124
125 \end{document}
126
127
128