% \iffalse meta-comment % % Transformed from classpack.xml by ClassPack db2dtx.xsl % version 1.28 (2024-02-21) on Monday 4 March 2024 at 22:35:19 % % classpack.dtx is copyright © 2009-2024 by Peter Flynn % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3 of this license or (at your option) any later % version. The latest version of this license is in: % % http://www.latex-project.org/lppl.txt % % and version 1.3 or later is part of all distributions of % LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status ‘maintained’. % % The current maintainer of this work is Peter Flynn % % This work consists of the files classpack.dtx and classpack.ins, % the derived files classpack.sty, doctexbook.dtd, db2dtx.xsl, db2bibtex.xsl, figtab2latex.xsl, db2md.xsl, classpack.make, decommentbbl.awk, chunk.sh, chunk.awk, % and any other ancillary files listed in the MANIFEST. % % \fi % \iffalse %\NeedsTeXFormat{LaTeX2e}[2015/01/01] %\ProvidesPackage{classpack}[2024/02/21 v1.28 % Package code for supporting ClassPack documentation] %<*driver> \RequirePackage{fix-cm}% because "" :: "attributes" \PassOptionsToPackage{svgnames}{xcolor}% because dependencies dox hypdoc hyperref classpack requires svgnames \PassOptionsToPackage{noprint}{dox}% because requests requires \PassOptionsToPackage{obeyspaces,spaces}{url}% because requests requires \providecommand{\CPKdocname}{classpack} \providecommand{\CPKdoctype}{package} \PassOptionsToPackage{british}{babel}% use of other (non-en-IE) languages \documentclass[11pt]{ltxdoc} %% %% Packages for documentation %% \usepackage{dox}% \newcommand{\LabelFont}[2][\relax]{\strut {\fontencoding\encodingdefault \fontfamily{lmtt}\fontseries{lc}#1\selectfont#2}} \let\CPKmacro\macro\let\CPKendmacro\endmacro \let\CPKenvironment\environment\let\CPKendenvironment\endenvironment \doxitem[idxtype=attribute]{Attribute}{CPKattribute}{attributes} \def\PrintAttributeName#1{\LabelFont{@#1}} \doxitem[idxtype=attvalue]{AttValue}{CPKattributevalue}{attribute values} \def\PrintAttributeValueName#1{\LabelFont{@#1}} \doxitem[idxtype=class]{Class}{CPKclass}{classs} \def\PrintClassName#1{\LabelFont[\fontfamily{lmss}]{#1}} \doxitem[idxtype=comment]{Comment}{CPKcomment}{comments} \def\PrintCommentName#1{\LabelFont[\color{LightGrey}]{#1}} \doxitem[idxtype=counter]{Counter}{CPKcounter}{counters} \def\PrintCounterName#1{\LabelFont{#1}} \doxitem[idxtype=DTD]{DTD}{CPKdtd}{DTDs/Schemas} \def\PrintDTDName#1{\LabelFont{#1}} \doxitem[idxtype=element]{Element}{CPKelement}{element types} \def\PrintElementName#1{\LabelFont{<#1>}} \doxitem[idxtype=entity]{Entity}{CPKentity}{entities} \def\PrintEntityName#1{\LabelFont{\}} \doxitem[idxtype=file]{File}{CPKfile}{files} \def\PrintFileName#1{\LabelFont{#1}} \doxitem[idxtype=function]{Function}{CPKfunction}{functions} \def\PrintFunctionName#1{\LabelFont[\bfseries\itshape]{#1}} \doxitem[idxtype=length]{Length}{CPKlength}{lengths} \def\PrintLengthName#1{\LabelFont{#1}} \doxitem[idxtype=option]{Option}{CPKoption}{options} \def\PrintOptionName#1{\LabelFont{#1}} \doxitem[idxtype=package]{Package}{CPKpackage}{packages} \def\PrintPackageName#1{\LabelFont{#1}} \doxitem[idxtype=parameter]{Parameter}{CPKparameter}{parameters} \def\PrintParameterName#1{\LabelFont{#1}} \doxitem[idxtype=setting]{Setting}{CPKsetting}{settings} \def\PrintSettingName#1{\LabelFont{#1}} \doxitem[idxtype=template]{Template}{CPKtemplate}{templates} \def\PrintTemplateName#1{\LabelFont{#1}} \doxitem[idxtype=variable]{Variable}{CPKvariable}{variables} \def\PrintVariableName#1{\LabelFont{#1}} \usepackage{fix-cm}% \usepackage{fontspec}% \makeatletter \newcommand{\printexternalcurrentfont}{% \expandafter\format@externalcurrentfont\fontname\font:\@nil}% \def\format@externalcurrentfont[#1]:#2\@nil{% \texttt{\@ifnextchar"{\@gobble}{}#1}% }% \makeatother %% fontenc (1.006) omitted in favour of fontspec %% inputenc (1.007) omitted in favour of fontspec %% inputenc (1.009) omitted in favour of fontspec \usepackage{noto}% \usepackage{bbding}% \usepackage{mflogo}% \usepackage[british]{babel}% \usepackage[backend=biber,doi=true, isbn=true,url=true,uniquename=false,style=apa]{biblatex}% \makeatletter \AtBeginDocument{% \setlength{\bibitemsep}{1ex}% \setlength{\bibnamesep}{1.5\itemsep}% \defbibheading{shortbib}[References]% {\section{#1}\parindent0pt}} \@ifpackagewith{babel}{british}{% \DeclareLanguageMapping{british}% {british-apa}}{\relax} \makeatother \makeatletter \providetoggle{blx@skipbiblist} \makeatother \usepackage{csquotes}% \usepackage{array}% \usepackage{calc}% \makeatletter {\scriptsize \global\advance\@totalleftmargin by1em \global\advance\MacroIndent by.5em} \makeatother \usepackage{ccaption}% \captionnamefont{\bfseries} \captionstyle{\raggedright} \usepackage[inline]{enumitem}% \setlist[description]{style=unboxed,font=\sffamily\bfseries} \setlist[itemize]{leftmargin=2em} \setlist[enumerate]{leftmargin=2em} \usepackage{fancybox}% \usepackage{fancyvrb}% \usepackage{relsize}% \usepackage{textcase}% \usepackage{float}% \renewcommand{\topfraction}{.85} \renewcommand{\bottomfraction}{.7} \renewcommand{\textfraction}{.15} \renewcommand{\floatpagefraction}{.66} \renewcommand{\dbltopfraction}{.66} \renewcommand{\dblfloatpagefraction}{.66} \setcounter{topnumber}{9} \setcounter{bottomnumber}{9} \setcounter{totalnumber}{20} \setcounter{dbltopnumber}{9} \usepackage[level]{fmtcount}% \usepackage[a4paper,left=35mm,top=25mm, textwidth=150mm,textheight=229mm,headheight=15pt]{geometry}% \usepackage{fancyhdr}% \renewcommand{\MakeUppercase}{\relax} \pagestyle{fancy} \fancyhead[L]{\sffamily\footnotesize\rightmark} \fancyhead[R]{\sffamily\footnotesize\thepage} \fancyfoot[C]{} \fancyfoot[L]{\sffamily\footnotesize\leftmark} \fancyfoot[R]{\sffamily\footnotesize The \LaTeX\ \textrm{\CPKdocname} \CPKdoctype} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \usepackage{graphicx}% \usepackage{listings}% \lstset{defaultdialect=LaTeXe,frame=single, framesep=.5em,backgroundcolor=\color{AliceBlue}, rulecolor=\color{LightSteelBlue},framerule=1pt} \lstnewenvironment{listingsdoc} {\lstset{language={[LaTeX]TeX}}} {} \newcommand\basicdefault[1]{\footnotesize \color{Black}\ttfamily#1} \lstset{basicstyle=\basicdefault{\spaceskip.5em}} \lstset{literate= {§}{{\S}}1 {©}{{\raisebox{.125ex}{\copyright}\enspace}}1 {«}{{\guillemotleft}}1 {»}{{\guillemotright}}1 {Á}{{\'A}}1 {Ä}{{\"A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ö}{{\"O}}1 {Ú}{{\'U}}1 {Ü}{{\"U}}1 {ß}{{\ss}}2 {à}{{\`a}}1 {á}{{\'a}}1 {ä}{{\"a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ö}{{\"o}}1 {ú}{{\'u}}1 {ü}{{\"u}}1 {¹}{{\textsuperscript1}}1 {²}{{\textsuperscript2}}1 {³}{{\textsuperscript3}}1 {ı}{{\i}}1 {—}{{---}}1 {’}{{'}}1 {…}{{\dots}}1 {➝}{{$leftarrow$}}1 {⮠}{{$\hookleftarrow$}}1 {␣}{{\textvisiblespace}}1, keywordstyle=\color{DarkCyan}\bfseries, identifierstyle=\color{DarkRed}, commentstyle=\color{Gray}\upshape, stringstyle=\color{DarkBlue}\upshape, emphstyle=\color{DarkGreen}\upshape, showstringspaces=false, columns=fullflexible, keepspaces=true} \lstdefinelanguage{LaTeXe}[LaTeX]{TeX}{% morekeywords = {selectlanguage,foreignlanguage, textbrokenbar,textlangle,textrangle,subsection,url, chapter,tableofcontents,part,subsubsection,paragraph, subparagraph,maketitle,setlength,listoffigures, listoftables,color,arraybackslash,includegraphics, textcite,parencite,graphicspath,lstinline,doxitem, DeclareLanguageMapping,textcolor,definecolor,colorbox, fcolorbox,RequirePackage,PassOptionsToPackage}% } \lstdefinelanguage{XPath}{morekeywords={ordinal}} \lstdefinelanguage{bash}{% morestring=[s]{[]},morekeywords={exit,logout,yes,no,@, password,ssh,URL,cd,dvips,latex,ls,makeindex,man,mkdir, pdflatex,sudo,texconfig,texdoc,updmap,xelatex,biber, latexmk,bibtex}% } \lstdefinelanguage{Makefile}{% otherkeywords={.PHONY,.DEFAULT},% morekeywords={PHONY,DEFAULT,shell,ifeq,else,endif},% keywordsprefix={.},% moredelim=[l][\color{Green}]{:},% morecomment=[l]{\#},% moredelim=[s][\color{Blue}]{\$(}{)}% } \lstdefinelanguage{DTD}[]{XML}{% morekeywords={ELEMENT,ENTITY,ATTLIST,CDATA,ID,REQUIRED, IMPLIED,PCDATA}% } \lstdefinelanguage{BiBTeX}{% morestring=[s]{\{\}},morekeywords={Article,Book, BookInBook,Booklet,Collection,InBook,InCollection, InProceedings,InReference,MVBook,MVCollection, MVProceedings,MVReference,Manual,Misc,Online,Patent, Periodical,Proceedings,Reference,Report,SuppBook, SuppCollection,SuppPeriodical,Thesis,Unpublished, address,annote,author,booktitle,chapter,crossref, edition,editor,howpublished,institution,journal, key,month,note,number,organization,pages,publisher, location,school,institution,series,title,type,volume, year,date},morestring=[b]% } \lstloadlanguages{LaTeXe,XSLT,XML,XPath,bash,Makefile,DTD,BiBTeX,awk} \usepackage{ltxcmds}% \usepackage{makeidx}% \makeindex \usepackage{parskip}% \usepackage{ragged2e}% \usepackage{sectsty}% \allsectionsfont{\sffamily\raggedright} \renewcommand*{\descriptionlabel}[1]{\hspace\labelsep \sffamily\bfseries #1} \usepackage[normalem]{ulem}% \usepackage{url}% \AtBeginDocument{\urlstyle{tt}} \usepackage{varioref}% \vrefwarning \labelformat{appendix}{Appendix~#1} \makeatletter \labelformat{chapter}{\@chapapp~#1} \makeatother \labelformat{section}{section~#1} \labelformat{subsection}{section~#1} \labelformat{subsubsection}{section~#1} \labelformat{paragraph}{section~#1} \labelformat{figure}{Figure~#1} \labelformat{table}{Table~#1} \labelformat{item}{item~#1} \renewcommand{\reftextcurrent}{on this page} \def\reftextafter{on the \reftextvario{next}{following} page} \usepackage{xcolor}% \makeatletter \@ifundefined{T}{% \newcommand{\T}[2]{{\fontencoding{T1}% \selectfont#2}}}{} \makeatother \usepackage{classpack}% \usepackage{hypdoc}% \hypersetup{linkcolor=DarkGreen,citecolor=DarkRed,urlcolor=Blue,colorlinks=true} \makeatletter \@ifpackageloaded{biblatex}{% \makeatother \ExecuteBibliographyOptions{maxcitenames=1} \DeclareFieldFormat{citehyperref}{% \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links \bibhyperref{#1}} \DeclareFieldFormat{textcitehyperref}{% \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links \bibhyperref{% #1% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}}} \savebibmacro{cite} \savebibmacro{textcite} \renewbibmacro*{cite}{% \printtext[citehyperref]{% \restorebibmacro{cite}% \usebibmacro{cite}}} \renewbibmacro*{textcite}{% \ifboolexpr{ ( not test {\iffieldundef{prenote}} and test {\ifnumequal{\value{citecount}}{1}} ) or ( not test {\iffieldundef{postnote}} and test {\ifnumequal{\value{citecount}}{\value{citetotal}}} ) } {\DeclareFieldAlias{textcitehyperref}{noformat}} {}% \printtext[textcitehyperref]{% \restorebibmacro{textcite}% \usebibmacro{textcite}}} }{\relax} \usepackage{hyperref}% \hypersetup{linkcolor=DarkGreen,citecolor=DarkRed, urlcolor=Blue,colorlinks=true} \AtBeginDocument{\renewcommand{\UrlFont}{\ttfamily}} \usepackage{menukeys}% \renewmenumacro{\menu}[>]{roundedmenus} \renewmenumacro{\directory}[/]{pathswithblackfolder} \renewmenumacro{\keys}{shadowedroundedkeys} \usepackage[ragged]{footmisc}% \addbibresource{classpack.bib} \hypersetup{pdfauthor={Peter Flynn}, pdftitle={The classpack LaTeX2e document package}, pdfsubject={XML mastering for \LaTeX{} classes and packages}, pdfkeywords={latex,typesetting,package,class,xml,management,document}, pdfproducer={XeLateX with hyperref}, pdfcreator={Emacs/psgml, ClassPack/Saxon, LaTeX/TeX Live}} \setmonofont{AnkaCoder-C75}[ Scale=MatchLowercase, Extension= .ttf, UprightFont = *-r, ItalicFont = *-i, BoldFont = *-b, BoldItalicFont = *-bi ] % %% %% Settings for docstrip and ltxdoc %% \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document}\raggedright \DocInput{classpack.dtx} \end{document} % % \fi % % \CheckSum{2448} % % \CharacterTable % {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 % 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 % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \changes{v1.28}{2024/02/21}{1) Full regression test on all maintained packages. AutoPackage methoology being documented separately; 2) The code for the widening of the LH margin in mid-document (removed in 1.27) remains in abeyance until some of the discrepancies with fancyhdr headings are resolved; 3) The problem with the dox package interpreting end{macrocode} when it occurs in mid-code and mid-line has been temporarily circumvented by splitting the relevant xsl:text to output the command in two pieces; 4) Additional discrepancy discovered of Doc\TeX{} parsing an ifcase command mentioned in a comment behind a double percent signs in the .dtx file. The package text has been reworded to avoid this until we find out what's happening; 5) The hard-coded list of annotation types in prepost.xml (also used in inline element types like varname) has been replaced by a lookup using the otherwise unused arg element in cmdsynopsis for the dox package in the postpackage part of prepost.xml. This is used to create doxitem commands only for those annotation types that are actually used in the document; 6) In a similar manner, the language list for the listings package (again in the postpackage part of prepost.xml) has been given xml:ids so that only those languages referenced in a document find their way into the .dtx file.} % \changes{v1.27}{2024/01/30}{1) Rewrite of the way in which packages are detected and handled for the AutoPackage mechanism; 2) Removed (commented out) the code for the widening of the LH margin in mid-document to accommodate long macro names. For the moment it uses fixed margins all the way through. The adjustment feature may return if problems with the formatting of other page elements (particularly running headers and footers) can be resolved.; 3) Ongoing work to find out why the dox package is interpreting end{macrocode} when it occurs in mid-code and not at the start of the line.; 4) Minor corrections to formatting.} % \changes{v1.26}{2023/12/30}{Regression release for revised db2dtx.xsl 3.1.} % \changes{v1.25}{2023/10/06}{Added db:book alone as an extra test in attribute-value-match so that a condition for book/@status="draft" would be picked up (all the other tests started too far down the tree)..} % \changes{v1.24}{2023/07/04}{1) Rationalised the transformation of autopackage packages from prepost.xml format to document format; 2) Split the XPath that finds them into six segments so that the finds can be categorised properly; 3) Rewrote the transformation from the packages tree into the \LaTeX{} serialisation (with new routines for preliminary RequirePackage and for PassOptionsToPackage), using the rationalised attributes on the new packages tree..} % \changes{v1.23}{2023/06/05}{Finished repairs to the extracting routines for code, added a bypass to allow for deferred comments at the top of shell scripts to avoid trampling on the hashbang.Renamed the development package back to classpack and re-ran all tests..} % \changes{v1.22}{2023/05/16}{Rearranged documentation order, moved regular classpack.sty code back into the document in preparation for merging the dev code and going back to a single package. Corrected errors in autopackage and rewrote the XPath for detecting matches from prepost.xsl..} % \changes{v1.21}{2020/06/16}{Re-ordered and documented font selection in prepost.xml.} % \changes{v1.20}{2020/06/12}{Major edit of user documentation to remove duplications..} % \changes{v1.19}{2020/05/24}{1) Added hypdoc package as default for documentation in prepost.xml to overcome makeindex bug using hyperref (thanks to Ulrike Fischer on c.t.t); 2) Replaced the tabular used for the forced inclusion of the first three lines of the class or package in (in order to maintain the line-count) with three plain lines because something in hyperref was messing with Doc\TeX{} in a way that hypdoc doesn’t; 3) Rewrote documentation about how makepackages constructs the list of candidate element types.} % \changes{v1.18}{2020/04/01}{1) Replaced conformance with YYYY-MM-DD on all date elements in the revision history. This means a complete regression run after editing all source masters to use this change; 2) Fixed bug in makechapapp where it failed to add the filetype before substringing the full name of the document; 3) Split project into classpack and classpack-dev so as not to overload the regular user with stuff they don’t need.} % \changes{v1.17}{2020/03/19}{1) Documentation nearly finished; 2) Added remaining XSLT files and scripts; 3) Recoded the distinction between appendixes in the code part and chapters in the files part..} % \changes{v1.16}{2019/10/20}{1) Documentation ongoing; 2) Added detection of options on url and xcolor; 3) Changed order of packages in prepost.xml to prevent option clashes.} % \changes{v1.15}{2019/10/10}{1) Started massive documentation effort on XSLT; 2) Order of templates changed in XSLT.} % \changes{v1.14}{2019/07/25}{1) Updated the Markdown driver for the README to produce code that displays correctly in the Markdown Viewer 3.6 extension for Chrome and conforms to the CTAN rules.; 2) Added details of ClassPack to the MD file header; 3) Some reorganisation of topics; 4) More annotation-level documentation on the XSLT code.} % \changes{v1.13}{2019/02/18}{1) Created commentchar and termcommentchar functions; 2) Untested invocation in sect1 template.} % \changes{v1.12}{2019/02/17}{1) Started tidying up sentinel and fence; 2) Involves rationalising the use of chapter and appendix within part; 3) parameterised a makesentinel, maketermsentinel, and makefence in sect1 but they don’t get called because of [2] above.} % \changes{v1.11}{2019/02/13}{1) Fixed numerous bugs in handling of listings; 2) Moved DTD annotations to doc as chapter while logic for appendixes not working properly; 3) Finished PE chunking of db2dtx.xsl and doctexbook-master.dtd; 4) Finished writing the chunk script.} % \changes{v1.10}{2019/01/22}{1) Added attributes to programlisting for fragmentary listings; 2) Changed emphasis with role=bold to be plain bold, not bold italic; 3) Changed blockquotes to blue in the PDF, added recognition of xlink:href to give source ack as URI.} % \changes{v1.09}{2018/07/07}{Skipped the application of headers to appendix files: 1) Files written from the appendix element no longer get the LaTeX headers prepended; 2) The sentinel value for comments in scripts now reflects the double hash; 3) Added the remark element to db2md.xsl (with plain para); 4) Ongoing updates and explanation.} % \changes{v1.08}{2018/02/07}{Moved RFC2119 warning, and did some minor rewording: 1) Removed RFC2119 warning text from db2dtx.xsl to rfc2119.xml, creating a section to hold it and the bibliography. Rewrote the templates for bibliolist, biblioentry, bibliography, and section/title to accommodate this.; 2) Ongoing updates and explanation.} % \changes{v1.07}{2018/01/12}{Minor adaptations to quoted chunks of code: Updated to use \XeLaTeX{}.} % \changes{v1.06}{2017/06/16}{Maintenance release: Rearranged output so that change log and index always get printed.} % \changes{v1.05}{2017/04/03}{Maintenance: 1) Updated documentation; 2) Tested additional outputs.} % \changes{v1.04}{2016/12/20}{Reusable code blocks: 1) Added an attribute reuse to the annotation element for use in Appendixes which generate additional \LaTeX{} class or package files, which points at an xml:id attribute on an existing annotation element already used elsewhere so that the same documentation text can be included. Also added an omit attribute to the seglistitem elements in the constraintdef element for class packages which specifies that the relevant package is not required for the additional class or package being generated.; 2) Changed the documentation font to Noto..} % \changes{v1.03}{2016/08/13}{Bundle identifiers: 1) Added a line to the Makefile to pick out the date of the most-recently-updated file and put it in a file called VERSION (suggestion from Petra Rübe-Pugliese at CTAN based on their docs).; 2) Regularised the identity of the version date from a global variable date, rather than working it out each time..} % \changes{v1.025}{2016/08/12}{README: Title and identity moved to a template and deleted from readme.xml.} % \changes{v1.02}{2016/07/05}{Moved specification for babel to pre-options: 1) The babel package is now pre-specified with the PassOptionsToPackage command, to avoid conflicts with options later; 2) Now using \XeLaTeX{} and biber.} % \changes{v1.01}{2016/06/12}{Edited out duplications in documentation: 1) Tidied explanations and documented the markup in more detail; 2) Now using \XeLaTeX{} and biber.} % \changes{v1.0}{2016/06/12}{Tidied up the processing and greatly extended documentation: 1) Rewrote almost all the description of how to create the basic XML file; 2) The RFC2119 Note now automatically includes the relevant \BibTeX{} entry in the .bib file (done in the Makefile).} % \changes{v0.92}{2016/05/12}{Major changes to the way the .dtx code is created: 1) Moved the specification of the processor from an attribute on the root element to the part start-tag for documentation; 2) Switched from the build file to a Makefile (still incomplete).; 3) Enabled the use of \XeLaTeX{} for the documentation in the .dtx file; 4) Largely rewrote the code for auto-detecting and adding packages, combining the auto-detect packages with those specified by the author. It now includes: a] negatable crosslinks specified in the remap on the constructorsynopsis start-tag (eg specifying the use of \XeLaTeX{} automatically invokes fontspec and defeats the autoload of the inputenc and fontenc packages), b] addition of the use of the arch and condition attributes on the bibliography start-tag to hold the \BibTeX{} package (biblatex) and the \BibTeX{} engine (biber), c] changes from the text-mode README to a MarkdownREADME.md to accommodate TUG’s submission process; 5) The layout of the zip files has been significantly changed to accord with the submission requirements of CTAN; 6) A Bibliography of the documentation is now extracted to disk directly in the XSLT process, rather than via the VerbatimOut environment in the .dtx file; 7) The RFC2119 Note now automatically includes the relevant \BibTeX{} entry in the .bib file (done in the Makefile).} % \changes{v0.915}{2016/05/11}{Merged: Merged default packages with author-requested ones..} % \changes{v0.91}{2016/05/10}{Regenerated: Recreated package with new classpack code to create zip file to the CTAN standard.} % \changes{v0.905}{2015/10/06}{Enhanced: Added support for \XeLaTeX{}.} % \changes{v0.9}{2015/12/19}{Removed fixltx2e: The code from the fixltx2e package has now been merged into the kernel, so the preload of this package is no longer needed..} % \changes{v0.82}{2014/03/31}{Fixed hline bug: Should have been renewcommand not def.} % \changes{v0.81}{2014/03/14}{Added more logo commands: XeTeX, XeLaTeX.} % \changes{v0.80}{2014/03/10}{Moved doc commands from XSLT2: ToC settings and revmarg.} % \changes{v0.79}{2014/03/07}{Editorial update: Small corrections.} % \changes{v0.78}{2014/03/06}{Changed default code color: MacroFont now DarkBlue.} % \changes{v0.77}{2013/05/28}{Removed unwanted definitions: classorpackage.} % \changes{v0.76}{2013/05/05}{Modified documentation: Started working on Makefile.} % \changes{v0.75}{2013/03/14}{Added secondary files: Secondary output files possible; reversed usage of role attribute on keywords;.} % \changes{v0.74}{2013/02/21}{Added experimental autopackage: This implements automated package inclusion based on the markup used by the author..} % \changes{v0.73}{2012/06/19}{Added readme.xml and db2plaintext.xsl: This implements dynamic README generation..} % \changes{v0.72}{2012/02/11}{Wrote internal documentation: Created the classpack.xml template as an example..} % \changes{v0.71}{2012/02/08}{First time this was used to document itself: The title element and subtitle element are now subsumed beneath the generated title in the output..} % \changes{v0.7}{2012/01/19}{Testing for self-replication: Danger, Will Robinson!.} % \changes{v0.6}{2011/12/27}{Changes to date calculations: More use of functions.} % \changes{v0.5}{2011/08/14}{Bugfixes: Cleaned up XSLT code.} % \changes{v0.4}{2011/05/09}{Added options: Mostly for controlling appearance.} % \changes{v0.3}{2011/04/07}{More work with UCC thesis class: Added links to bibliographic styles.} % \changes{v0.2}{2010/05/22}{Used UCC thesis class as test: Devised method for creating bulk options.} % \changes{v0.1}{2009/10/22}{First draft: 1) Construction of .dtx file working; 2) Tested with personal class.} % % \GetFileInfo{classpack.dtx} % % \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty} % \DoNotIndex{\@flushglue,\@gobble,\@input,\@makefnmark} % \DoNotIndex{\@makeother,\@maketitle,\@namedef,\@ne} % \DoNotIndex{\@spaces,\@tempa,\@tempb,\@tempswafalse} % \DoNotIndex{\@tempswatrue,\@thanks,\@thefnmark,\@topnum} % \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa} % \DoNotIndex{\@totalleftmargin,\",\/,\@ifundefined,\@nil} % \DoNotIndex{\@verbatim,\@vobeyspaces,\|,\~,\ ,\active} % \DoNotIndex{\advance,\aftergroup,\begingroup,\bgroup} % \DoNotIndex{\mathcal,\csname,\def,\documentstyle} % \DoNotIndex{\dospecials,\edef,\egroup,\else,\endcsname} % \DoNotIndex{\endgroup,\endinput,\endtrivlist} % \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef} % \DoNotIndex{\global,\hbox,\hss,\if,\if@inlabel} % \DoNotIndex{\if@tempswa,\if@twocolumn,\ifcase,\ifcat} % \DoNotIndex{\iffalse,\ifx,\ignorespaces,\index,\input} % \DoNotIndex{\item,\jobname,\kern,\leavevmode,\leftskip} % \DoNotIndex{\let,\llap,\lower,\m@ne,\next,\newpage} % \DoNotIndex{\nobreak,\noexpand,\nonfrenchspacing} % \DoNotIndex{\obeylines,\or,\protect,\raggedleft} % \DoNotIndex{\rightskip,\rm,\sc,\setbox,\setcounter} % \DoNotIndex{\small,\space,\string,\strut,\strutbox} % \DoNotIndex{\thefootnote,\thispagestyle,\topmargin} % \DoNotIndex{\trivlist,\tt,\twocolumn,\typeout,\vss,\vtop} % \DoNotIndex{\xdef,\z@,\,,\@bsphack,\@esphack,\@noligs} % \DoNotIndex{\@vobeyspaces,\@xverbatim,\`,\catcode,\end} % \DoNotIndex{\escapechar,\frenchspacing,\glossary} % \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht} % \DoNotIndex{\it,\langle,\leaders,\long,\makelabel} % \DoNotIndex{\marginpar,\markboth,\mathcode,\mathsurround} % \DoNotIndex{\mbox,\newcount,\newdimen,\newskip} % \DoNotIndex{\nopagebreak,\parfillskip,\parindent} % \DoNotIndex{\parskip,\penalty,\raise,\rangle,\section} % \DoNotIndex{\setlength,\TeX,\topsep,\underline,\unskip} % \DoNotIndex{\verb,\vskip,\vspace,\widetilde,\\,\%,\@date} % \DoNotIndex{\@defpar,\[,\{,\},\],\count@,\ifnum,\loop} % \DoNotIndex{\today,\uppercase,\uccode,\baselineskip} % \DoNotIndex{\begin,\tw@,\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k} % \DoNotIndex{\l,\m,\n,\o,\p,\q,\r,\s,\t,\u,\v,\w,\x,\y,\z} % \DoNotIndex{\A,\B,\C,\D,\E,\F,\G,\H,\I,\J,\K,\L,\M,\N,\O} % \DoNotIndex{\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z,\1,\2,\3,\4} % \DoNotIndex{\5,\6,\7,\8,\9,\0,\!,\#,\$,\&,\',\(,\)} % \DoNotIndex{\+,\.,\:,\;,\<,\=,\>,\?,\_,\discretionary} % \DoNotIndex{\immediate,\makeatletter,\makeatother} % \DoNotIndex{\meaning,\newenvironment,\par,\relax} % \DoNotIndex{\renewenvironment,\repeat,\scriptsize} % \DoNotIndex{\selectfont,\the,\undefined,\arabic,\do} % \DoNotIndex{\makeindex,\null,\number,\show,\write,\@ehc} % \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title} % \DoNotIndex{\everypar,\if@minipage,\if@restonecol,\ifeof} % \DoNotIndex{\ifmmode,\lccode,\newtoks,\onecolumn,\openin} % \DoNotIndex{\p@,\SelfDocumenting,\settowidth} % \DoNotIndex{\@resetonecoltrue,\@resetonecolfalse,\bf} % \DoNotIndex{\clearpage,\closein,\lowercase,\@tempdima} % \DoNotIndex{\@inlabelfalse,\selectfont,\mathcode} % \DoNotIndex{\newmathalphabet,\rmdefault,\bfdefault} % \DoNotIndex{\DeclareRobustCommand,\@ifpackagewith} % \DoNotIndex{\#,\%,\&,\*,\-,\^,\_,\|,\~,\$} % \DoNotIndex{\acro,\addbibresource,\addcontentsline,\addtolength} % \DoNotIndex{\allowbreak,\alph,\@Alph,\and,\appendix,\arrayrulewidth} % \DoNotIndex{\ast,\baselinestretch,\bfseries,\bgroup,\Bib,\BibTeX} % \DoNotIndex{\BiBTeX,\BIBTeX,\bigskip,\box,\caption,\centering,\char} % \DoNotIndex{\CharacterTable,\CheckSum,\citeyear,\cjktext,\ClassError} % \DoNotIndex{\classorpackage,\CodelineIndex,\color,\colorbox} % \DoNotIndex{\columnsep,\columnwidth,\Con,\ConTeXt} % \DoNotIndex{\CPKannotationindent,\CPKdocname,\CPKdoctype,\CPKmenusep} % \DoNotIndex{\CPKpoststrut,\CPKprestrut,\CPKrevmarg,\CPKrunningecho} % \DoNotIndex{\CPKthisjob,\CPKthispackage,\CPKvstrut,\c@section} % \DoNotIndex{\@currsize,\DeclareOption,\declarepostamble} % \DoNotIndex{\declarepreamble,\DescribeColor,\DescribeEnv} % \DoNotIndex{\DescribeError,\DescribeOption,\DescribePackage} % \DoNotIndex{\DescribeTemplate,\descriptionlabel,\divide,\DoNotIndex} % \DoNotIndex{\dotfill,\dots,\@dottedtocline,\DoubleperCent,\doxitem} % \DoNotIndex{\dp,\egroup,\emph,\empty,\EnableCrossrefs} % \DoNotIndex{\encodingdefault,\endbatchfile,\endpreamble,\enspace} % \DoNotIndex{\ensuremath,\fa,\fbox,\fboxrule,\fboxsep,\file,\Finale} % \DoNotIndex{\flushright,\fnote,\font,\fontdimen,\fontencoding} % \DoNotIndex{\fontfamily,\fontseries,\fontshape,\fontsize,\footnote} % \DoNotIndex{\footnotesize,\from,\generate,\GetFileInfo,\HandRight} % \DoNotIndex{\@height,\@@hline,\href,\hrule,\hsize,\huge,\Huge} % \DoNotIndex{\hyperref,\hypersetup,\hyphenation,\ifdim,\@ifnextchar} % \DoNotIndex{\itshape,\keepsilent,\keys,\labelenumi,\LabelFont} % \DoNotIndex{\labelformat,\large,\Large,\LARGE,\LaTeX,\LaTeXe} % \DoNotIndex{\leftmark,\lfoot,\lhead,\longestline,\lstloadlanguages} % \DoNotIndex{\l@subsection,\l@subsubsection,\ltx@ifpackageloaded} % \DoNotIndex{\LyX,\MacroFont,\marginfont,\marginnote,\medskip} % \DoNotIndex{\menu,\menusep,\message,\MF,\@minus,\MP,\Msg} % \DoNotIndex{\multirow,\NeedsTeXFormat,\newcommand,\newcounter} % \DoNotIndex{\newgeometry,\newlength,\newwrite,\nicefrac,\noalign} % \DoNotIndex{\nocite,\noindent,\nolinkurl,\nopreamble,\normalfont} % \DoNotIndex{\normalsize,\numberstring,\obeyspaces,\ordinal} % \DoNotIndex{\PackageError,\pageref,\phantomsection,\@plus} % \DoNotIndex{\@pnumwidth,\preamble,\PrintChanges} % \DoNotIndex{\printexternalcurrentfont,\PrintIndex,\Provides} % \DoNotIndex{\qquad,\quad,\raisebox,\RecordChanges,\reflectbox} % \DoNotIndex{\refname,\renewcommand,\renewmenumacro,\reserved@a} % \DoNotIndex{\rightarrow,\rightmark,\rmfamily,\rotatebox,\rule} % \DoNotIndex{\school,\sloppy,\smallskip,\SMC,\SMC@unknown@warning} % \DoNotIndex{\Square,\stanza,\star,\@startsection,\stepcounter} % \DoNotIndex{\StopEventually,\subsubsection,\tableofcontents} % \DoNotIndex{\textbackslash,\textbf,\textdegree,\texteiad} % \DoNotIndex{\textheight,\textit,\textlangle,\textrangle,\textsf} % \DoNotIndex{\textSMC,\textsuperscript,\texttt,\TheSbox} % \DoNotIndex{\thesection,\thinspace,\tiny,\@tocrmarg} % \DoNotIndex{\tubhideheight,\tubreflect,\uline,\updefault} % \DoNotIndex{\upshape,\use@babel,\@usebib,\usedir,\usepostamble} % \DoNotIndex{\usepreamble,\vbox,\vfill,\vrefrange,\vrule} % \DoNotIndex{\Xe,\XeLaTeX,\XeTeX,\@xhline} % \DoNotIndex{\xsl:text} % \DoNotIndex{\ifcase} % \DoNotIndex{\doxitem} % \DoNotIndex{\PassOptionsToPackage} % \DoNotIndex{\RaggedRight} % \DoNotIndex{\varname} % \DoNotIndex{\RequirePackage} % \DoNotIndex{\raggedright} % \DoNotIndex{\sffamily} % \DoNotIndex{\usepackage} % \DoNotIndex{\title} % \DoNotIndex{\author} % \DoNotIndex{\abstractname} % \DoNotIndex{\changes} % \DoNotIndex{\section} % \DoNotIndex{\subsection} % \DoNotIndex{\MacroFont} % \DoNotIndex{\newif} % \DoNotIndex{\definecolor} % \DoNotIndex{\DocInput} % \DoNotIndex{\PassOptionsToClass} % \DoNotIndex{\LoadClass} % \DoNotIndex{\@@doxdescribe} % \DoNotIndex{\makeatletter} % \DoNotIndex{\makeatother} % \DoNotIndex{\make} % \DoNotIndex{\makeindex} % \DoNotIndex{\ref} % \DoNotIndex{\maketitle} % \DoNotIndex{\label} % \DoNotIndex{\small} % \DoNotIndex{\ttfamily} % \DoNotIndex{\scriptsize} % \DoNotIndex{\parskip} % \DoNotIndex{\url} % \DoNotIndex{\vref} % \DoNotIndex{\vpageref} % \DoNotIndex{\vrange} % \DoNotIndex{\bibname} % \DoNotIndex{\subsubsection} % \DoNotIndex{\hline} % \DoNotIndex{\endinput} % \DoNotIndex{\Print*Name} % \DoNotIndex{\decorule} % \DoNotIndex{\ProvidesFile} % \DoNotIndex{\ProvidesClass} % \DoNotIndex{\ProvidesPackage} % \DoNotIndex{\documentclass} % \DoNotIndex{\thanks} % \DoNotIndex{\fileversion} % \DoNotIndex{\filedate} % \DoNotIndex{\appendix} % \DoNotIndex{\paragraph} % \DoNotIndex{\subparagraph} % \DoNotIndex{\par} % \DoNotIndex{\item} % \DoNotIndex{\verb} % \DoNotIndex{\DescribeClass} % \DoNotIndex{\DescribeMacro} % \DoNotIndex{\foreignlanguage} % \DoNotIndex{\DescribeFunction} % \DoNotIndex{\includegraphics} % \DoNotIndex{\changemenucolor} % \DoNotIndex{\hyperlink} % \DoNotIndex{\lstlisting} % \DoNotIndex{\oarg} % \DoNotIndex{\marg} % \DoNotIndex{\Describe} % \DoNotIndex{\lstinputlisting} % \DoNotIndex{\basicstyle} % \DoNotIndex{\textsc} % \DoNotIndex{\lstdefinelanguage} % \DoNotIndex{\lstloadlanguages} % \DoNotIndex{\Describe*} % \DoNotIndex{\parencite} % \DoNotIndex{\fullcite} % \DoNotIndex{\citetitle} % \DoNotIndex{\cite} % \DoNotIndex{\textcite} % \DoNotIndex{\printbibliography} % \DoNotIndex{\bibliography} % \DoNotIndex{\bibliographystyle} % \DoNotIndex{\multicolumn} % \DoNotIndex{\arraybackslash} % \DoNotIndex{\widthof} % \DoNotIndex{\vstrut} % \DoNotIndex{\includepdf} % \DoNotIndex{\yes} % \setcounter{tocdepth}{5} % \setcounter{secnumdepth}{5} % \makeatletter % \def\@@doxdescribe#1#2{\endgroup \ifdox@noprint\else\marginpar{\raggedleft \@nameuse{PrintDescribe#1}{\LabelFont[\color{DarkRed}]{#2}}}\fi \ifdox@noindex\else \@nameuse{Special#1Index}{#2}\fi \endgroup\@esphack\ignorespaces} % \makeatother % % \def\fileversion{1.28} % \def\filedate{2024/02/21} % \title{The \textsf{classpack} \LaTeXe\ package\thanks{% % This document corresponds to \textsf{classpack} % \textit{v.}\ \fileversion , dated \filedate.} % \\[1em]\Large % XML mastering for \LaTeX{} classes and packages % \\[1ex]\large % Literate-programming solution \\ % for class and package maintenance} % \author{Peter Flynn\\\normalsize Silmaril Consultants\\[-.25ex]\normalsize Textual Therapy Division\\\normalsize(\url{peter@silmaril.ie})} % \maketitle % \renewcommand{\abstractname}{Summary}\thispagestyle{empty} % \begin{abstract} % \parskip=0.5\baselineskip % \advance\parskip by 0pt plus 2pt % \parindent=0pt% \noindent % \LaTeX{} document classes and packages are conventionally % created, maintained, and distributed in Doc\TeX{} % ({\ttfamily{}.dtx}) format using the % \textsf{ltxdoc} class, which provides for % interleaved code and documentation (`literate % programming'). However, the accurate construction of % these files is technically challenging, and editing them is % tedious and error-prone.\par % \emph{ClassPack} allows a \LaTeX{} % developer to create a \emph{DocBook5} \textsc{xml} document for a class or package, % containing the code interleaved with annotations, plus a % section for the documentation. It provides an % \textsc{xslt3} script to generate the % {\ttfamily{}.dtx}\thinspace, {\ttfamily{}.ins}\thinspace, and % other files, which can be suitably zipped up % for submission to \textsc{ctan}\index{CTAN}.\par % This is a development system for class and package % authors. The {\ttfamily{}classpack.sty} file contains % typographic adjustments and utilities only needed to typeset % the documentation of % \emph{ClassPack}-produced classes or % packages.\par % This software is a work-in-progress. It has been in % development at Silmaril since 1998, and in production use % since 2008. This release includes completion of the rewrite of % the \emph{AutoPackage} algorithms, % improved Makefile control, and a detailed update of the % annotation of the \textsc{xslt} code. A paper % describing an earlier version was presented at a Balisage % markup conference in Montréal \parencite{flynn2013}.\par % \par\centering % \includegraphics[width=.666\columnwidth]{codepage-crop.pdf} % \end{abstract} % \clearpage % \tableofcontents % \subsection*{Note on required and optional features} % In this document, the keywords % {\sffamily \textsc{must}}, {\sffamily \textsc{must not}}, {\sffamily \textsc{required}}, % {\sffamily \textsc{shall}}, {\sffamily \textsc{shall not}}, {\sffamily \textsc{should}}, % {\sffamily \textsc{should not}}, % {\sffamily \textsc{recommended}}, % {\sffamily \textsc{may}}, and % {\sffamily \textsc{optional}} have a specific % meaning when shown in {\sffamily \textsc{this typestyle}}, and % {\sffamily \textsc{must}} be interpreted as described in % RFC 2119 \parencite{rfc2119}.\par % When shown in normal type, these words keep their conventional % contextual degree of meaning.\par % \clearpage % \subsection*{Typographic representation}\label{typorep} % In this document, the following information items are shown in % this way:\par % \par\medskip{\sffamily\rmfamily % \small\sffamily % \begingroup % \centering % \begin{tabular}{@{}% % l% % >{\renewcommand{\baselinestretch}{0.8}\selectfont{}\raggedright{}\renewcommand{\baselinestretch}{0.8}\selectfont{}\CPKprestrut\arraybackslash}p{12cm}<{}% % @{}} % \multicolumn{1}{@{}>{\renewcommand{\baselinestretch}{0.8}\selectfont{}\raggedright{}\CPKprestrut}b{\widthof{environments}}<{}}{\sffamily\bfseries Item}& % \multicolumn{1}{>{\renewcommand{\baselinestretch}{0.8}\selectfont{}\raggedright{}\CPKprestrut\arraybackslash}b{12cm}<{}@{}}{\sffamily\bfseries Description}\\[2pt]\hline % \CPKvstrut % \index{class@\textsf{class} (class)}\index{classes:!class@\textsf{class}}\textsf{class}&name of a \LaTeX{} document class\\ % \texttt{code}&word or phrase in a programming language\\ % {\ttfamily{}\textbackslash{}command}&name of a \LaTeX{} `command' % (\TeX{} macro or control sequence)\\ % \texttt{environment}&name of a \LaTeX{} environment\\ % {\ttfamily{}filename}\thinspace&name of a file\\ % \textbf{\emph{firstterm}}\index{firstterm|textbf}&first significant use of a technical term\\ % \texttt{function}&name of a function in a programming language\\ % {\changemenucolor{keys}{bg}% {HTML}{CDCDCD}\renewmenumacro{\keys}% {roundedkeys}\keys{button}}&a button in a \textsc{gui}\\ % {\renewmenumacro{\keys}{angularkeys}\keys{label}}&a label in a \textsc{gui}\\ % \menu{menu}&a top-level menu entry in a \textsc{gui}\\ % \keys{keycap}&a keycap (single key)\\ % \texttt{template}&name of a template in an \textsc{xslt} script\\ % \textbf{\texttt{option}}&name of an option to a \LaTeX{} command, environment, % class, or package\\ % \textsf{package}&name of a \LaTeX{} package\\ % {\ttfamily{}\$parameter}&name of a parameter to a \LaTeX{} command or environment, or % to an \textsc{xslt} script\\ % \emph{productname}&a product name\\ % \uline{replaceable}&a mnemonic for a user-replaceable string in a % paradigm of a command or procedure\\ % {\ttfamily{}systemitem}\thinspace&a computer system item (eg hostname or data value)\\ % \texttt{}\index{tag=\texttt{\char'074 tag/\char'076 } (empty element)}\index{empty elements:!tag=\texttt{\char'074 tag/\char'076}}&a tag name in a markup language (eg \textsc{xml})\\ % {\ttfamily{}varname}&a variable name in a supported language\\[2pt]\hline % \end{tabular} % \par\endgroup % } % \par % \clearpage % \section*{Latest changes} % \subsection*{v.1.28 (2024-02-21)} % \begin{itemize} % \item Full regression test on all maintained packages. % \emph{AutoPackage} methoology % being documented separately; % \item The code for the widening of the LH margin in % mid-document (removed in 1.27) remains in abeyance % until some of the discrepancies with % \textsf{fancyhdr} headings are % resolved; % \item The problem with the \textsf{dox} % package interpreting \verb|\end{macrocode}| % when it occurs in mid-code and mid-line has been % temporarily circumvented by splitting the relevant % {\ttfamily{}xsl:text} to output % the command in two pieces; % \item Additional discrepancy discovered of Doc\TeX{} % parsing an {\ttfamily{}\textbackslash{}ifcase} command mentioned % in a comment behind a double percent signs in the % {\ttfamily{}.dtx} file. The package text has % been reworded to avoid this until we find out what's % happening; % \item The hard-coded list of annotation types in % {\ttfamily{}prepost.xml} (also used in inline % element types like \texttt{}\index{varname=\texttt{\char'074 varname\char'076 } (element)}\index{elements:!varname=\texttt{\char'074 varname\char'076 }}) has been % replaced by a lookup using the otherwise unused % \texttt{}\index{arg=\texttt{\char'074 arg\char'076 } (element)}\index{elements:!arg=\texttt{\char'074 arg\char'076 }} element in \texttt{}\index{cmdsynopsis=\texttt{\char'074 cmdsynopsis\char'076 } (element)}\index{elements:!cmdsynopsis=\texttt{\char'074 cmdsynopsis\char'076 }} for % the \textsf{dox} package in the % \texttt{"postpackage"}\index{postpackage=\texttt{"postpackage"} (attribute value)}\index{attribute values:!postpackage=\texttt{"postpackage"}} part of % {\ttfamily{}prepost.xml}\thinspace. This is used to % create {\ttfamily{}\textbackslash{}doxitem} commands only for % those annotation types that are actually used in the % document; % \item In a similar manner, the language list for the % \textsf{listings} package (again in the % \texttt{}\index{postpackage=\texttt{\char'074 postpackage\char'076 } (element)}\index{elements:!postpackage=\texttt{\char'074 postpackage\char'076 }} part of % {\ttfamily{}prepost.xml}) has been given \texttt{@xml:id}\index{xml:id=\texttt{\char'100 xml:id} (attribute)}\index{attributes:!xml:id=\texttt{\char'100 xml:id}}\kern1pt{}s so that only those % languages referenced in a document find their way into % the {\ttfamily{}.dtx} file. % \end{itemize} % \subsection*{v.1.27 (2024-01-30)} % \begin{itemize} % \item Rewrite of the way in which packages are detected % and handled for the % \emph{AutoPackage} % mechanism; % \item Removed (commented out) the code for the widening % of the LH margin in mid-document to accommodate long % macro names. For the moment it uses fixed margins all % the way through. The adjustment feature may return if % problems with the formatting of other page elements % (particularly running headers and footers) can be % resolved.\par % \item Ongoing work to find out why the % \textsf{dox} package is interpreting % \verb|\end{macrocode}| when it occurs in % mid-code and \emph{not} at the start of % the line.\par % \item Minor corrections to formatting. % \end{itemize} % \subsection*{v.1.26 (2023-12-30)} % \begin{itemize} % \item Regression release for revised db2dtx.xsl 3.1. % \end{itemize} % \subsection*{v.1.25 (2023-10-06)} % \begin{itemize} % \item Added db:book alone as an extra test in % attribute-value-match so that a condition for % book/@status="draft" would be picked up (all the other % tests started too far down the tree).\par % \end{itemize} % \par\bigskip % See p.\thinspace\pageref{changehistory} for earlier changes. % \section{Summary of the \emph{ClassPack} code % management system}\label{pkgintro} % \emph{ClassPack} is an % \textsc{xml}-based class and package management % system for \LaTeX{} described in this document % ({\ttfamily{}classpack.pdf}).\par % \begin{Sbox}\begin{minipage}{.85\columnwidth}\raggedright\sffamily % \subsubsection*{Packages and document classes} % For newcomers to \LaTeX{}, a \textbf{\emph{document % class}}\index{document class|textbf} is a template (a % {\ttfamily{}.cls} file) — it specifies margins, % fonts, spacing, layout, and any extra page and content % design features for a particular type of document (eg % report, article, book, etc), and any extra commands needed % to make use of it; a \textbf{\emph{package}}\index{package|textbf} is a % plugin (a {\ttfamily{}.sty} file) which provides a % specific type of formatting (eg a new font or family, an % extra feature, a new way to typeset something, a variant on % a theme, a utility to simplify complex work, etc) that can % be used with many different document classes.\par % \end{minipage}\end{Sbox}{\fboxsep1em\centering\fbox{\TheSbox}\par\smallskip} % \emph{ClassPack} itself is neither an % actual document class, nor a package for end-users, but an % \textsc{xml} system for developers to % \emph{generate} \LaTeX{} classes and packages. It % \emph{does} provide a small % {\ttfamily{}classpack.sty} \emph{package} file which provides some % presentational styling and utilities used in formatting the % documentation like this, generated by % \emph{ClassPack}, but it is not used or % required anywhere else. For the benefit of readers, this % \textsf{classpack} package is summarised very % briefly in \vref{cpsum}).\par % \begin{Sbox}\begin{minipage}{.85\columnwidth}\raggedright\sffamily % The \textsf{classpack} package gets used % automatically \emph{only} during the % formatting of the \emph{documentation} of % \emph{ClassPack}-generated packages and % classes. It does \emph{not} (and for safety % {\sffamily \textsc{must not}}) get used in the % \LaTeX{} code of any packages and classes which you write or % maintain in \emph{ClassPack}, only in % your \emph{documentation} for them. The users % of your classes and packages developed using % \emph{ClassPack} do % \emph{not} need the % \textsf{classpack} package at any stage unless % they wish to re-typeset your documentation themselves.\par % \end{minipage}\end{Sbox}{\fboxsep1em\centering\fbox{\TheSbox}\par\smallskip} % \subsection{Code management features in % \emph{ClassPack}}\label{cpmgt} % The features of the development environment are mainly % implemented in \textsc{xml} and % \textsc{xslt}, with a few dependencies executed in % \LaTeX{} in the {\ttfamily{}.dtx} file.\par % \begin{description}[style=unboxed] % \item[Changes to the \emph{DocBook} \textsc{dtd}\index{DTD}:]\emph{ClassPack} uses % \emph{DocBook}, probably the most % popular general-purpose XML markup system for % computing documentation. Its widespread use means it % is strongly supported by toolchains and has extensive % support from vendors. More details are in \vref{whyxml}\par % There are some changes to attribute types (and % some new ones added), plus some character entities to % facilitate \LaTeX{}: there are no new element types. % You use the attributes to indicate identity, to % distinguish between the different parts of your % \LaTeX{} class or package, and to signal required % behaviour. These changes are documented in \vref{dtdchanges} and annotated in the code in % \vref{cpdtddoc}.\par % \item[Helpful features for authors and % maintainers:]A number of other features are implemented in the % \textsc{xslt} code rather than in the % specifications in the \hyperref[DTD]{\textsc{dtd}}\index{DTD} because % they require computation more suited to % \textsc{xslt} than \LaTeX{} (for example, % look-ahead). These features are intended to let the % author `just write', and have the % system handle any underlying complexity. These are % documented in \vref{content} and annotated % in the code for the scripts in the Appendices.\par % \item[\emph{AutoPackage}:]This is an automated mechanism added in 2013 for % detecting and including required \LaTeX{} packages in % documentation, and for normalising the inclusion of % packages in your own classes and packages. It lets you % create your own preferred way of working for how you % write documentation and design your classes and % packages. This is documented in \vref{autopackage} % and annotated in \vref{makepack}.\par % \item[Packaging:]The standard \emph{make}\thinspace(1) % Unix/\textsc{gnu} Linux utility % ({\ttfamily{}Makefile}) included with % \emph{ClassPack} builds the % {\ttfamily{}.dtx} and % {\ttfamily{}.ins} files, typesets the % \textsc{pdf} documentation, installs the % class or package in the author’s Personal \TeX{} % Directory, and creates both \hyperref[CTAN]{\textsc{ctan}}\index{CTAN} % and \textsc{tds} zip files for distribution. % Details are annotated in \vref{usemakefile}. There is currently no % equivalent method implemented for Windows.\par % \end{description} % \subsection{Presentation features % in the \textsf{classpack} package itself}\label{cpsum} % The formatting of \emph{ClassPack} % documentation implements the following differences from % standard Doc\TeX{}:\par % \subsubsection{Features adjusted for ease of reading}\label{cppref} % Details of the annotated code are in \vref{pkgmacros}. They cover the following formatting % changes:\par % \label{reading} % \begin{enumerate} % \item Two-column index instead of three-column; % \item Dark Blue colour for annotated code; % \item Recalculation of the left-hand margin in % documentation to accommodate long variable % names; % \item Wider space for the section numbers and page % numbers in the Table of Contents, and ragged-right % setting for section titles to prevent % hyphenation; % \item Appendixes (used for annotated code for ancillary % files) are styled at section level, not chapter % level; % \item Definitions for the Con\TeX t{}, \XeTeX{} and % \XeLaTeX{}, and Lua\TeX{} and Lua\LaTeX{} logos (borrowed % from the TUGboat style); % \item Fake small caps (also from TUGboat) for the % \BibTeX{} logo for fonts without them; % \item New struts for adjusting table spacing; % \item Some hyphenation oddities fixed (see code). % \end{enumerate} % \subsubsection{Features adjusted for ease of writing}\label{cppack} % \par % \label{writing} % \begin{enumerate} % \item A fix for \LaTeX{}’s broken description % environment, using \textsf{enumitem}; % \item The \textsf{array} package for % re-spacing tables; % \item Menu items in documentation now use the graphical % features of the \textsf{menukeys} % package; % \item Raggedright setting of footnotes from the % \textsf{footmisc} package; % \item Running headers and footers from the % \textsf{fancyhdr} package; % \item The {\ttfamily{}\textbackslash{}RaggedRight} (hyphenating) % ragged-right setting for bibliographies from the % \textsf{ragged2e} package; % \item The \textsf{graphicx} package is added % to allow the definitions for \XeTeX{} etc to % work; % \item A counter to be used when calculating the number % of items in a list. % \end{enumerate} % \par\begingroup % \fboxsep1em\centering % \fbox{\begin{minipage}{0.8\columnwidth}\sffamily % \raggedright\parindent0pt % \parskip=.5\baselineskip % An end-user of your classes or packages % {\sffamily \textsc{should not}} normally need % the \textsf{classpack} package unless % they want to re-typeset the documentation.\par % \end{minipage}}\par\endgroup % \clearpage % \section{Introduction}\label{intro} % \LaTeX{} document classes (layout templates) and packages % (formatting styles) are traditionally distributed as pairs of % {\ttfamily{}.dtx} and{\ttfamily{}.ins} files, % written to the specifications and recommendations of the % \textsf{doc}, \textsf{ltxdoc}, and % \textsf{clsguide} packages.\par % \begin{itemize} % \item The {\ttfamily{}.dtx} (Doc\TeX{}) file is a % \textbf{\emph{literate-programming}}\index{literate-programming|textbf} document, % containing modular code and documentation interleaved in % such a way that each fragment of code and its explanation % are adjacent.\par % This broadly parallels the % \emph{web} literate-programming system % due to \textcite{knuthweb} % used in the production of the original \TeX{} system and % its documentation; % \item \label{ins}The {\ttfamily{}.ins} file is an installer: % when run through \LaTeX{}, it extracts the programming code % from the {\ttfamily{}.dtx} file into the relevant % class ({\ttfamily{}.cls}), package % ({\ttfamily{}.sty}), and other files; % \item Running \LaTeX{} on the {\ttfamily{}.dtx} file % itself extracts and typesets the documentation. % \end{itemize} % The construction of a {\ttfamily{}.dtx} document % is quite complex, with a special set of tags and conventions % to allow documentation to be separately identifiable to code. % The file format relies on the documentation being shielded by % a leading percent–space armour (\verb|%␣|) % on each line to prevent it being interpreted as part of the % code; and the environment surrounding the code itself % must be shielded by four such spaces % (\verb|%␣␣␣␣|). Apart from the % documentation, the treatment of the code and control % statements resembles more a data specification (which in some % ways it is) than a conventional text document.\par % \subsection{XML}\label{whyxml} % \textsc{xml}, particularly in its traditional % `document' mode, as distinct from its % use as an exchange format for rectangular data, offers many % similar features to \LaTeX{} (for example, the named % identification of document components), but with a rigid and % invariable syntax that can be checked programmatically by % any validating \textsc{xml} processor. By % contrast, a \LaTeX{} document (and more specifically, a % {\ttfamily{}.dtx} document) can only be proved by % running it through \LaTeX{} itself: there is no equivalent to % the `pre-flight' type of standalone parsing % or validating available with \textsc{xml}, % although there are several % \emph{lint}-like utilities which check % basic syntax \parencite{chktex,lacheck,check}, and some \LaTeX{} editors include % syntax-checking.\par % The \emph{DocBook} vocabulary of % \textsc{xml} is designed for technical % documentation in computing. It provides markup both for % textual material and for data-like structures that occur in % computer documentation, making it a suitable candidate for % describing a literate-programming type of document such as % Doc\TeX{}.\par % \subsection{\emph{ClassPack}} % The \emph{ClassPack} system is an % ongoing experiment or work-in-progress using % \emph{DocBook} \textsc{xml} as % the storage format for \LaTeX{} class and package source code % and documentation, and the \textsc{xlst2} language % to transform the \textsc{xml} file into the pairs % of {\ttfamily{}.dtx} and {\ttfamily{}.ins} % files traditionally used for \LaTeX{} class and package % installation. There are several advantages to this % approach:\par % \begin{itemize} % \item \textsc{xml}’s syntax and document % construction is extremely robust, and the design of the % language means that an \textsc{xml} file can % be machine-checked for errors of syntax and % construction at the editing stage; % \item \textsc{xml} markup is traditionally % self-descriptive, with element types being named % according to what they are intended to % contain.\footnote{% % This approach has long been a source of % philosophical contention, however; see \textcite{holman2013} and % \textcite{kay2013}.\par} For example, in % \emph{DocBook}, a variable name (for % example a \LaTeX{} length like \DescribeLength{pagelen}{\ttfamily{}\textbackslash{}pagelen}) can be marked up as % \verb|pagelen|\thinspace, and % Doc\TeX{} can flag it (unheralded, ie no backslash, % dollar sign, etc) in the margin.\par % (While it is perfectly possible to create a % {\ttfamily{}\textbackslash{}varname} control sequence (macro) to % do the same in \LaTeX{}, it is rarely done by authors. % Instead, authors have typically preferred to use visual % formatting like \verb|\textit{foo}| % for italics or \verb|\verb+foo+| for % monospace type. This method means the variable reference % is not immediately identifiable programmatically as % containing a variable name — it could be % anything.); % \item Given suitably-descriptive markup and a modular % construction, sharing document fragments between % applications can be done programmatically. Thus a % fragment implementing a \LaTeX{} feature (with its % associated documentation) can be re-used in other class % and package applications \emph{at the % \textsc{xml} level} (eg with % XInclude, or as an external parsed entity) without the % need for manual cutting and pasting, and with the % assurance that the latest version is always being % included; % \item \label{xmltools}There is a very wide range of software (editors and % processors, both free and non-free) available to handle % \textsc{xml} documents, including a lot of % useful tools for validation, document management, and % information extraction. % \end{itemize} % Everything comes at a cost. The drawbacks of using % \textsc{xml} for this include:\par % \begin{itemize} % \item It’s another language to learn. Despite being so % widespread, \textsc{xml} and % \textsc{xslt} are not yet common skills in % either the programmer community or the \LaTeX{} community % of package authors or maintainers; % \item Programmers in particular believe they dislike % [`document'] % \textsc{xml} because it’s a markup language, % not a programming language (although % \textsc{xsl} is implemented in % \textsc{xml}), and the syntax is different % from that of most programming languages.\par % (There is a cure for this: ask them to write their % thesis in \textsc{json} and % \textsc{xml} and judge which one is more % suitable.); % \item Although there is plenty of software for editing % \textsc{xml}, it is not well-developed for % writing or editing text documents in synchronous % typographic form (often misleadingly called % \textsc{wysiwyg}) \parencite{flynn2014}; despite many recent advances, % even the best or most expensive editors are designed for % \textsc{xml} experts, not for the average user % \parencite{flynn2009} and not even for the % sophisticated user like a \LaTeX{} class or package % author or maintainer. % \end{itemize} % The \emph{ClassPack} framework is % enabled by three main software components:\par % \begin{enumerate} % \item An \textsc{xml} vocabulary (a % \hyperref[DTD]{\textsc{dtd}}\index{DTD}) used for naming the % component parts of documentation and code, and % specifying where they belong and how they fit together. % This is implemented in the file % {\ttfamily{}doctexbook.dtd}\thinspace, which is a % lightly-modified \emph{DocBook5} % documented in \vref{xmldesc} and \vref{dtdchanges}; % \item An \textsc{xslt} script to implement the % logic of combination and separation needed to create the % {\ttfamily{}.dtx} and {\ttfamily{}.ins} % files. This is implemented in the files % {\ttfamily{}db2dtx.xsl}\thinspace, % {\ttfamily{}db2bibtex.xsl}\thinspace, % {\ttfamily{}figtab2latex.xsl}\thinspace, and % {\ttfamily{}db2md.xsl}\thinspace, annotated in the % Appendices and explained throughout this document; % \item A lookup table of commonly-used \LaTeX{} packages, % with brief descriptions, setup commands, and an optional % set of dependency specifications to automate their % invocation with the % \emph{AutoPackage} feature. This in % essence a database implemented as the % \textsc{xml} file % {\ttfamily{}prepost.xml}\thinspace, and documented in % \vref{autospec}.\par % This file can be edited by individual class/package % authors or maintainers to reflect their personal tastes % and way of working. % \end{enumerate} % \subsubsection{Use of XML}\label{xmldesc} % The \textsc{xml} vocabulary used is % \emph{DocBook} \parencite{docbook5}, which is in widespread use for the % documentation of computer systems, and is well-supported % on all platforms. The current % \emph{ClassPack} system uses % version 5. Although it is highly modular and easily % adapted for many purposes, only a few minor changes have % been made for its use, but a number of element types have % been put to uses not envisaged by the developers. The % current version implements only a \hyperref[DTD]{\textsc{dtd}}\index{DTD}; % a future version will also use \textsc{rng}, and % will create a customisation layer to replace the current % \hyperref[DTD]{\textsc{dtd}}\index{DTD} shim.\par % This habit of using (some say, abusing) % \textsc{xml} markup for different purposes than % intended is very common, and widely deprecated because it % is usually undocumented and because the resulting schema % is arguably not the type of document the original % designer[s] envisaged. This document explains in \vref{cpdtddoc} what has been [ab]used and for what % reasons. Once \emph{ClassPack} settles % down, a more formal expression of the vocabulary can be % made from the \textsc{rng} source, removing the % parts that are not required, and making it simpler to edit % with.\par % The adaptation of \emph{DocBook} % in this version subsists mainly in the addition of some % attributes and entity declarations to allow the conversion % to \LaTeX{} of special characters and other features that % would otherwise involve extensive re-parsing of the % character data content (text). The changes also implement % a few modifications to the way the \LaTeX{} code is output % by the \textsc{xslt} script for typographical % purposes.\par % The modifications to the \hyperref[DTD]{\textsc{dtd}}\index{DTD} % explained below are annotated in \vref{cpdtddoc}, and the file is extracted as % {\ttfamily{}doctexbook.dtd} when processing this % document class, and it can be referenced as such in your % \emph{ClassPack} documents (see % \vref{invocation}).\par % \subsubsection{Changes to the DocBook DTD}\label{dtdchanges} % The changes to the \emph{DocBook5} \hyperref[DTD]{\textsc{dtd}}\index{DTD} are mainly to enable the % reinterpretation of some element types and attributes for % use in the Doc\TeX{} environment. They also add some % aspects of linking, cross-referencing, annotating, and % formatting that are not normally provided for in % \emph{DocBook}.\par % \par\begingroup % \fboxsep1em\centering % \fbox{\begin{minipage}{0.8\columnwidth}\sffamily % \raggedright\parindent0pt % \parskip=.5\baselineskip % Some of the changes should be considered % `tag-abuse', as they hijack existing % attributes for unconventional purposes. A separate and % more fundamental set of changes is planned for a future % date, using a shim for \textsc{rng}.\par % \end{minipage}}\par\endgroup % \begin{enumerate} % \item \texttt{}\index{html:form=\texttt{\char'074 html:form\char'076 } (element)}\index{elements:!html:form=\texttt{\char'074 html:form\char'076 }} is not used; % \item \label{yyyy-mm-dd}The \texttt{}\index{date=\texttt{\char'074 date\char'076 } (element)}\index{elements:!date=\texttt{\char'074 date\char'076 }}, \texttt{}\index{year=\texttt{\char'074 year\char'076 } (element)}\index{elements:!year=\texttt{\char'074 year\char'076 }}, % \texttt{}\index{confdates=\texttt{\char'074 confdates\char'076 } (element)}\index{elements:!confdates=\texttt{\char'074 confdates\char'076 }}, and \texttt{}\index{biblioid=\texttt{\char'074 biblioid\char'076 } (element)}\index{elements:!biblioid=\texttt{\char'074 biblioid\char'076 }} element % types get a mandatory \texttt{@YYYY-MM-DD}\index{YYYY-MM-DD=\texttt{\char'100 YYYY-MM-DD} (attribute)}\index{attributes:!YYYY-MM-DD=\texttt{\char'100 YYYY-MM-DD}} attribute % (suffixed {\ttfamily{}-from} and % {\ttfamily{}-to} in the case of conference % dates), so the elements {\sffamily \textsc{should be}} used \texttt{EMPTY}\index{EMPTY=\texttt{EMPTY} (local name)}\index{local names:!EMPTY=\texttt{EMPTY}} (content % will be ignored). The attribute value % {\sffamily \textsc{must}} be a valid % \textsc{iso} 8601 date. For % \texttt{}\index{biblioid=\texttt{\char'074 biblioid\char'076 } (element)}\index{elements:!biblioid=\texttt{\char'074 biblioid\char'076 }} this is the date the resource was % retrieved; % \item The \texttt{
}\index{blockquote=\texttt{\char'074 blockquote\char'076 } (element)}\index{elements:!blockquote=\texttt{\char'074 blockquote\char'076 }} and \texttt{}\index{quote=\texttt{\char'074 quote\char'076 } (element)}\index{elements:!quote=\texttt{\char'074 quote\char'076 }} % element types get optional \texttt{@units}\index{units=\texttt{\char'100 units} (attribute)}\index{attributes:!units=\texttt{\char'100 units}}, \texttt{@begin}\index{begin=\texttt{\char'100 begin} (attribute)}\index{attributes:!begin=\texttt{\char'100 begin}}, and \texttt{@end}\index{end=\texttt{\char'100 end} (attribute)}\index{attributes:!end=\texttt{\char'100 end}} attributes for % specifying page or other ranges when a citation key is % provided in \texttt{@linkend}\index{linkend=\texttt{\char'100 linkend} (attribute)}\index{attributes:!linkend=\texttt{\char'100 linkend}}, eg % {\ttfamily{}units="p" begin="22" end="34"}\thinspace; % \item The \texttt{}\index{xref=\texttt{\char'074 xref\char'076 } (element)}\index{elements:!xref=\texttt{\char'074 xref\char'076 }} and \texttt{}\index{biblioref=\texttt{\char'074 biblioref\char'076 } (element)}\index{elements:!biblioref=\texttt{\char'074 biblioref\char'076 }} % element types’ attribute \texttt{@linkend}\index{linkend=\texttt{\char'100 linkend} (attribute)}\index{attributes:!linkend=\texttt{\char'100 linkend}} is changed from % \texttt{}\index{IDREF=\texttt{\char'074 IDREF\char'076 } (element)}\index{elements:!IDREF=\texttt{\char'074 IDREF\char'076 }} to \texttt{}\index{IDREFS=\texttt{\char'074 IDREFS\char'076 } (element)}\index{elements:!IDREFS=\texttt{\char'074 IDREFS\char'076 }} to allow % multiple citations at a single point; % \item The \texttt{}\index{bibliography=\texttt{\char'074 bibliography\char'076 } (element)}\index{elements:!bibliography=\texttt{\char'074 bibliography\char'076 }} element type is given % a \texttt{@label}\index{label=\texttt{\char'100 label} (attribute)}\index{attributes:!label=\texttt{\char'100 label}} and \texttt{@xreflabel}\index{xreflabel=\texttt{\char'100 xreflabel} (attribute)}\index{attributes:!xreflabel=\texttt{\char'100 xreflabel}} for the name of % the reference style and any ancillary style file name, % respectively.\par % \item On the \texttt{}\index{biblioentry=\texttt{\char'074 biblioentry\char'076 } (element)}\index{elements:!biblioentry=\texttt{\char'074 biblioentry\char'076 }} element type, an % \texttt{@xml:id}\index{xml:id=\texttt{\char'100 xml:id} (attribute)}\index{attributes:!xml:id=\texttt{\char'100 xml:id}} attribute is % mandatory, and the \texttt{@xreflabel}\index{xreflabel=\texttt{\char'100 xreflabel} (attribute)}\index{attributes:!xreflabel=\texttt{\char'100 xreflabel}} attribute % {\sffamily \textsc{must}} contain one of the % valid \textsf{biblatex} entry types; % \item For code annotations, the \texttt{}\index{annotation=\texttt{\char'074 annotation\char'076 } (element)}\index{elements:!annotation=\texttt{\char'074 annotation\char'076 }} % element type has a mandatory \texttt{@role}\index{role=\texttt{\char'100 role} (attribute)}\index{attributes:!role=\texttt{\char'100 role}} attribute to provide % the type of object being documented. See the list in \vref{annotypes} for a list of values. The name % of the object being documented % {\sffamily \textsc{must}} be given in the % \texttt{@xreflabel}\index{xreflabel=\texttt{\char'100 xreflabel} (attribute)}\index{attributes:!xreflabel=\texttt{\char'100 xreflabel}} attribute, and % a new attribute \texttt{@reuse}\index{reuse=\texttt{\char'100 reuse} (attribute)}\index{attributes:!reuse=\texttt{\char'100 reuse}} is % added to provide the \texttt{}\index{IDREFS=\texttt{\char'074 IDREFS\char'076 } (element)}\index{elements:!IDREFS=\texttt{\char'074 IDREFS\char'076 }} of annotations % to copy from elsewhere (see \vref{reuse}); % \item The \texttt{}\index{programlisting=\texttt{\char'074 programlisting\char'076 } (element)}\index{elements:!programlisting=\texttt{\char'074 programlisting\char'076 }} element type now has % an \texttt{@endinglinenumber}\index{endinglinenumber=\texttt{\char'100 endinglinenumber} (attribute)}\index{attributes:!endinglinenumber=\texttt{\char'100 endinglinenumber}} % attribute for reference to segments of an external % file being annotated; % \item The \texttt{}\index{remark=\texttt{\char'074 remark\char'076 } (element)}\index{elements:!remark=\texttt{\char'074 remark\char'076 }} element type (used for % flagging changes) has mandatory \texttt{@version}\index{version=\texttt{\char'100 version} (attribute)}\index{attributes:!version=\texttt{\char'100 version}} and \texttt{@revision}\index{revision=\texttt{\char'100 revision} (attribute)}\index{attributes:!revision=\texttt{\char'100 revision}} attributes which % {\sffamily \textsc{must}} match a version % number and a revision date in the revision % history; % \item A list of computer languages supported by the % \textsf{listings} package (as extended in the % {\ttfamily{}prepost.xml} database) is defined, and % applied as a \texttt{@language}\index{language=\texttt{\char'100 language} (attribute)}\index{attributes:!language=\texttt{\char'100 language}} % attribute on \texttt{}\index{classname=\texttt{\char'074 classname\char'076 } (element)}\index{elements:!classname=\texttt{\char'074 classname\char'076 }}, % \texttt{}\index{cmdsynopsis=\texttt{\char'074 cmdsynopsis\char'076 } (element)}\index{elements:!cmdsynopsis=\texttt{\char'074 cmdsynopsis\char'076 }}, \texttt{}\index{command=\texttt{\char'074 command\char'076 } (element)}\index{elements:!command=\texttt{\char'074 command\char'076 }}, % \texttt{}\index{envar=\texttt{\char'074 envar\char'076 } (element)}\index{elements:!envar=\texttt{\char'074 envar\char'076 }}, \texttt{}\index{function=\texttt{\char'074 function\char'076 } (element)}\index{elements:!function=\texttt{\char'074 function\char'076 }}, % \texttt{}\index{literal=\texttt{\char'074 literal\char'076 } (element)}\index{elements:!literal=\texttt{\char'074 literal\char'076 }}, \texttt{}\index{literallayout=\texttt{\char'074 literallayout\char'076 } (element)}\index{elements:!literallayout=\texttt{\char'074 literallayout\char'076 }}, % \texttt{