| 1 |
% appendix.tex copyright1992 Victor Eijkhout |
| 2 |
% copyright 2014--2016 Vafa Khalighi |
| 3 |
% |
| 4 |
% |
| 5 |
% This program is free software: you can redistribute it and/or modify |
| 6 |
% it under the terms of the GNU General Public License as published by |
| 7 |
% the Free Software Foundation, either version 3 of the License, or |
| 8 |
% (at your option) any later version. |
| 9 |
% |
| 10 |
% This program is distributed in the hope that it will be useful, |
| 11 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
% GNU General Public License for more details. |
| 14 |
% |
| 15 |
% You should have received a copy of the GNU General Public License |
| 16 |
% along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
% |
| 18 |
% |
| 19 |
\Chapter Example styles |
| 20 |
|
| 21 |
To show you the strength of \Lollipop, this chapter collects a few |
| 22 |
example style definitions. The first one is that of this manual. |
| 23 |
|
| 24 |
\Section The style definition for this book |
| 25 |
|
| 26 |
In case you were wondering how this book was typeset, here is the |
| 27 |
full style definition. By the standards of what Lollipop can do it is |
| 28 |
pretty pedestrian. |
| 29 |
|
| 30 |
One thing that may have provide intellectual titilation is the |
| 31 |
definition of \cs{Example} and \cs{OutExample}. |
| 32 |
It allowed me to keep the examples in sync with their output. |
| 33 |
|
| 34 |
Of course that |
| 35 |
doesn't really rely on \Lollipop. It does illustrate the fact that |
| 36 |
\Lollipop\ is interfaceable to arbitrary macros. (But don't try |
| 37 |
loading \Lollipop\ on top of \LaTeX! On second thought, do. It |
| 38 |
disables most of \LaTeX. Just kidding.) |
| 39 |
|
| 40 |
\begingroup \PointSize:8 \tt |
| 41 |
\verbatimfile{mandefs.tex}\endgroup |
| 42 |
|
| 43 |
\Section[sec:address] Address book |
| 44 |
|
| 45 |
The following macros generate an address book. Several noteworthy |
| 46 |
features: |
| 47 |
\Itemize\item Most titles are short, that is, delimited by the line |
| 48 |
end. |
| 49 |
\item Since a page will now have several dozens of headings, the |
| 50 |
number of marks placed will become a problem, therefore the option |
| 51 |
\opt{nomarks} is included everywhere. Without this you would easily |
| 52 |
have memory overflows. |
| 53 |
\item The \cs{At} heading writes its information to an external |
| 54 |
file. This is then parsed by the macro \cs{CompNam}. A~slight amount |
| 55 |
of knowledge of Lollipop internals is used here for parameter parsing, |
| 56 |
but not more than can be gleaned from simply looking at the external |
| 57 |
file.\par |
| 58 |
Then a token list is created for each company, and these lists are |
| 59 |
printed somewhere down the file. This is a bit of \TeX\ programming |
| 60 |
that is not quite elementary, but still \Lollipop saves you a lot of |
| 61 |
work. |
| 62 |
\> |
| 63 |
If you want to see the output, run \TeX\ with Lollipop twice on the |
| 64 |
\file{address.tex} file. |
| 65 |
|
| 66 |
\begingroup \PointSize:8 \tt |
| 67 |
\verbatimfile{address.tex}\endgroup |
| 68 |
|
| 69 |
\endinput |