Changes

Jump to navigation Jump to search
2,083 bytes added ,  15:44, 11 May 2006
Create
< [[Modules]]

The '''xdesc''' module by Giuseppe Bilotta (Oblomov) provides a means to treat special descriptions such as epigrams. In this case the object has several attributes, which can be typeset in several ways. The module can be downloaded from the [[modules:xdesc]] site.

== Example setup for epigrams ==
An epigram is a concise and witty saying or a short witty poem. An example would be

: We haven't got the money, so we've got to think!
: &mdash; ''Rutherford, Ernest Rutherford, 1871&ndash;1937''

We first load now the module and setup a new description

<texcode>
\usemodule[xdesc]
\defineextendeddescription[epigram][epigrams]%
[author,years,source,note,whois]
</texcode>

We now define the commands to typeset the epigrams, one short version which is useful for production

<texcode>
\starttemplate[epigram][short]
\startframedtext[right][frame=off,offset=none,background=none,
width=0.65\textwidth,top=,bottom=]
\small{\it \getslot{content}}
\unskip\nobreak\hfil\penalty50\hskip1em\hbox{}\nobreak\hfil
\hbox{\small{--- \getslot{author}, \getslot{years}}}
\parfillskip=0pt \finalhyphendemerits=0
\stopframedtext
\stoptemplate
</texcode>

and a medium long version. which is a bit lengthier,

<texcode>
\starttemplate[epigram][medium]
\startframedtext[right][frame=off,offset=none,background=none]
{\it \getslot{content}}\par
\rightaligned{--- \getslot{author}, \getslot{years}}\par
\startalignment[left]
\small \getslot{source}
\stopalignment
\stopframedtext
\stoptemplate
</texcode>

The version we want to use can be set via

<texcode>
\selecttemplate[epigram][short] % medium,short
</texcode>

It is now time to get type in a quote

<texcode>
\startepigram[epg:Rutherford]
[author={Ernest Rutherford},
years={1871--1937},
whois={New Zealand physicist},
source={in {\it Bulletin of the Institute of Physics} (1962) vol. 13}]
We haven't got the money, so we've got to think!
\stopepigram
</texcode>

To typeset the epigram, simply call:

<texcode>
\getepigram[epg:Rutherford]
</texcode>

Navigation menu