Debian Codegraph @

texmf-dist/source/latex/makebase/makebase.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Extracted from makebase.xml
4 % makebase.dtx is copyright © 2016 by Peter Flynn <[email protected]>
5 %
6 % This work may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either
8 % version 1.3 of this license or (at your option) any later
9 % version. The latest version of this license is in:
10 %
11 % http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.3 or later is part of all distributions of
14 % LaTeX version 2005/12/01 or later.
15 %
16 % This work has the LPPL maintenance status `maintained'.
17 %
18 % The current maintainer of this work is Peter Flynn <[email protected]>
19 %
20 % This work consists of the files makebase.dtx and makebase.ins,
21 % the derived file makebase.sty, and any ancillary files listed
22 % in the MANIFEST.
23 %
24 % \fi
25 % \iffalse
26 %<package>\NeedsTeXFormat{LaTeX2e}[2014/09/29]
27 %<package>\ProvidesPackage{makebase}[2016/05/10 v0.2
28 %<package> Typeset counters in a different base]
29 %<*driver>
30 \RequirePackage{fix-cm}
31 \PassOptionsToPackage{svgnames}{xcolor}
32 \PassOptionsToPackage{hyphens}{url}
33 \documentclass[12pt]{ltxdoc}
34 %%
35 %% Packages added automatically
36 %%
37 \usepackage{classpack}% included by default. (0)
38 \usepackage{mflogo}% included by default. (23)
39 \usepackage[british]{babel}% included by default. (31)
40 \usepackage{ccaption}% included by default. (34)
41 \captionnamefont{\bfseries}
42 \captionstyle{\raggedright}
43 \usepackage{fancyvrb}% use of 'programlisting' was detected (41)
44 \usepackage{makeidx}% included by default. (57)
45 \makeindex
46 %%
47 %% Packages specified by author
48 %%
49 \let\SavedShow\show
50 \usepackage[utf8x]{inputenc}[2008/03/30]
51 \AtBeginDocument{\let\show\SavedShow}
52 \DeclareUnicodeCharacter{9251}{\textvisiblespace}
53 \PrerenderUnicode{–}
54 \PrerenderUnicode{š}
55 \PrerenderUnicode{ć}
56 \PrerenderUnicode{Å}
57 \PrerenderUnicode{ı}
58 \PrerenderUnicode{É}
59 \usepackage[T1]{fontenc}
60 \usepackage{dox}[2010/12/16]
61 \makeatletter
62 \doxitem[idxtype=attribute]{Attribute}{CPK@attribute}{attributes}
63 \makeatother
64 \makeatletter
65 \doxitem[idxtype=attributevalue]{AttributeValue}{CPK@attributevalue}{attribute values}
66 \makeatother
67 \makeatletter
68 \doxitem[idxtype=class]{Class}{CPK@class}{classes}
69 \makeatother
70 \makeatletter
71 \doxitem[idxtype=colour]{Colour}{CPK@colour}{colours}
72 \makeatother
73 \makeatletter
74 \doxitem[idxtype=counter]{Counter}{CPK@counter}{counters}
75 \makeatother
76 \makeatletter
77 \doxitem[idxtype=DTD]{DTD}{CPK@dtd}{DTDs/Schemas}
78 \makeatother
79 \makeatletter
80 \doxitem[idxtype=element]{Element}{CPK@element}{element types}
81 \makeatother
82 \makeatletter
83 \doxitem[idxtype=entity]{Entity}{CPK@entity}{entities}
84 \makeatother
85 \makeatletter
86 \doxitem[idxtype=error]{Error}{CPK@error}{errors}
87 \makeatother
88 \makeatletter
89 \doxitem[idxtype=function]{Function}{CPK@function}{functions}
90 \makeatother
91 \makeatletter
92 \doxitem[idxtype=language]{Language}{CPK@language}{languages}
93 \makeatother
94 \makeatletter
95 \doxitem[macrolike,idxtype=length]{Length}{CPK@length}{lengths}
96 \makeatother
97 \makeatletter
98 \doxitem[idxtype=mode]{Mode}{CPK@mode}{modes}
99 \makeatother
100 \makeatletter
101 \doxitem[idxtype=option]{Option}{CPK@option}{options}
102 \makeatother
103 \makeatletter
104 \doxitem[idxtype=package]{Package}{CPK@package}{packages}
105 \makeatother
106 \makeatletter
107 \doxitem[idxtype=template]{Template}{CPK@template}{templates}
108 \makeatother
109 \makeatletter
110 \doxitem[idxtype=typeface]{Typeface}{CPK@typeface}{typefaces}
111 \makeatother
112 \makeatletter
113 \doxitem[idxtype=font]{Font}{CPK@font}{fonts}
114 \makeatother
115 \newcommand{\LabelFont}[2][\relax]{\strut
116 {\fontencoding\encodingdefault
117 \fontfamily{lmtt}\fontseries{lc}#1\selectfont#2}\space}
118 \makeatletter
119 \let\CPK@macro\macro\let\CPK@endmacro\endmacro
120 \makeatother
121 \makeatletter
122 \let\CPK@environment\environment\let\CPK@endenvironment\endenvironment
123 \makeatother
124 \makeatletter
125 \def\PrintAttributeName#1{\LabelFont{@#1}}
126 \makeatother
127 \def\PrintAttributeValueName#1{\LabelFont{"#1"}}
128 \def\PrintClassName#1{\LabelFont[\fontfamily{lmss}]{#1}}
129 \def\PrintColourName#1{\LabelFont[\color{#1}]{#1}}
130 \def\PrintCounterName#1{\LabelFont{#1}}
131 \def\PrintDTDName#1{\LabelFont{#1}}
132 \def\PrintElementName#1{\LabelFont{<#1>}}
133 \def\PrintEntityName#1{\LabelFont{\&#1;}}
134 \def\PrintEnvironmentName#1{\LabelFont[\fontfamily{lmss}]{#1}}
135 \def\PrintErrorName#1{\LabelFont[\color{Red}!]{#1}}
136 \def\PrintFunctionName#1{\LabelFont[\bfseries\itshape]{#1}}
137 \def\PrintLanguageName#1{\LabelFont{#1}}
138 \def\PrintLengthName#1{\LabelFont{#1}}
139 \def\PrintMacroName#1{\LabelFont{#1}}
140 \def\PrintModeName#1{\LabelFont[\sffamily]{\textlangle#1\textrangle}}
141 \def\PrintOptionName#1{\LabelFont[\bfseries]{#1}}
142 \def\PrintPackageName#1{\LabelFont[\fontfamily{lmss}]{#1}}
143 \def\PrintTemplateName#1{\LabelFont[\bfseries]{#1}}
144 \usepackage[textwidth=159mm,
145 textheight=229mm,a4paper,left=1in,right=1in,
146 textwidth=160mm,textheight=9in]{geometry}
147 \usepackage{url}
148 \usepackage{parskip}
149 \usepackage{varioref}
150 \vrefwarning
151 \labelformat{chapter}{Chapter~#1}
152 \makeatletter
153 \labelformat{chapter}{\@chapapp~#1}
154 \makeatother
155 \labelformat{section}{section~#1}
156 \labelformat{subsection}{section~#1}
157 \labelformat{subsubsection}{section~#1}
158 \labelformat{paragraph}{section~#1}
159 \labelformat{figure}{Figure~#1}
160 \labelformat{table}{Table~#1}
161 \labelformat{item}{item~#1}
162 \renewcommand{\reftextcurrent}{elsewhere on this
163 page}
164 \def\reftextafter{on the
165 \reftextvario{next}{following} page}
166 \usepackage{lmodern}
167 \usepackage{calc}
168 \usepackage{fmtcount}
169 \usepackage{listings}
170 \lstdefinelanguage{dummy}
171 {morekeywords={dummy}}
172
173 \lstdefinelanguage{DocBook}[]{XML}
174 {morekeywords={abstract,address,affiliation,annotation,arg,
175 author,book,chapter,classname,cmdsynopsis,command,
176 constraintdef,contrib,copyright,cover,date,email,emphasis,
177 envar,filename,firstname,footnote,guibutton,guilabel,
178 guimenu,guimenuitem,guisubmenu,holder,info,itemizedlist,
179 listitem,literal,member,option,orderedlist,orgdiv,orgname,
180 package,para,parameter,part,personname,phrase,procedure,
181 productname,programlisting,quote,refsection,remark,
182 constructorsynopsis,methodparan,modifier,funcparams,olink,
183 bibliography,biblioentry,biblioset,subtitle,artpagenums,
184 volumenum,issuenum,DOCTYPE,SYSTEM,xml:id,releaseinfo,
185 replaceable,revdescription,revhistory,revision,sect1,sect2,
186 sect3,sect4,seg,seglistitem,segmentedlist,segtitle,
187 simplelist,step,surname,systemitem,tag,term,title,uri,
188 userinput,variablelist,varlistentry,wordasword,xref,year,
189 xlink:href},}
190
191 \makeatletter
192 \lstdefinelanguage{bash}
193 {morestring=[s]{[]},morekeywords={exit,logout,yes,no,@,
194 password,ssh,URL,cd,dvips,latex,ls,makeindex,man,mkdir,
195 pdflatex,sudo,texconfig,texdoc,updmap,xelatex}}
196
197 \makeatother
198 \lstdefinelanguage{APA}[]{XML}
199 {morekeywords={TTL}}
200
201 \lstdefinelanguage{OOXML}[]{XML}
202 {morekeywords={w:p,w:pPr,w:pStyle,w:rPr,w:rFonts,
203 w:r,w:t,w:lang}}
204
205 \lstdefinelanguage{SGML}[]{XML}
206 {morekeywords={sec,ttl}}
207
208 \lstdefinelanguage{DTD}[]{XML}
209 {morekeywords={ELEMENT,ENTITY,ATTLIST,CDATA,ID,REQUIRED,
210 IMPLIED,PCDATA}}
211
212 \lstdefinelanguage{Runoff}
213 {morekeywords={h1}}
214
215 \lstdefinelanguage{GML}
216 {morekeywords={h1}}
217
218 \lstdefinelanguage{Scribe}
219 {morekeywords={Heading},morestring=[s]{[]}}
220
221 \lstdefinelanguage{RTF}[]{TeX}
222 {moretexcs={rtf,ansi,deff,adeflang,fonttbl,f,froman,fprq,
223 fcharset,f1,fswiss,falt,fnil,colortbl,red,green,blue,
224 stylesheet,s,snext,nowidctlpar,hyphen,hyphlead,hyphtrail,
225 hyphmax,cf,kerning,dbch,af,langfe,afs,alang,loch,fs,
226 pgndec,pard,plain,qc,sb,sa,keepn,b,ab,rtlch,ltrch,par}}
227
228 \lstdefinelanguage{TEI}[]{XML}
229 {morekeywords={TEI,TEI.2,teiHeader,fileDesc,sourceDesc,
230 titleStmt,title,author,editor,respStmt,resp,name,
231 editionStmt,edition,text,body,publicationStmt,publisher,
232 div,div1,placeName,lg,l,s,cl,phr,w,list,distinct,p,pb,
233 mls,div2,head,num,val,app,lem,rdg,q,sup,uncl,note,
234 DOCTYPE,SYSTEM,xml:id}}[keywords,comments,strings]
235
236 \lstdefinelanguage{XSLT2}[]{XML}
237 {morekeywords={xsl:stylesheet,xsl:transform,
238 xsl:apply-imports,xsl:attribute-set,xsl:decimal-format,
239 xsl:import,xsl:include,xsl:key,xsl:namespace-alias,
240 xsl:output,xsl:param,
241 xsl:preserve-space,xsl:strip-space,xsl:template,
242 xsl:variable,xsl:character-map,xsl:function,
243 xsl:import-schema,xsl:param,xsl:variable,
244 xsl:apply-imports,xsl:apply-templates,xsl:attribute,
245 xsl:call-template,xsl:choose,xsl:comment,xsl:copy,
246 xsl:copy-of,xsl:element,xsl:fallback,xsl:for-each,
247 xsl:if,xsl:message,xsl:number,xsl:otherwise,
248 xsl:processing-instruction,xsl:text,xsl:value-of,
249 xsl:variable,xsl:when,xsl:with-param,xsl:sort,
250 xsl:for-each-group,xsl:next-match,xsl:analyze-string,
251 xsl:namespace,xsl:result-document,xsl:copy,
252 xsl:fallback,xsl:document,xsl:sequence,
253 xsl:matching-substring,xsl:non-matching-substring,
254 xsl:perform-sort,xsl:output-character},
255 alsodigit={-}}
256
257 \lstdefinelanguage{LaTeXe}[LaTeX]{TeX}
258 {morekeywords = {selectlanguage,foreignlanguage,
259 textbrokenbar,textlangle,textrangle,subsection,url,
260 chapter,tableofcontents,part,subsubsection,paragraph,
261 subparagraph,maketitle,setlength,listoffigures,
262 listoftables,color,arraybackslash,includegraphics,
263 textcite,parencite,graphicspath,lstinline,
264 DeclareLanguageMapping,textcolor,definecolor,colorbox,
265 fcolorbox}}
266
267 \lstdefinelanguage{BIBTeX}{
268 morekeywords = {title,author,edition,publisher,year,
269 address},
270 morestring=[b]",
271 }
272
273 \lstdefinelanguage{Email}{
274 morekeywords={From,Subject,To,Date},
275 }
276
277 \lstset{defaultdialect=LaTeXe,frame=single,
278 framesep=.5em,backgroundcolor=\color{AliceBlue},
279 rulecolor=\color{LightSteelBlue},framerule=1pt}
280
281 \lstloadlanguages{LaTeXe,DocBook,XML,XSLT2,bash}
282 \lstnewenvironment{listingsdoc}
283 {\lstset{language={[LaTeX]TeX}}}
284 {}
285 \newcommand\basicdefault[1]{\footnotesize
286 \color{Black}\ttfamily#1}
287
288 \lstset{basicstyle=\basicdefault{\spaceskip.5em}}
289 \lstset{literate=
290 {§}{{\S}}1
291 {©}{{\raisebox{.125ex}{\copyright}\enspace}}1
292 {«}{{\guillemotleft}}1
293 {»}{{\guillemotright}}1
294 {Á}{{\'A}}1
295 {Ä}{{\"A}}1
296 {É}{{\'E}}1
297 {Í}{{\'I}}1
298 {Ó}{{\'O}}1
299 {Ö}{{\"O}}1
300 {Ú}{{\'U}}1
301 {Ü}{{\"U}}1
302 {ß}{{\ss}}2
303 {à}{{\`a}}1
304 {á}{{\'a}}1
305 {ä}{{\"a}}1
306 {é}{{\'e}}1
307 {í}{{\'i}}1
308 {ó}{{\'o}}1
309 {ö}{{\"o}}1
310 {ú}{{\'u}}1
311 {ü}{{\"u}}1
312 {ı}{{\i}}1
313 {—}{{---}}1
314 {’}{{'}}1
315 {…}{{\dots}}1
316 {␣}{{\textvisiblespace}}1,
317 keywordstyle=\color{DarkGreen}\bfseries,
318 identifierstyle=\color{DarkRed},
319 commentstyle=\color{Gray}\upshape,
320 stringstyle=\color{DarkBlue}\upshape,
321 emphstyle=\color{Chocolate}\upshape,
322 showstringspaces=false,
323 columns=fullflexible,
324 keepspaces=true}
325 \usepackage{graphicx}
326 \usepackage[svgnames]{xcolor}
327 \makeatletter
328 \@ifundefined{T}{%
329 \newcommand{\T}[2]{{\fontencoding{T1}\selectfont#2}}}{}
330 \makeatother
331 \usepackage{sectsty}
332 \allsectionsfont{\sffamily}
333 \renewcommand*{\descriptionlabel}[1]{\hspace\labelsep
334 \sffamily\bfseries #1}
335 \usepackage{nicefrac}
336 \def\textonehalf{\ensuremath{\nicefrac12}}
337 \usepackage{fancybox}
338 \usepackage[inline]{enumitem}
339 \setlist[description]{style=unboxed}
340 \usepackage{array}
341 \newcommand{\classorpackage}{package}
342 \usepackage{classpack}
343 %%
344 %% Settings for docstrip and latexdoc
345 %%
346 \EnableCrossrefs
347 \CodelineIndex
348 \RecordChanges
349 \begin{document}
350 \DocInput{makebase.dtx}
351 \end{document}
352 %</driver>
353 % \fi
354 %
355 % \CheckSum{133}
356 %
357 % \CharacterTable
358 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
359 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
360 % Digits \0\1\2\3\4\5\6\7\8\9
361 % Exclamation \! Double quote \" Hash (number) \#
362 % Dollar \$ Percent \% Ampersand \&
363 % Acute accent \' Left paren \( Right paren \)
364 % Asterisk \* Plus \+ Comma \,
365 % Minus \- Point \. Solidus \/
366 % Colon \: Semicolon \; Less than \<
367 % Equals \= Greater than \> Question mark \?
368 % Commercial at \@ Left bracket \[ Backslash \\
369 % Right bracket \] Circumflex \^ Underscore \_
370 % Grave accent \` Left brace \{ Vertical bar \|
371 % Right brace \} Tilde \~}
372 %
373 % \changes{v0.2}{2016/05/10}{Regenerated: Recreated package with new classpack code to create zip file to the CTAN standard.}
374 % \changes{v0.1}{2016/04/28}{Initial test: Rewritten from an earlier test.}
375 %
376 % \GetFileInfo{makebase.dtx}
377 %
378 % \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
379 % \DoNotIndex{\@flushglue,\@gobble,\@input}
380 % \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
381 % \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
382 % \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
383 % \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
384 % \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
385 % \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
386 % \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
387 % \DoNotIndex{\mathcal,\csname,\def,\documentstyle,\dospecials,\edef}
388 % \DoNotIndex{\egroup}
389 % \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
390 % \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
391 % \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
392 % \DoNotIndex{\ifcase}
393 % \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
394 % \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
395 % \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
396 % \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
397 % \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
398 % \DoNotIndex{\strutbox}
399 % \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
400 % \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
401 % \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
402 % \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
403 % \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
404 % \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
405 % \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
406 % \DoNotIndex{\nopagebreak}
407 % \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
408 % \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
409 % \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
410 % \DoNotIndex{\[,\{,\},\]}
411 % \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
412 % \DoNotIndex{\baselineskip,\begin,\tw@}
413 % \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
414 % \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
415 % \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
416 % \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
417 % \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
418 % \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
419 % \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
420 % \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
421 % \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
422 % \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
423 % \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
424 % \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
425 % \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
426 % \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
427 % \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
428 % \DoNotIndex{\bfdefault,\DeclareRobustCommand}
429 % \DoNotIndex{\classorpackage}
430 % \DoNotIndex{\Sil@MB@maxdiv}
431 % \DoNotIndex{\makebase}
432 % \DoNotIndex{\divide}
433 % \DoNotIndex{\multiply}
434 % \DoNotIndex{\repeat}
435 % \setcounter{tocdepth}{5}
436 % \setcounter{secnumdepth}{5}
437 % \makeatletter
438 % \def\@@doxdescribe#1#2{\endgroup \ifdox@noprint\else\marginpar{\raggedleft \textcolor{DarkRed}{\@nameuse{PrintDescribe#1}{#2}}}\fi \ifdox@noindex\else\@nameuse{Special#1Index}{#2}\fi \endgroup\@esphack\ignorespaces}
439 % \makeatother
440 %
441 % \def\fileversion{0.2}
442 % \def\filedate{2016/05/10}
443 % \title{The \textsf{makebase} \LaTeXe\ package\thanks{%
444 % This document corresponds to \textsf{makebase}
445 % \textit{v.}\ \fileversion $\alpha$, dated \filedate.}
446 % \\[1em]\Large
447 % Typeset counters in a different base}
448 % \author{Peter Flynn\\\normalsize Silmaril Consultants\\[-.25ex]\normalsize Textual Therapy Division\\\normalsize(\url{[email protected]})}
449 % \maketitle
450 % \renewcommand{\abstractname}{Summary}\thispagestyle{empty}
451 % \begin{abstract}
452 % \parskip=0.5\baselineskip
453 % \advance\parskip by 0pt plus 2pt
454 % \parindent=0pt% \noindent
455 % This package typesets a \LaTeX{} counter such as {\ttfamily{}page} in an arbitrary base (default
456 % 16). It does not change font or typeface.\par
457 % The package extends the functionality of the existing
458 % \textsf{hex} \LaTeX{}2.09 package and provides
459 % documentation. However, the author is not a mathematician, and
460 % suggestions for rewriting the code are welcomed.\par
461 % Warning: this is alpha software and may contain bugs.
462 % Please report problems to the author.\par
463 % \end{abstract}
464 % \clearpage
465 % \tableofcontents
466 % \clearpage
467 % \section{Description}
468 % This package was developed for an application which
469 % typeset smoke proofs of font characters from the Private Use
470 % areas of Unicode, where the codepoint is a very large number
471 % usually expressed in hexadecimal, and this was required for
472 % the page numbers.\par
473 % The package contains two macros:\par
474 % \begin{enumerate}
475 % \item {\ttfamily{}\textbackslash{}Sil@MB@maxdiv} finds the highest
476 % power of the selected base which is smaller than the value
477 % of the counter and makes it the primary divisor;
478 % \item {\ttfamily{}\textbackslash{}makebase} divides the counter
479 % repeatedly by the divisor found in
480 % {\ttfamily{}\textbackslash{}Sil@MB@maxdiv}, reducing it by one power
481 % each time, and outputting the quotient as a digit.
482 % \end{enumerate}
483 % This has only been tested in page numbering so far (see
484 % the accompanying file
485 % {\ttfamily{}makebase-test.tex}, for example:\par
486 % \iffalse
487 %<*ignore>
488 % \fi
489 \begin{lstlisting}[language={[LaTeX]TeX}]
490 \setcounter{page}{57635}
491 \makebase{page}
492 \end{lstlisting}
493 % \iffalse
494 %</ignore>
495 % \fi
496 % will produce \texttt{0xE123} (the default base is
497 % 16). Using\par
498 % \iffalse
499 %<*ignore>
500 % \fi
501 \begin{lstlisting}[language={[LaTeX]TeX}]
502 \makebase[8]{page}
503 \end{lstlisting}
504 % \iffalse
505 %</ignore>
506 % \fi
507 % produces 0160443.\par
508 % Warning: this is alpha software and may contain bugs.
509 % Please report problems to the author.\par
510 % \StopEventually{\label{endcode}
511 % \clearpage
512 % \newgeometry{left=3cm}
513 % \addcontentsline{toc}{section}{Change History}
514 % \label{}
515 % \PrintChanges
516 % \clearpage
517 % \label{codeindex}
518 % \addcontentsline{toc}{section}{Index}
519 % \PrintIndex}
520 % \addtolength{\revmarg}{\widthof{\LabelFont{Sil@MB@postnum}}}
521 % \newgeometry{left=\revmarg}
522 % \iffalse
523 %<*package>
524 % \fi
525 % \clearpage
526 % \section{Implementation}\label{implementation}
527 %\iffalse
528 %%
529 %% Packages required
530 %%
531 % \fi
532 % \subsection{Packages required for the package itself}\label{stypackages}
533 % \begin{CPK@package}{calc}
534 % Required for calculations involving lengths or counters,
535 % such as changes to widths for margin adjustment.
536 % \iffalse
537 %% Required for calculations involving lengths or counters, such as changes to widths for margin adjustment.
538 % \fi
539 % \begin{macrocode}
540 \RequirePackage{calc}
541 % \end{macrocode}
542 % \end{CPK@package}
543 %
544 % \subsection{Counters}\label{counters}
545 % \begin{CPK@counter}{Sil@MB@prenum}
546 % The value of the counter before calculations start.\par
547 % \begin{macrocode}
548 \newcounter{Sil@MB@prenum}
549 % \end{macrocode}
550 % \end{CPK@counter}
551 % \begin{CPK@counter}{Sil@MB@postnum}
552 % The value of the counter after calculations.\par
553 % \begin{macrocode}
554 \newcounter{Sil@MB@postnum}
555 % \end{macrocode}
556 % \end{CPK@counter}
557 % \begin{CPK@counter}{Sil@MB@quot}
558 % The quotient (number of times the computed divisor
559 % goes into the current value of the counter {\ttfamily{}Sil@MB@postnum}.\par
560 % \begin{macrocode}
561 \newcounter{Sil@MB@quot}
562 % \end{macrocode}
563 % \end{CPK@counter}
564 % \begin{CPK@counter}{Sil@MB@rem}
565 % The remainder after division.\par
566 % \begin{macrocode}
567 \newcounter{Sil@MB@rem}
568 % \end{macrocode}
569 % \end{CPK@counter}
570 % \begin{CPK@macro}{\Sil@MB@div}
571 % The divisor (initially the base).\par
572 % \begin{macrocode}
573 \newcounter{Sil@MB@div}
574 % \end{macrocode}
575 % \end{CPK@macro}
576 % \subsection{Macros}\label{macros}
577 % Two macros are defined: one internal for calculating the
578 % largest dividor needed to start with, and one public, for
579 % implementing the conversion.\par
580 % \begin{CPK@macro}{\Sil@MB@maxdiv}
581 % This is the internal (private) macro.\par
582 % \begin{macrocode}
583 \newcommand{\Sil@MB@maxdiv}[2][16]{%
584 % \end{macrocode}
585 % Record the counter value and the base (default
586 % 16)\par
587 % \begin{macrocode}
588 \setcounter{Sil@MB@div}{#1}%
589 \setcounter{Sil@MB@prenum}{#2}%
590 % \message{Testing \theSil@MB@prenum\space for divisibility
591 % by powers of \theSil@MB@div}%
592 % \end{macrocode}
593 % It repeatedly divides the counter by the base using
594 % \TeX{}'s {\ttfamily{}\textbackslash{}divide} primitive and then
595 % re-multiplies it using {\ttfamily{}\textbackslash{}multiply} to see
596 % if the result is zero yet, and if not, increases the base
597 % by a power and tries again.\par
598 % \begin{macrocode}
599 \loop
600 % \message{...dividing \theSil@MB@prenum\space by \theSil@MB@div}%
601 \divide\c@Sil@MB@prenum by\c@Sil@MB@div
602 \multiply\c@Sil@MB@prenum by\c@Sil@MB@div
603 \multiply\c@Sil@MB@div by#1
604 \ifnum\c@Sil@MB@prenum>0
605 \repeat
606 % \end{macrocode}
607 % Because the repeating condition above cannot include
608 % anything other than the {\ttfamily{}\textbackslash{}repeat} command,
609 % it is necessary to compute the increase of the power
610 % \emph{before} the condition.\par
611 % We therefore need to decrease it on exit to
612 % compensate, before decreasing it yet again to the previous
613 % successful level, which is the one we want to use in the
614 % actual computation as the initial divisor.\par
615 % \begin{macrocode}
616 \divide\c@Sil@MB@div by#1
617 \divide\c@Sil@MB@div by#1
618 % \message{Need to start at \theSil@MB@div.}%
619 }
620 % \end{macrocode}
621 % \end{CPK@macro}
622 % \begin{CPK@macro}{\makebase}
623 % This is the user-level macro which performs the
624 % conversion. It too defaults to base 16.\par
625 % \begin{macrocode}
626 \newcommand{\makebase}[2][16]{%
627 % \end{macrocode}
628 % The first action is to call the internal macro
629 % {\ttfamily{}\textbackslash{}Sil@MB@maxdiv} to compute the initial
630 % divisor as above.\par
631 % \begin{macrocode}
632 \Sil@MB@maxdiv[#1]{#2}%
633 % \end{macrocode}
634 % The prefix \texttt{0x} is output if the base is
635 % 16; for base 8 the prefix is \texttt{0}. These should
636 % probably be developed for other bases with an option to
637 % use \TeX{}'s double-quote and single-quote prefixes.\par
638 % \begin{macrocode}
639 \ifnum#1=16 0x\else\ifnum#1=8 0\fi\fi
640 % \end{macrocode}
641 % Set the initial values for before-and-after
642 % calculation.\par
643 % \begin{macrocode}
644 \setcounter{Sil@MB@prenum}{#2}%
645 \setcounter{Sil@MB@postnum}{#2}%
646 % \message{Formatting \theSil@MB@prenum\space in base#1
647 % starting at \theSil@MB@div}%
648 % \end{macrocode}
649 % Loop through the calculations. If the current divisor
650 % is bigger than the counter, output a zero and decrement
651 % the power.\par
652 % \begin{macrocode}
653 \loop
654 \ifnum\c@Sil@MB@div>\c@Sil@MB@prenum
655 0\divide\c@Sil@MB@div by#1
656 % \message{skipped a power, divisor now \theSil@MB@div}%
657 \fi
658 % \end{macrocode}
659 % Perform the division and record the quotient, then
660 % re-multiply the value so the remainder can be computed.\par
661 % \begin{macrocode}
662 % \message{Dividing \theSil@MB@postnum\space by \theSil@MB@div}%
663 \divide\c@Sil@MB@postnum by\c@Sil@MB@div
664 % \message{...got \theSil@MB@postnum}%
665 \setcounter{Sil@MB@quot}{\value{Sil@MB@postnum}}%
666 % \message{Multiplying \theSil@MB@postnum\space by \theSil@MB@div}%
667 \multiply\c@Sil@MB@postnum by\c@Sil@MB@div
668 % \message{...got \theSil@MB@postnum, setting remainder}%
669 \setcounter{Sil@MB@rem}{\value{Sil@MB@prenum}-\value{Sil@MB@postnum}}%
670 % \message{...got \theSil@MB@rem}%
671 % \end{macrocode}
672 % Output the quotient, allowing for alphabetic
673 % hexadecimal digits.\par
674 % \begin{macrocode}
675 % \par\dots divided \theSil@MB@prenum\ by \theSil@MB@div\
676 % \theSil@MB@quot\ times (\theSil@MB@postnum) leaving \theSil@MB@rem:
677 \ifcase\c@Sil@MB@quot 0\or 1\or 2\or 3\or 4\or 5\or 6\or
678 7\or 8\or 9\or A\or B\or C\or D\or E\or F\else !Z\fi
679 % \end{macrocode}
680 % As in the internal macro, make the resetting of the
681 % next values for the
682 % next loop \emph{before} testing the loop
683 % condition. If the remainder is zero, exit.\par
684 % \begin{macrocode}
685 \setcounter{Sil@MB@prenum}{\value{Sil@MB@rem}}%
686 \setcounter{Sil@MB@postnum}{\value{Sil@MB@rem}}%
687 \divide\c@Sil@MB@div by#1
688 \ifnum\c@Sil@MB@rem>0
689 \repeat
690 }
691 % \end{macrocode}
692 % \end{CPK@macro}
693 % \iffalse
694 %</package>
695 % \fi
696 % \appendix
697 % \iffalse
698 %<*testdoc>
699 % \fi
700 % \clearpage
701 % \section{Test of package}\label{testdoc}
702 % \iffalse
703 %% Test of package% \fi
704 % \begin{macrocode}
705 \documentclass{article}
706 \usepackage{makebase}
707 \setcounter{page}{"E123}
708 \renewcommand{\thepage}{\ttfamily\makebase[16]{\value{page}}}
709 \begin{document}
710 This is page number \arabic{page}.
711 \end{document}
712 % \end{macrocode}
713 % \iffalse
714 %</testdoc>
715 % \fi
716 % \newgeometry{left=3cm}
717 % \clearpage
718 % \section{The \LaTeX{} Project Public License}\label{LPPL:LPPL}
719 % \begin{quotation}\small\noindent
720 % Everyone is allowed to distribute verbatim copies of this
721 % license document, but modification of it is not allowed.
722 % \end{quotation}
723 % \subsection{Preamble}\label{LPPL:Preamble}
724 % The \LaTeX{} Project Public License (\textsc{lppl})
725 % is the primary license under which the \LaTeX{} kernel and the
726 % base \LaTeX{} packages are distributed.\par
727 % You may use this license for any work of which you hold the
728 % copyright and which you wish to distribute. This license may be
729 % particularly suitable if your work is \TeX{}-related (such as a
730 % \LaTeX{} package), but it is written in such a way that you can
731 % use it even if your work is unrelated to \TeX{}.\par
732 % The section \emph{Whether and How to Distribute Works under This
733 % License}, below, gives instructions, examples, and
734 % recommendations for authors who are considering distributing
735 % their works under this license.\par
736 % This license gives conditions under which a work may be
737 % distributed and modified, as well as conditions under which
738 % modified versions of that work may be distributed.\par
739 % We, the \LaTeX{3} Project, believe that the conditions below
740 % give you the freedom to make and distribute modified versions of
741 % your work that conform with whatever technical specifications
742 % you wish while maintaining the availability, integrity, and
743 % reliability of that work. If you do not see how to achieve your
744 % goal while meeting these conditions, then read the document
745 % {\ttfamily{}cfgguide.tex} and {\ttfamily{}modguide.tex} in the base \LaTeX{}
746 % distribution for suggestions.\par
747 % \subsection{Definitions}\label{LPPL:Definitions}
748 % In this license document the following terms are used:\par
749 % \begin{description}[style=unboxed]
750 % \item[Work\thinspace:]Any work being distributed under this License.
751 % \item[Derived Work\thinspace:]Any work that under any applicable law is derived from
752 % the Work.
753 % \item[Modification\thinspace:]Any procedure that produces a Derived Work under any
754 % applicable law~--- for example, the production of a file
755 % containing an original file associated with the Work or a
756 % significant portion of such a file, either verbatim or
757 % with modifications and/or translated into another
758 % language.
759 % \item[Modify\thinspace:]To apply any procedure that produces a Derived Work
760 % under any applicable law.
761 % \item[Distribution\thinspace:]Making copies of the Work available from one person to
762 % another, in whole or in part. Distribution includes (but
763 % is not limited to) making any electronic components of the
764 % Work accessible by file transfer protocols such as
765 % \textsc{ftp} or \textsc{http} or by
766 % shared file systems such as Sun's Network File System
767 % (\textsc{nfs}).
768 % \item[Compiled Work\thinspace:]A version of the Work that has been processed into a
769 % form where it is directly usable on a computer system.
770 % This processing may include using installation facilities
771 % provided by the Work, transformations of the Work, copying
772 % of components of the Work, or other activities. Note that
773 % modification of any installation facilities provided by
774 % the Work constitutes modification of the Work.
775 % \item[Current Maintainer\thinspace:]A person or persons nominated as such within the Work.
776 % If there is no such explicit nomination then it is the
777 % `Copyright Holder' under any applicable
778 % law.
779 % \item[Base Interpreter\thinspace:]A program or process that is normally needed for
780 % running or interpreting a part or the whole of the
781 % Work.\par
782 % A Base Interpreter may depend on external components
783 % but these are not considered part of the Base Interpreter
784 % provided that each external component clearly identifies
785 % itself whenever it is used interactively. Unless
786 % explicitly specified when applying the license to the
787 % Work, the only applicable Base Interpreter is a
788 % `\LaTeX{}-Format' or in the case of files
789 % belonging to the `\LaTeX{}-format' a program
790 % implementing the `\TeX{} language'.
791 % \end{description}
792 % \subsection{Conditions on Distribution and Modification}\label{LPPL:Conditions}
793 % \begin{enumerate}
794 % \item Activities other than distribution and/or modification
795 % of the Work are not covered by this license; they are
796 % outside its scope. In particular, the act of running the
797 % Work is not restricted and no requirements are made
798 % concerning any offers of support for the Work.
799 % \item \label{LPPL:item:distribute}You may distribute a complete, unmodified copy of the
800 % Work as you received it. Distribution of only part of the
801 % Work is considered modification of the Work, and no right to
802 % distribute such a Derived Work may be assumed under the
803 % terms of this clause.
804 % \item You may distribute a Compiled Work that has been
805 % generated from a complete, unmodified copy of the Work as
806 % distributed under Clause~item~\ref{LPPL:item:distribute} above above, as
807 % long as that Compiled Work is distributed in such a way that
808 % the recipients may install the Compiled Work on their system
809 % exactly as it would have been installed if they generated a
810 % Compiled Work directly from the Work.
811 % \item \label{LPPL:item:currmaint}If you are the Current Maintainer of the Work, you may,
812 % without restriction, modify the Work, thus creating a
813 % Derived Work. You may also distribute the Derived Work
814 % without restriction, including Compiled Works generated from
815 % the Derived Work. Derived Works distributed in this manner
816 % by the Current Maintainer are considered to be updated
817 % versions of the Work.
818 % \item If you are not the Current Maintainer of the Work, you
819 % may modify your copy of the Work, thus creating a Derived
820 % Work based on the Work, and compile this Derived Work, thus
821 % creating a Compiled Work based on the Derived Work.
822 % \item \label{LPPL:item:conditions}If you are not the Current Maintainer of the Work, you
823 % may distribute a Derived Work provided the following
824 % conditions are met for every component of the Work unless
825 % that component clearly states in the copyright notice that
826 % it is exempt from that condition. Only the Current
827 % Maintainer is allowed to add such statements of exemption to
828 % a component of the Work.
829 % \begin{enumerate}
830 % \item If a component of this Derived Work can be a direct
831 % replacement for a component of the Work when that
832 % component is used with the Base Interpreter, then,
833 % wherever this component of the Work identifies itself to
834 % the user when used interactively with that Base
835 % Interpreter, the replacement component of this Derived
836 % Work clearly and unambiguously identifies itself as a
837 % modified version of this component to the user when used
838 % interactively with that Base Interpreter.
839 % \item Every component of the Derived Work contains
840 % prominent notices detailing the nature of the changes to
841 % that component, or a prominent reference to another file
842 % that is distributed as part of the Derived Work and that
843 % contains a complete and accurate log of the
844 % changes.
845 % \item No information in the Derived Work implies that any
846 % persons, including (but not limited to) the authors of
847 % the original version of the Work, provide any support,
848 % including (but not limited to) the reporting and
849 % handling of errors, to recipients of the Derived Work
850 % unless those persons have stated explicitly that they do
851 % provide such support for the Derived Work.
852 % \item You distribute at least one of the following with
853 % the Derived Work:
854 % \begin{enumerate}
855 % \item A complete, unmodified copy of the Work; if your
856 % distribution of a modified component is made by
857 % offering access to copy the modified component from
858 % a designated place, then offering equivalent access
859 % to copy the Work from the same or some similar place
860 % meets this condition, even though third parties are
861 % not compelled to copy the Work along with the
862 % modified component;
863 % \item Information that is sufficient to obtain a
864 % complete, unmodified copy of the Work.
865 % \end{enumerate}
866 % \end{enumerate}
867 % \item If you are not the Current Maintainer of the Work, you
868 % may distribute a Compiled Work generated from a Derived
869 % Work, as long as the Derived Work is distributed to all
870 % recipients of the Compiled Work, and as long as the
871 % conditions of Clause~item~\ref{LPPL:item:conditions} above, above, are met
872 % with regard to the Derived Work.
873 % \item The conditions above are not intended to prohibit, and
874 % hence do not apply to, the modification, by any method, of
875 % any component so that it becomes identical to an updated
876 % version of that component of the Work as it is distributed
877 % by the Current Maintainer under Clause~item~\ref{LPPL:item:currmaint} above, above.
878 % \item Distribution of the Work or any Derived Work in an
879 % alternative format, where the Work or that Derived Work (in
880 % whole or in part) is then produced by applying some process
881 % to that format, does not relax or nullify any sections of
882 % this license as they pertain to the results of applying that
883 % process.
884 % \item % \begin{enumerate}
885 % \item A Derived Work may be distributed under a different
886 % license provided that license itself honors the
887 % conditions listed in Clause~item~\ref{LPPL:item:conditions} above above, in
888 % regard to the Work, though it does not have to honor the
889 % rest of the conditions in this license.
890 % \item If a Derived Work is distributed under a different
891 % license, that Derived Work must provide sufficient
892 % documentation as part of itself to allow each recipient
893 % of that Derived Work to honor the restrictions in
894 % Clause~item~\ref{LPPL:item:conditions} above above, concerning
895 % changes from the Work.
896 % \end{enumerate}
897 % \item This license places no restrictions on works that are
898 % unrelated to the Work, nor does this license place any
899 % restrictions on aggregating such works with the Work by any
900 % means.
901 % \item Nothing in this license is intended to, or may be used
902 % to, prevent complete compliance by all parties with all
903 % applicable laws.
904 % \end{enumerate}
905 % \subsection{No Warranty}\label{LPPL:Warranty}
906 % There is no warranty for the Work. Except when otherwise
907 % stated in writing, the Copyright Holder provides the Work
908 % `as is', without warranty of any kind, either
909 % expressed or implied, including, but not limited to, the implied
910 % warranties of merchantability and fitness for a particular
911 % purpose. The entire risk as to the quality and performance of
912 % the Work is with you. Should the Work prove defective, you
913 % assume the cost of all necessary servicing, repair, or
914 % correction.\par
915 % In no event unless required by applicable law or agreed to
916 % in writing will The Copyright Holder, or any author named in the
917 % components of the Work, or any other party who may distribute
918 % and/or modify the Work as permitted above, be liable to you for
919 % damages, including any general, special, incidental or
920 % consequential damages arising out of any use of the Work or out
921 % of inability to use the Work (including, but not limited to,
922 % loss of data, data being rendered inaccurate, or losses
923 % sustained by anyone as a result of any failure of the Work to
924 % operate with any other programs), even if the Copyright Holder
925 % or said author or said other party has been advised of the
926 % possibility of such damages.\par
927 % \subsection{Maintenance of The Work}\label{LPPL:Maintenance}
928 % The Work has the status `author-maintained'
929 % if the Copyright Holder explicitly and prominently states near
930 % the primary copyright notice in the Work that the Work can only
931 % be maintained by the Copyright Holder or simply that it is
932 % `author-maintained'.\par
933 % The Work has the status `maintained' if there
934 % is a Current Maintainer who has indicated in the Work that they
935 % are willing to receive error reports for the Work (for example,
936 % by supplying a valid e-mail address). It is not required for the
937 % Current Maintainer to acknowledge or act upon these error
938 % reports.\par
939 % The Work changes from status `maintained' to
940 % `unmaintained' if there is no Current Maintainer,
941 % or the person stated to be Current Maintainer of the work cannot
942 % be reached through the indicated means of communication for a
943 % period of six months, and there are no other significant signs
944 % of active maintenance.\par
945 % You can become the Current Maintainer of the Work by
946 % agreement with any existing Current Maintainer to take over this
947 % role.\par
948 % If the Work is unmaintained, you can become the Current
949 % Maintainer of the Work through the following steps:\par
950 % \begin{enumerate}
951 % \item Make a reasonable attempt to trace the Current
952 % Maintainer (and the Copyright Holder, if the two differ)
953 % through the means of an Internet or similar search.
954 % \item If this search is successful, then enquire whether the
955 % Work is still maintained.
956 % \begin{enumerate}
957 % \item If it is being maintained, then ask the Current
958 % Maintainer to update their communication data within one
959 % month.
960 % \item \label{LPPL:item:intention}If the search is unsuccessful or no action to resume
961 % active maintenance is taken by the Current Maintainer,
962 % then announce within the pertinent community your
963 % intention to take over maintenance. (If the Work is a
964 % \LaTeX{} work, this could be done, for example, by
965 % posting to \url{news:comp.text.tex}.)
966 % \end{enumerate}
967 % \item % \begin{enumerate}
968 % \item If the Current Maintainer is reachable and agrees to
969 % pass maintenance of the Work to you, then this takes
970 % effect immediately upon announcement.
971 % \item \label{LPPL:item:announce}If the Current Maintainer is not reachable and the
972 % Copyright Holder agrees that maintenance of the Work be
973 % passed to you, then this takes effect immediately upon
974 % announcement.
975 % \end{enumerate}
976 % \item \label{LPPL:item:change}If you make an `intention announcement'
977 % as described in~item~\ref{LPPL:item:intention} above above and after three
978 % months your intention is challenged neither by the Current
979 % Maintainer nor by the Copyright Holder nor by other people,
980 % then you may arrange for the Work to be changed so as to
981 % name you as the (new) Current Maintainer.
982 % \item If the previously unreachable Current Maintainer becomes
983 % reachable once more within three months of a change
984 % completed under the terms of~item~\ref{LPPL:item:announce} above
985 % or~item~\ref{LPPL:item:change} above, then that
986 % Current
987 % Maintainer must become or remain the Current Maintainer upon
988 % request provided they then update their communication data
989 % within one month.
990 % \end{enumerate}
991 % A change in the Current Maintainer does not, of itself,
992 % alter the fact that the Work is distributed under the
993 % \textsc{lppl} license.\par
994 % If you become the Current Maintainer of the Work, you should
995 % immediately provide, within the Work, a prominent and
996 % unambiguous statement of your status as Current Maintainer. You
997 % should also announce your new status to the same pertinent
998 % community as in~item~\ref{LPPL:item:intention} above
999 % above.\par
1000 % \subsection{Whether and How to Distribute Works under This
1001 % License}\label{LPPL:Distribute}
1002 % This section contains important instructions, examples, and
1003 % recommendations for authors who are considering distributing
1004 % their works under this license. These authors are addressed as
1005 % `you' in this section.\par
1006 % \subsubsection{Choosing This License or Another License}\label{LPPL:Choosing}
1007 % If for any part of your work you want or need to use
1008 % \emph{distribution} conditions that differ
1009 % significantly from those in this license, then do not refer to
1010 % this license anywhere in your work but, instead, distribute
1011 % your work under a different license. You may use the text of
1012 % this license as a model for your own license, but your license
1013 % should not refer to the \textsc{lppl} or otherwise
1014 % give the impression that your work is distributed under the
1015 % \textsc{lppl}.\par
1016 % The document {\ttfamily{}modguide.tex} in the base \LaTeX{}
1017 % distribution explains the motivation behind the conditions of
1018 % this license. It explains, for example, why distributing
1019 % \LaTeX{} under the \textsc{gnu} General Public
1020 % License (\textsc{gpl}) was considered inappropriate.
1021 % Even if your work is unrelated to \LaTeX{}, the discussion in
1022 % {\ttfamily{}modguide.tex} may still be
1023 % relevant, and authors intending to distribute their works
1024 % under any license are encouraged to read it.\par
1025 % \subsubsection{A Recommendation on Modification Without
1026 % Distribution}\label{LPPL:WithoutDistribution}
1027 % It is wise never to modify a component of the Work, even
1028 % for your own personal use, without also meeting the above
1029 % conditions for distributing the modified component. While you
1030 % might intend that such modifications will never be
1031 % distributed, often this will happen by accident~--- you may
1032 % forget that you have modified that component; or it may not
1033 % occur to you when allowing others to access the modified
1034 % version that you are thus distributing it and violating the
1035 % conditions of this license in ways that could have legal
1036 % implications and, worse, cause problems for the community. It
1037 % is therefore usually in your best interest to keep your copy
1038 % of the Work identical with the public one. Many works provide
1039 % ways to control the behavior of that work without altering any
1040 % of its licensed components.\par
1041 % \subsubsection{How to Use This License}\label{LPPL:HowTo}
1042 % To use this license, place in each of the components of
1043 % your work both an explicit copyright notice including your
1044 % name and the year the work was authored and/or last
1045 % substantially modified. Include also a statement that the
1046 % distribution and/or modification of that component is
1047 % constrained by the conditions in this license.\par
1048 % Here is an example of such a notice and statement:\par
1049 % \iffalse
1050 %<*ignore>
1051 % \fi
1052 \begin{lstlisting}[language={[LaTeX]TeX}]
1053 %%% pig.dtx
1054 %%% Copyright 2005 M. Y. Name
1055 %%
1056 %% This work may be distributed and/or modified under the
1057 %% conditions of the LaTeX Project Public License, either version 1.3
1058 %% of this license or (at your option) any later version.
1059 %% The latest version of this license is in
1060 %% http://www.latex-project.org/lppl.txt
1061 %% and version 1.3 or later is part of all distributions of LaTeX
1062 %% version 2005/12/01 or later.
1063 %%
1064 %% This work has the LPPL maintenance status `maintained'.
1065 %%
1066 %% The Current Maintainer of this work is M. Y. Name.
1067 %%
1068 %% This work consists of the files pig.dtx and pig.ins
1069 %% and the derived file pig.sty.
1070 \end{lstlisting}
1071 % \iffalse
1072 %</ignore>
1073 % \fi
1074 % Given such a notice and statement in a file, the
1075 % conditions given in this license document would apply, with
1076 % the `Work' referring to the three files
1077 % {\ttfamily{}pig.dtx}, {\ttfamily{}pig.ins}, and {\ttfamily{}pig.sty} (the last being generated
1078 % from {\ttfamily{}pig.dtx} using {\ttfamily{}pig.ins}), the `Base
1079 % Interpreter' referring to any
1080 % `\LaTeX{}-Format', and both `Copyright
1081 % Holder' and `Current Maintainer'
1082 % referring to the person
1083 % M.~Y.~Name\index{!}.\par
1084 % If you do not want the Maintenance section of
1085 % \textsc{lppl} to apply to your Work, change
1086 % `maintained' above into
1087 % `author-maintained'. However, we recommend that
1088 % you use `maintained' as the Maintenance
1089 % section was added in order to ensure that your Work remains
1090 % useful to the community even when you can no longer maintain
1091 % and support it yourself.\par
1092 % \subsubsection{Derived Works That Are Not Replacements}\label{LPPL:NotReplacements}
1093 % Several clauses of the \textsc{lppl} specify
1094 % means to provide reliability and stability for the user
1095 % community. They therefore concern themselves with the case
1096 % that a Derived Work is intended to be used as a (compatible or
1097 % incompatible) replacement of the original Work. If this is not
1098 % the case (e.g., if a few lines of code are reused for a
1099 % completely different task), then clauses 6b and 6d shall not
1100 % apply.\par
1101 % \subsubsection{Important Recommendations}\label{LPPL:Recommendations}
1102 % \paragraph{Defining What Constitutes the Work}
1103 % The \textsc{lppl} requires that distributions
1104 % of the Work contain all the files of the Work. It is
1105 % therefore important that you provide a way for the licensee
1106 % to determine which files constitute the Work. This could,
1107 % for example, be achieved by explicitly listing all the files
1108 % of the Work near the copyright notice of each file or by
1109 % using a line such as:\par
1110 % \iffalse
1111 %<*ignore>
1112 % \fi
1113 \begin{lstlisting}[language={[LaTeX]TeX}]
1114 %% This work consists of all files listed in manifest.txt.
1115 \end{lstlisting}
1116 % \iffalse
1117 %</ignore>
1118 % \fi
1119 % in that place. In the absence of an unequivocal list it
1120 % might be impossible for the licensee to determine what is
1121 % considered by you to comprise the Work and, in such a case,
1122 % the licensee would be entitled to make reasonable
1123 % conjectures as to which files comprise the Work.\par
1124 % \Finale
1125