| 1 |
\skbheading{The SKB Documentation} |
| 2 |
|
| 3 |
The documentation of this package is using most macros the \skbacft{A3DS:SKB} defines, thus |
| 4 |
realising two things in one go: it provides the documentation for the package showing |
| 5 |
its features and it is used to test the the packge while generating the documentation |
| 6 |
(I might say that we do other tests as well). With all that, it can now be also used |
| 7 |
as one example on how to maintain a document repository, and that's exactly what the |
| 8 |
following statements trying to achieve. |
| 9 |
|
| 10 |
As we have seen earlier, the \skbacft{A3DS:SKB} documentation comes in several parts. First, there |
| 11 |
is the documentation on the documented \LaTeX~source code (skb.dtx). Next, there is |
| 12 |
the user guide, which can be compiled along with the documented source (see skb.pdf) |
| 13 |
or as a stand-alone article document (see user-guide.pdf). Since we use our \skbacft{A3DS:SKB} for |
| 14 |
presentations, we provide an animated and a non-animated presentation about the \skbacft{A3DS:SKB} |
| 15 |
(ug-slides-anim.pdf and ug-slides-noanim.pdf) along with annotated slides as a handout |
| 16 |
(ug-slides-notes.pdf). All of these documents use the same source, which includes |
| 17 |
some conditional text. All of these documents `assemble' their content in their specific way |
| 18 |
which quits their purpose best. For instance, the document level are different for the |
| 19 |
headings, the text blocks and tables and figures and examples are ordered in different |
| 20 |
way and some text is incuded in one \skbacft{ISO:PDF} document and not in others. |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
The documentation has three main parts. The first tells some stories and |
| 26 |
explains the general concepts of the \skbacft{A3DS:SKB}. This part is generated using |
| 27 |
many \skbacft{A3DS:SKB} macros including \cmd{\skbinput} and \cmd{\skbheading}. |
| 28 |
The second part documents the implementation of the \skbacft{A3DS:SKB} package. This part |
| 29 |
uses only some macros for the layout. The last part provides information |
| 30 |
about the history of the package and a change log. This part again uses |
| 31 |
\cmd{\skbinput} and \cmd{\skbheading} and many other \skbacft{A3DS:SKB} macros. |
| 32 |
|
| 33 |
Let's start with the first part, of which this example is again a part of. |
| 34 |
The \skbacft{A3DS:SKB} documentation is split over two main directories: \skbem[code]{publish} |
| 35 |
for the actual article and \skbem[code]{repository}. The folder \skbem[code]{publish/article/tex} |
| 36 |
contains two files, the fiel with the title page of the aticle \skbem[code]{skb.tex} and one for loading the |
| 37 |
repository files \skbem[code]{contents.tex} and creating the intended document structure (levels). |
| 38 |
The file \skbem[code]{user-guide.tex} looks like as follows: |
| 39 |
|
| 40 |
\lstinputlisting[style=genericLN,language=TeX]{\skbfilepub{article/tex/skb-titlepage}} |
| 41 |
|
| 42 |
Line by line the macros calls here have the following effect: |
| 43 |
\begin{skbnotelist} |
| 44 |
\item Line 1\&2 set the title for the document. |
| 45 |
\item Line 4 sets the author of the document. |
| 46 |
\item Line 6 sets the date and version information for the document. |
| 47 |
\item Line 8\&9 use the \skbacft{A3DS:SKB} macros \cmd{\skbsubject} and \cmd{\skbkeywords} to set the subject |
| 48 |
and keywords for \skbacft{ISO:PDF} info. |
| 49 |
\item Line 11 calls \cmd{\maketitle} to create the title minipage (we are in an article class). |
| 50 |
\item Line 13\&15 start and finish the abstract. |
| 51 |
\item Line 21 finished the \TeX processing of the file by calling \cmd{\endinput}. |
| 52 |
\end{skbnotelist} |
| 53 |
|
| 54 |
The interesting lines here are number 14 and 19. They use the \skbacft{A3DS:SKB} macro \cmd{\skbinput} to load |
| 55 |
further content. In line 14 it is a file called \skbem[code]{abstract.tex} from the repsitory. |
| 56 |
Note: \cmd{\skbinput} automatically adds the file extension \skbem[code]{.tex} when loading from the repository or publish folders. |
| 57 |
Now the file \skbem[code]{abstract.tex} contains the one paragraph abstract of this document. Nothing else |
| 58 |
special in there. |
| 59 |
|
| 60 |
The other file in the folder \skbem[code]{publish/article/tex} -- \skbem[code]{skb-contents.tex} -- will actually load |
| 61 |
all other files required to build the first part of this document and create the intended document structure |
| 62 |
(i.e. sections and subsections). This file looks like this: |
| 63 |
|
| 64 |
\lstinputlisting[style=genericLN,language=TeX]{\skbfilepub{article/tex/skb-contents}} |
| 65 |
|
| 66 |
The first line uses the classic \LaTeX macro \cmd{\section} to start the section \skbem[italic]{Introduction}. |
| 67 |
All other lines use the \skbacft{A3DS:SKB} macro \cmd{\skbinput} to load files from the repository and associate a \LaTeX document |
| 68 |
level to them. In the case of this document we use sections, subsections and subsubsections. Each of the files loaded here |
| 69 |
with \cmd{\skbinput} will start by calling the \skbacft{A3DS:SKB} macro \cmd{\skbheading} to declare the heading text. For instance, the |
| 70 |
first few lines of the file \skbem[code]{separate-parts.tex} in the repository (loaded in line 7) look like this |
| 71 |
(we show the first 4 lines): |
| 72 |
|
| 73 |
\lstinputlisting[style=genericLN,language=TeX,lastline=4]{\skbfilerep{separate-parts}} |
| 74 |
|
| 75 |
In other words: line 7 of \skbem[code]{contents.tex} calls \cmd{\skbinput} with the option \skbem[code]{from} set |
| 76 |
ro \skbem[code]{rep} and the option \skbem[code]{level} set to \skbem[code]{subsection} and requests to load a file |
| 77 |
called \skbem[code]{separate-parts.tex}. This loaded file then first calls \cmd{\skbheading} to declare a heading text. |
| 78 |
The \skbacft{A3DS:SKB} now will translate use heading tex calling the classic \LaTeX macro \cmd{\subsection}. The rest is done by |
| 79 |
\LaTeX as usual. |
| 80 |
|
| 81 |
If you have a look into the directory \skbem[code]{source/repository} of this distribution, you will see all tex files |
| 82 |
that form part one of this document. You will also see that parts of the documentation, namely code and dirtree figures, |
| 83 |
have been separated out in sub-directories. |
| 84 |
|
| 85 |
Finally, the file \skbem[code]{skb.dtx} uses the \skbacft{A3DS:SKB} macro \cmd{\skbinput} to load the files \skbem[code]{skb-titlepage.tex} |
| 86 |
and \skbem[code]{skb-contents.tex} from the publish folder. You can find that macro call just above \cmd{\StopEventually} |
| 87 |
in \skbem[code]{skb.dtx}. Furthermore, if you look at the very end of \skbem[code]{skb.dtx}, just above \cmd{\Final}, you |
| 88 |
will find the call to \cmd{\skbinput} that loads the file \skbem[code]{history.tex} from the repository. |