Gentoo Archives: gentoo-pms

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-pms@l.g.o
Cc: Michael Orlitzky <mjo@g.o>
Subject: [gentoo-pms] [PATCH v2] Refer to chapters as chapters.
Date: Sun, 24 Mar 2019 09:04:30
Message-Id: w6g5zs8zlrd.fsf_-_@kph.uni-mainz.de
In Reply to: Re: [gentoo-pms] [PATCH] Refer to chapters as chapters. by Michael Orlitzky
1 Date: Sat, 23 Mar 2019 22:30:07 +0100
2
3 Also rename label prefixes, "ch:" for chapters, "app:" for appendices,
4 as suggested by Michael Orlitzky.
5
6 Signed-off-by: Ulrich Müller <ulm@g.o>
7 ---
8 >>>>> On Sun, 24 Mar 2019, Michael Orlitzky wrote:
9
10 > Please change those labels to e.g. "chap:ebuild-vars" in the process.
11 > Every "chapter" reference to a "sec" label looks like a bug to me.
12
13 Good idea, done.
14
15 > I don't know how everyone feels about additional TeX dependencies,
16 > but the cleveref package is designed to solve exactly this problem:
17
18 > https://ctan.org/pkg/cleveref
19
20 > Instead of "chapter~\ref{chap:...}", cleveref lets you write only
21 > "\cref{chap:...}", and the correct word, capitalization, and
22 > non-breaking spaces are inserted automatically.
23
24 Too clever, for my taste. :-) It is the sort of over-engineering that
25 deteriorates readability of the LaTeX source.
26
27 Besides, cleveref would break HTML generation with TeX4ht.
28
29 appendices.tex | 2 +-
30 dependencies.tex | 2 +-
31 ebuild-format.tex | 4 ++--
32 ebuild-functions.tex | 2 +-
33 ebuild-vars.tex | 10 +++++-----
34 eclasses.tex | 2 +-
35 glossary.tex | 2 +-
36 introduction.tex | 4 ++--
37 metadata-cache.tex | 2 +-
38 profile-variables.tex | 2 +-
39 profiles.tex | 2 +-
40 tree-layout.tex | 20 +++++++++-----------
41 12 files changed, 26 insertions(+), 28 deletions(-)
42
43 diff --git a/appendices.tex b/appendices.tex
44 index 434aa3f..7e849f2 100644
45 --- a/appendices.tex
46 +++ b/appendices.tex
47 @@ -1,5 +1,5 @@
48 \chapter{metadata.xml}
49 -\label{sec:metadata-xml}
50 +\label{app:metadata-xml}
51
52 The \t{metadata.xml} file is used to contain extra package- or category-level information beyond
53 what is stored in ebuild metadata. Its exact format is strictly beyond the scope of this document,
54 diff --git a/dependencies.tex b/dependencies.tex
55 index 7ce9860..07a990f 100644
56 --- a/dependencies.tex
57 +++ b/dependencies.tex
58 @@ -1,5 +1,5 @@
59 \chapter{Dependencies}
60 -\label{sec:dependencies}
61 +\label{ch:dependencies}
62
63 \section{Dependency Classes}
64 \label{sec:dependency-classes}
65 diff --git a/ebuild-format.tex b/ebuild-format.tex
66 index e7b8133..d53d773 100644
67 --- a/ebuild-format.tex
68 +++ b/ebuild-format.tex
69 @@ -1,5 +1,5 @@
70 \chapter{Ebuild File Format}
71 -\label{sec:ebuild-format}
72 +\label{ch:ebuild-format}
73
74 \featurelabel{bash-version} The ebuild file format is in its basic form a subset of the format of
75 a bash script. The interpreter is assumed to be GNU bash, version as listed in
76 @@ -12,7 +12,7 @@ option of bash is set in the global scope of ebuilds. If set, failed pattern mat
77 filename expansion result in an error when the ebuild is being sourced.
78
79 The file encoding must be UTF-8 with Unix-style newlines. When sourced, the ebuild must define
80 -certain variables and functions (see sections~\ref{sec:ebuild-vars} and~\ref{sec:ebuild-functions}
81 +certain variables and functions (see chapters~\ref{ch:ebuild-vars} and~\ref{ch:ebuild-functions}
82 for specific information), and must not call any external programs, write anything to standard
83 output or standard error, or modify the state of the system in any way.
84
85 diff --git a/ebuild-functions.tex b/ebuild-functions.tex
86 index 5c675ab..f5afacb 100644
87 --- a/ebuild-functions.tex
88 +++ b/ebuild-functions.tex
89 @@ -1,5 +1,5 @@
90 \chapter{Ebuild-defined Functions}
91 -\label{sec:ebuild-functions}
92 +\label{ch:ebuild-functions}
93
94 \section{List of Functions}
95
96 diff --git a/ebuild-vars.tex b/ebuild-vars.tex
97 index 47720bb..a8aa528 100644
98 --- a/ebuild-vars.tex
99 +++ b/ebuild-vars.tex
100 @@ -1,5 +1,5 @@
101 \chapter{Ebuild-defined Variables}
102 -\label{sec:ebuild-vars}
103 +\label{ch:ebuild-vars}
104
105 \note{This section describes variables that may or must be defined by ebuilds. For variables that
106 are passed from the package manager to the ebuild, see section~\ref{sec:ebuild-env-vars}.}
107 @@ -79,12 +79,12 @@ Ebuilds may define any of the following variables:
108 any way.
109 \item[RESTRICT] Zero or more behaviour restrictions for this package. See section~\ref{sec:restrict}
110 for value meanings and section~\ref{sec:dependency-spec} for full syntax.
111 -\item[DEPEND] See section~\ref{sec:dependencies}.
112 -\item[RDEPEND] See section~\ref{sec:dependencies}. For some EAPIs, \t{RDEPEND} has special behaviour
113 +\item[DEPEND] See chapter~\ref{ch:dependencies}.
114 +\item[RDEPEND] See chapter~\ref{ch:dependencies}. For some EAPIs, \t{RDEPEND} has special behaviour
115 for its value if unset and when used with an eclass. See section~\ref{sec:rdepend-depend} for
116 details.
117 -\item[PDEPEND] See section~\ref{sec:dependencies}.
118 -\item[BDEPEND] See section~\ref{sec:dependencies}.
119 +\item[PDEPEND] See chapter~\ref{ch:dependencies}.
120 +\item[BDEPEND] See chapter~\ref{ch:dependencies}.
121 \end{description}
122
123 \ChangeWhenAddingAnEAPI{7}
124 diff --git a/eclasses.tex b/eclasses.tex
125 index 8305504..bf0007b 100644
126 --- a/eclasses.tex
127 +++ b/eclasses.tex
128 @@ -1,5 +1,5 @@
129 \chapter{Eclasses}
130 -\label{sec:eclasses}
131 +\label{ch:eclasses}
132
133 Eclasses serve to store common code that is used by more than one ebuild, which greatly aids
134 maintainability and reduces the tree size. However, due to metadata cache issues, care must be taken
135 diff --git a/glossary.tex b/glossary.tex
136 index 100c09a..60f6def 100644
137 --- a/glossary.tex
138 +++ b/glossary.tex
139 @@ -1,5 +1,5 @@
140 \chapter{Glossary}
141 -\label{sec:glossary}
142 +\label{ch:glossary}
143
144 This section contains explanations of some of the terms used in this document whose meaning may not
145 be immediately obvious.
146 diff --git a/introduction.tex b/introduction.tex
147 index b5b63c6..8d1f793 100644
148 --- a/introduction.tex
149 +++ b/introduction.tex
150 @@ -7,7 +7,7 @@ well as certain aspects of package manager behaviour required to support such a
151
152 This document is \e{not} designed to be an introduction to ebuild development. Prior knowledge of
153 ebuild creation and an understanding of how the package management system works is assumed; certain
154 -less familiar terms are explained in the Glossary in chapter~\ref{sec:glossary}.
155 +less familiar terms are explained in the Glossary in chapter~\ref{ch:glossary}.
156
157 This document does not specify any user or package manager configuration information.
158
159 @@ -60,7 +60,7 @@ applicable to tools or other applications that interact with ebuilds or ebuild r
160 \section{Acknowledgements}
161
162 Thanks to Mike Kelly (package manager provided utilities, section~\ref{sec:pkg-mgr-commands}),
163 -Danny van Dyk (ebuild functions, section~\ref{sec:ebuild-functions}), David Leverton (various
164 +Danny van Dyk (ebuild functions, chapter~\ref{ch:ebuild-functions}), David Leverton (various
165 sections), Petteri Räty (environment state, section~\ref{sec:ebuild-env-state}), Michał Górny
166 (various sections), Andreas K. Hüttel (stable use masking, section~\ref{sec:use-masking}),
167 Zac Medico (sub-slots, section~\ref{sec:mandatory-vars}) and James Le Cuirot (build dependencies,
168 diff --git a/metadata-cache.tex b/metadata-cache.tex
169 index 3ac64a6..33574c4 100644
170 --- a/metadata-cache.tex
171 +++ b/metadata-cache.tex
172 @@ -1,5 +1,5 @@
173 \chapter{Metadata Cache}
174 -\label{sec:metadata-cache}
175 +\label{ch:metadata-cache}
176
177 \section{Directory Contents}
178
179 diff --git a/profile-variables.tex b/profile-variables.tex
180 index 6cd770c..86d60d9 100644
181 --- a/profile-variables.tex
182 +++ b/profile-variables.tex
183 @@ -75,7 +75,7 @@ The following variables have specific meanings when set in profiles.
184 section~\ref{arch.list} for more information. Must be equal to the primary \t{KEYWORD} for this
185 profile.
186 \item[CONFIG_PROTECT, CONFIG_PROTECT_MASK] Contain whitespace-delimited lists used to control the
187 - configuration file protection. Described more fully in chapter~\ref{sec:config-protect}.
188 + configuration file protection. Described more fully in section~\ref{sec:config-protect}.
189 \item[USE] Defines the list of default USE flags for this profile. Flags may be added or removed by
190 the user's configuration. \t{USE_EXPAND} values must not be specified in this way.
191 \item[USE_EXPAND] Defines a list of variables which are to be treated incrementally and whose
192 diff --git a/profiles.tex b/profiles.tex
193 index b423697..88bf08b 100644
194 --- a/profiles.tex
195 +++ b/profiles.tex
196 @@ -1,5 +1,5 @@
197 \chapter{Profiles}
198 -\label{sec:profiles}
199 +\label{ch:profiles}
200
201 \section{General Principles}
202 Generally, a profile defines information specific to a certain `type' of system---it lies somewhere
203 diff --git a/tree-layout.tex b/tree-layout.tex
204 index 9397e4b..9a5c8b4 100644
205 --- a/tree-layout.tex
206 +++ b/tree-layout.tex
207 @@ -29,7 +29,7 @@ Each category provided by the repository (see also: the
208 be contained in one directory, whose name shall be that of the
209 category. Each category directory shall contain:
210 \begin{compactitem}
211 -\item A \t{metadata.xml} file, as described in appendix~\ref{sec:metadata-xml}\@. Optional.
212 +\item A \t{metadata.xml} file, as described in appendix~\ref{app:metadata-xml}\@. Optional.
213 \item Zero or more package directories, one for each package in the category, as described in
214 section~\ref{sec:package-dirs}. The name of the package directory shall be the corresponding
215 package name.
216 @@ -49,8 +49,8 @@ a package manager may treat an empty category as a category that does not exist)
217
218 A package directory contains the following:
219 \begin{compactitem}
220 -\item Zero or more ebuilds. These are as described in section~\ref{sec:ebuild-format} and others.
221 -\item A \t{metadata.xml} file, as described in appendix~\ref{sec:metadata-xml}\@. Optional only for
222 +\item Zero or more ebuilds. These are as described in chapter~\ref{ch:ebuild-format} and others.
223 +\item A \t{metadata.xml} file, as described in appendix~\ref{app:metadata-xml}\@. Optional only for
224 legacy support.
225 \item A \t{ChangeLog}, in a format determined by the provider of the repository. Optional.
226 \item A \t{Manifest} file, whose format is described in~\cite{Glep44}. Can be omitted if the file
227 @@ -73,12 +73,10 @@ this specification.
228 \section{The Profiles Directory}
229 \label{sec:profiles-dir}
230
231 -The profiles directory shall contain zero or more profile directories
232 -as described in section~\ref{sec:profiles}, as well as the following files
233 -and directories. In any line-based file, lines beginning with a \#
234 -character are treated as comments, whilst blank lines are ignored. All
235 -contents of this directory, with the exception of \t{repo_name}, are
236 -optional.
237 +The profiles directory shall contain zero or more profile directories as described in
238 +chapter~\ref{ch:profiles}, as well as the following files and directories. In any line-based file,
239 +lines beginning with a \# character are treated as comments, whilst blank lines are ignored.
240 +All contents of this directory, with the exception of \t{repo_name}, are optional.
241
242 The profiles directory may contain an \t{eapi} file. This file, if it exists, must contain a single
243 line with the name of an EAPI\@. This specifies the EAPI to use when handling the profiles
244 @@ -241,7 +239,7 @@ human-readable form. Plain text format is strongly preferred but not required.
245 \label{sec:eclass-dir}
246
247 The \t{eclass} directory shall contain copies of the eclasses provided by this repository. The
248 -format of these files is described in section~\ref{sec:eclasses}. It may also contain, in their own
249 +format of these files is described in chapter~\ref{ch:eclasses}. It may also contain, in their own
250 directory, support files needed by these eclasses.
251
252 \section{The Metadata Directory}
253 @@ -255,7 +253,7 @@ various XML files used in the repository, and repository timestamps.
254 \subsection{The metadata cache}
255
256 The \t{metadata/cache} directory may contain a cached form of all important ebuild metadata
257 -variables. The contents of this directory are described in chapter~\ref{sec:metadata-cache}.
258 +variables. The contents of this directory are described in chapter~\ref{ch:metadata-cache}.
259
260 % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
261
262 --
263 2.21.0