diff options
-rw-r--r-- | Master/texmf-dist/doc/context/third/lettrine/W.pdf | bin | 0 -> 12716 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.pdf | bin | 0 -> 93964 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.tex | 459 | ||||
-rw-r--r-- | Master/texmf-dist/doc/context/third/lettrine/lettrine.pdf | bin | 0 -> 93964 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/context/third/lettrine/lettrine.tex | 459 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/interface/third/lettrine.xml | 65 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/lettrine/t-lettrine.tex | 163 | ||||
-rw-r--r-- | Master/texmf-dist/tpm/t-lettrine.tpm | 32 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-context.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/context-lettrine.tlpsrc | 5 |
10 files changed, 1184 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/context/third/lettrine/W.pdf b/Master/texmf-dist/doc/context/third/lettrine/W.pdf Binary files differnew file mode 100644 index 00000000000..a118f316b07 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/lettrine/W.pdf diff --git a/Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.pdf b/Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.pdf Binary files differnew file mode 100644 index 00000000000..277bc728dc8 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.pdf diff --git a/Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.tex b/Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.tex new file mode 100644 index 00000000000..541f2bf3e49 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/lettrine/lettrine-doc.tex @@ -0,0 +1,459 @@ +\setupoutput[pdftex] +\loadmapfile[texnansi-public-lm] +\loadmapfile[cork-public-lm] +\loadmapfile[original-ams-euler] +\loadmapfile[hoekwater] + +%\enablemode[onecolumn] +%\enablemode[realfonts] +\usemodule[map-se] +\usemodule[lettri] +\setupcolors[state=start,conversion=yes] +\usemodule[set-11] +\hbadness=10000 +\setuplettrine[T][Findent=0.2em,Nindent=0.2em,Oversize=.05,Hang=.15] + +\startbuffer[setuplettrine] +<cd:command name="setuplettrine"> + <cd:sequence> + <cd:string value="setuplettrine"/> + </cd:sequence> + <cd:arguments> + <cd:keywords optional="yes"> + <cd:constant type="cd:text"/> + </cd:keywords> + <cd:assignments list="yes"> + <cd:parameter name="Lines"> + <cd:constant type="cd:number"/> + </cd:parameter> + <cd:parameter name="Hang"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Oversize"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Raise"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Findent"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Nindent"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Slope"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Ante"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="FontHook"> + <cd:constant type="cd:command"/> + </cd:parameter> + <cd:parameter name="TextFont"> + <cd:constant type="cd:command"/> + </cd:parameter> + <cd:parameter name="Image"> + <cd:constant type="yes"/> + <cd:constant type="no" default="yes"/> + </cd:parameter> + </cd:assignments> + </cd:arguments> +</cd:command> +\stopbuffer + +\startbuffer[lettrine] +<cd:command name="lettrine" file="core-mis.tex"> + <cd:sequence> + <cd:string value="lettrine"/> + </cd:sequence> + <cd:arguments> + <cd:assignments list="yes" optional="yes"> + <cd:inherit name="setuplettrine"/> + </cd:assignments> + <cd:content/> + <cd:content/> + </cd:arguments> +</cd:command> +\stopbuffer + +\def\emph#1{#1} + +\starttext +\startArticle[% + Author=Taco Hoekwater, + Email=taco@elvenkind.com, + Title=Lettrines for Con\TeX{}t, + Page=26, + Category=context] + +\startKeywords +lettrines, module, initials, dropped capitals, Con\TeX{}t +\stopKeywords + +\startAbstract +The \ConTeXt\ module \type{lettri} is port of the \LaTeX\ package +\type{lettrine} by Daniel Flipo that provides a way to typeset dropped +capitals at the beginning of paragraphs. +\stopAbstract + +\section{Introduction} + +Daniel Flipo's \LaTeX\ package ``lettrine.sty'' provides the command +\type{\lettrine} for the creation of dropped capitals at the beginning +of a paragraph. Various parameters are provided to control the size +and layout of the dropped capital, using a key||value system to +specify the options. + +Last februari, Gerben Wierda asked on the \ConTeXt\ mailing list if +``Would someone be able to take lettrine.sty as an example and produce +a version that works with \ConTeXt\ (and plain \TeX)?''. I never +considered making a version for plain \TeX, but a \ConTeXt\ version +was doable. So I've created the `lettri' module, for use in a +\type{\usemodule} command. + +\section{Commands} + +The module defines two user||level commands, one for setup and one for +actual use. Most of the parameter names are a bit different from their +\LaTeX{} counterparts. There are two reasons for this, both a side||effect +of the implementation in \ConTeXt. +\startitemize +\item The first reason is my laziness, I did not want to create lots of +new constants for internationalization of the interface, so I just used +an initial uppercase character. This makes the keywords impervious to +differences in the \ConTeXt\ language interfaces. +\item The second reason is that some parameter names seemed a bit odd, +probably because of name\-space conflicts within \LaTeX, and I sanitized +those names where that was possible without confusing the users. +\stopitemize +\noindent +So, for example, the \LaTeX\ parameter keyword \type{lhang} became the +\ConTeXt\ parameter \type{Hang}. + +\subsection{Usage command: \type{\lettrine}} + +The command \type{\lettrine} uses an optional parameter for +settings, and two required arguments that are texts to be typeset. + +\processXMLbuffer[lettrine] + +\lettrine{T}{he two} typeset arguments are the dropped capital and +the run||in text following it; the \TeX\ source of this paragraph +started with ``\type{\lettrine{T}{he two} typeset}''. The optional +parameter is explained below. + + +\subsection{Setup command: \type{\setuplettrine}} + +\processXMLbuffer[setuplettrine] + +\startitemize +\item \type{Lines} controls how many lines the dropped capital + will occupy (the default value is~2); +\item \type{Hang} sets how much of the dropped capital's width + should hang into the margin (the default is 0, values should be + between 0 and 1); +\item \type{Oversize} enlarges or decreases the dropped capital's height: + with \type{Oversize=0.1}. its height is enlarged by 10\% so that + it raises above the top paragraph's line (default=0, values should + be between $-$1 and 1); +\item \type{Raise} does not affect the dropped capital's height, but + moves it up (if positive) or down (if negative); useful with capitals + like \type{J} or \type{Q} which have a positive depth (default=0, + values should be between $-$1 and 1); +\item \type{Findent} (positive or negative) controls the horizontal gap + between the dropped capital and the indented block of text (default=0pt); +\item \type{Nindent} shifts the indented lines, starting from the second line, + horizontally by the specified amount (default=0.5em); +\item \type{Slope} can be used with dropped + capitals like \type{A} or \type{V} to add an extra shift + (positive or negative) to the indentation of each line + starting from the third one (no effect if \type{Lines=2}, default=0pt); +\item \type{Ante} can be used to typeset something + \emph{before} the dropped capital (typical use is for French + guillemets starting the paragraph). +\item \type{Image} will force \type{\lettrine} + to replace the letter normally used as dropped capital by an image. + \type{\lettrine[Image=yes]{A}{n exemple}} will load \type{A.eps} or + \type{A.pdf} instead of letter~A. +\item \type{FontHook} can be used to change the font and/or color of + the dropped capital (default: empty) +\item \type{TextFont} can be used to change the font and/or color of + the run||in text (default: \type{\sc}) +\stopitemize + +\noindent +The first, optional argument to the \type{\setuplettrine} command +allows you to create presets: The settings that follow will apply only +if the first text argument of \type{\lettrine} (see below) matches +this string exactly. I~have used this command at the top of this +article: +\starttyping +\setuplettrine[T][Findent=0.2em,Nindent=0.2em, + Oversize=.05,Hang=.15]] +\stoptyping +because otherwise the example on the previous page would not have +been as nice as it is. + +\section{Examples} +The following examples were all adapted from the file \type{demo.tex} +that is part of Daniel Flipo's original distribution. I've been forced +to make some changes here and there because the font for the Maps is +quite different from the font in the original examples, but I~have not +made changes to the original french text. + +\subsection{Standard options (using 2 lines)} + +\starttyping +\lettrine{E}{n} plein marais... +\stoptyping + +\begingroup +\language[fr] +\lettrine{E}{n} plein marais de la Souteyranne, \`a quelques kilom\`etres +au nord d'Aigues-Mortes, se trouve la Tour Carbonni\`ere. Construite +au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques +vestiges. +\par +\endgroup + +\subsection{Lettrine on a single line} + +\starttyping +\lettrine[Lines=1]{E}{n} plein marais... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Lines=1]{E}{n} plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, se trouve +la Tour Carbonni\`ere. +\par +\endgroup + +\subsection{Lettrine on a three lines} +\starttyping +\lettrine[Lines=3]{E}{n} plein marais... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Lines=3]{E}{n} plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, +se trouve la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des\break |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +\par +\endgroup + +\subsection{Lettrine in the margin} +\starttyping +\lettrine[Hang=1, Nindent=0pt, Lines=3] + {J}{ustement},... +\stoptyping + +\setupnarrower[middle=6pt] +\begingroup +\language[fr] +\startnarrower +\lettrine[Hang=1, Nindent=0pt, Lines=3]{J}{ustement}, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, +se trouve la Tour Carbonni\`ere. Construite au XIII\high{e}~si\`ecle, +elle contr\^olait l'unique voie d'acc\`es terrestre de la ville +fortifi\'ee, celle qui menait \`a Psalmody, l'une des +|<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. L'abbaye \'etait +ravitaill\'ee ---~dit-on ~--- par un souterrain qui la reliait au +ch\^ateau de Treillan. +\stopnarrower +\par +\endgroup + + +\subsection{Lettrine oversised, and partly in the margin} +\starttyping +\lettrine[Lines=3,Hang=0.2,Oversize=0.25] + {E}{n} ... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Lines=3, Hang=0.2, Oversize=0.25]{E}{n} +plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| \dots +% dont il ne reste que des vestiges. +\par +\endgroup + +\subsection{A guillemet in front of the lettrine} +\starttyping +\lettrine[Ante={<<}]{E}{n} plein marais ... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Ante={<<}]{E}{n} plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, se trouve +la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des\break |<<|abbayes de sel|>>| \dots +% dont il ne reste que des vestiges. +\par +\endgroup + +\blank +The following four lettrines have all been typeset after changing the +default settings with the following command: + +\starttyping +\setuplettrine[Lines=4,FontHook={\color[gray]}] +\stoptyping + +\setuplettrine[Lines=4,FontHook={\color[gray]}] + +\subsection{A somewhat smaller and slightly raised lettrine} + +\starttyping +\lettrine[Oversize=-0.15, Raise=0.15] + {Q} {u'en plein marais} ... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Oversize=-0.15, Raise=0.15]{Q}{u'en plein marais} + de la Souteyranne, \`a quel\-ques kilom\`etres au nord d'Aigues-Mortes, +se trouve la Tour Carbonni\`ere, surprend les visiteurs. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\subsection{The same lettrine, without corrections} + +\starttyping +\lettrine{Q}{u'en plein marais} de ... +\stoptyping + +\begingroup +\language[fr] +\lettrine{Q}{u'en plein marais} de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-\break Mortes, +se trouve la Tour Carbonni\`ere, surprend les visiteurs. +Construite au XIII\high{e}\break si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\subsection{Using the Slope option for the following lines} +\starttyping +\lettrine[Slope=0.4em,Findent=-0.5em, + Nindent=0.4em] + {\`A}{quelques kilom\`etres}... +\stoptyping + +\kern -12pt + +\begingroup +\language[fr] +\lettrine[Slope=0.4em, Findent=-0.5em, Nindent=0.4em]{\`A} {quelques +kilom\`etres} au nord d'Aigues-Mortes, se trouve la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee ---~dit-on~--- par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\kern 24pt +\subsection{Using the Slope option for the opposite effect} + +Also note the move into the margin + +\starttyping +\lettrine[Slope=-0.5em,Hang=0.5,Findent=0.2em] + {V}{oici} \`a... +\stoptyping + +\begingroup +\language[fr] +\startnarrower +\lettrine[Slope=-0.5em, Hang=0.5, Findent=0.2em]{V}{oici} +\`a quelques kilom\`etres au nord d'Aigues-Mortes la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie +d'acc\`es terrestre de la ville fortifi\'ee, celle qui menait \`a +Psalmody, l'une des |<<|abbayes de sel|>>| dont il ne reste que +quelques vestiges. L'abbaye \'etait ravitaill\'ee ---~dit-on~--- par +un souterrain qui la reliait au ch\^ateau de Treillan. +\stopnarrower +\par +\endgroup + +\subsection{Using a different font by using the FontHook} + +\starttyping +\def\myhook + {\definefontsynonym[LettrineFont][SansBold]} +\lettrine[FontHook={\myhook}, + Hang=.2, Findent=.3em] + {E}{n} plein marais... +\stoptyping + +\def\myhook + {\definefontsynonym[LettrineFont][SansBold]} + +\begingroup +\language[fr] +\lettrine[FontHook={\myhook},Hang=.2,Findent=.3em]{E}{n} plein +marais de la Souteyranne, \`a quelques +kilom\`etres au nord d'Aigues-Mortes, se trouve la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\subsection{Use of an image instead of an actual letter} + +\setuplettrine[FontHook={}] + +\starttyping +\lettrine[Image=yes,Hang=.1, Oversize=.25, + Findent=0.1em, Raise=-.1] + {W} {er} reitet ... +\stoptyping + +{\switchtobodyfont[eul] +\lettrine[Image=yes,Hang=.1, Oversize=.25, Findent=0.1em, Raise=-.1] +{W}{er} reitet so sp\"at durch Nacht und Wind?\crlf +Es ist der Vater mit seinem Kind;\crlf +Er hat den Knaben wohl in dem Arm,\crlf +Er fa{\SS}t ihn sicher, er h\"alt ihn warm. +\par}% + +\section{Availability} + +The module can be downloaded from the new \ConTeXt\ module repository, +at\crlf +\hyphenatedurl{http://modules.contextgarden.net}. + +\blank +I have released this module into the public domain. + +\stopArticle +\stoptext
\ No newline at end of file diff --git a/Master/texmf-dist/doc/context/third/lettrine/lettrine.pdf b/Master/texmf-dist/doc/context/third/lettrine/lettrine.pdf Binary files differnew file mode 100644 index 00000000000..277bc728dc8 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/lettrine/lettrine.pdf diff --git a/Master/texmf-dist/doc/context/third/lettrine/lettrine.tex b/Master/texmf-dist/doc/context/third/lettrine/lettrine.tex new file mode 100644 index 00000000000..541f2bf3e49 --- /dev/null +++ b/Master/texmf-dist/doc/context/third/lettrine/lettrine.tex @@ -0,0 +1,459 @@ +\setupoutput[pdftex] +\loadmapfile[texnansi-public-lm] +\loadmapfile[cork-public-lm] +\loadmapfile[original-ams-euler] +\loadmapfile[hoekwater] + +%\enablemode[onecolumn] +%\enablemode[realfonts] +\usemodule[map-se] +\usemodule[lettri] +\setupcolors[state=start,conversion=yes] +\usemodule[set-11] +\hbadness=10000 +\setuplettrine[T][Findent=0.2em,Nindent=0.2em,Oversize=.05,Hang=.15] + +\startbuffer[setuplettrine] +<cd:command name="setuplettrine"> + <cd:sequence> + <cd:string value="setuplettrine"/> + </cd:sequence> + <cd:arguments> + <cd:keywords optional="yes"> + <cd:constant type="cd:text"/> + </cd:keywords> + <cd:assignments list="yes"> + <cd:parameter name="Lines"> + <cd:constant type="cd:number"/> + </cd:parameter> + <cd:parameter name="Hang"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Oversize"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Raise"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Findent"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Nindent"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Slope"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Ante"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="FontHook"> + <cd:constant type="cd:command"/> + </cd:parameter> + <cd:parameter name="TextFont"> + <cd:constant type="cd:command"/> + </cd:parameter> + <cd:parameter name="Image"> + <cd:constant type="yes"/> + <cd:constant type="no" default="yes"/> + </cd:parameter> + </cd:assignments> + </cd:arguments> +</cd:command> +\stopbuffer + +\startbuffer[lettrine] +<cd:command name="lettrine" file="core-mis.tex"> + <cd:sequence> + <cd:string value="lettrine"/> + </cd:sequence> + <cd:arguments> + <cd:assignments list="yes" optional="yes"> + <cd:inherit name="setuplettrine"/> + </cd:assignments> + <cd:content/> + <cd:content/> + </cd:arguments> +</cd:command> +\stopbuffer + +\def\emph#1{#1} + +\starttext +\startArticle[% + Author=Taco Hoekwater, + Email=taco@elvenkind.com, + Title=Lettrines for Con\TeX{}t, + Page=26, + Category=context] + +\startKeywords +lettrines, module, initials, dropped capitals, Con\TeX{}t +\stopKeywords + +\startAbstract +The \ConTeXt\ module \type{lettri} is port of the \LaTeX\ package +\type{lettrine} by Daniel Flipo that provides a way to typeset dropped +capitals at the beginning of paragraphs. +\stopAbstract + +\section{Introduction} + +Daniel Flipo's \LaTeX\ package ``lettrine.sty'' provides the command +\type{\lettrine} for the creation of dropped capitals at the beginning +of a paragraph. Various parameters are provided to control the size +and layout of the dropped capital, using a key||value system to +specify the options. + +Last februari, Gerben Wierda asked on the \ConTeXt\ mailing list if +``Would someone be able to take lettrine.sty as an example and produce +a version that works with \ConTeXt\ (and plain \TeX)?''. I never +considered making a version for plain \TeX, but a \ConTeXt\ version +was doable. So I've created the `lettri' module, for use in a +\type{\usemodule} command. + +\section{Commands} + +The module defines two user||level commands, one for setup and one for +actual use. Most of the parameter names are a bit different from their +\LaTeX{} counterparts. There are two reasons for this, both a side||effect +of the implementation in \ConTeXt. +\startitemize +\item The first reason is my laziness, I did not want to create lots of +new constants for internationalization of the interface, so I just used +an initial uppercase character. This makes the keywords impervious to +differences in the \ConTeXt\ language interfaces. +\item The second reason is that some parameter names seemed a bit odd, +probably because of name\-space conflicts within \LaTeX, and I sanitized +those names where that was possible without confusing the users. +\stopitemize +\noindent +So, for example, the \LaTeX\ parameter keyword \type{lhang} became the +\ConTeXt\ parameter \type{Hang}. + +\subsection{Usage command: \type{\lettrine}} + +The command \type{\lettrine} uses an optional parameter for +settings, and two required arguments that are texts to be typeset. + +\processXMLbuffer[lettrine] + +\lettrine{T}{he two} typeset arguments are the dropped capital and +the run||in text following it; the \TeX\ source of this paragraph +started with ``\type{\lettrine{T}{he two} typeset}''. The optional +parameter is explained below. + + +\subsection{Setup command: \type{\setuplettrine}} + +\processXMLbuffer[setuplettrine] + +\startitemize +\item \type{Lines} controls how many lines the dropped capital + will occupy (the default value is~2); +\item \type{Hang} sets how much of the dropped capital's width + should hang into the margin (the default is 0, values should be + between 0 and 1); +\item \type{Oversize} enlarges or decreases the dropped capital's height: + with \type{Oversize=0.1}. its height is enlarged by 10\% so that + it raises above the top paragraph's line (default=0, values should + be between $-$1 and 1); +\item \type{Raise} does not affect the dropped capital's height, but + moves it up (if positive) or down (if negative); useful with capitals + like \type{J} or \type{Q} which have a positive depth (default=0, + values should be between $-$1 and 1); +\item \type{Findent} (positive or negative) controls the horizontal gap + between the dropped capital and the indented block of text (default=0pt); +\item \type{Nindent} shifts the indented lines, starting from the second line, + horizontally by the specified amount (default=0.5em); +\item \type{Slope} can be used with dropped + capitals like \type{A} or \type{V} to add an extra shift + (positive or negative) to the indentation of each line + starting from the third one (no effect if \type{Lines=2}, default=0pt); +\item \type{Ante} can be used to typeset something + \emph{before} the dropped capital (typical use is for French + guillemets starting the paragraph). +\item \type{Image} will force \type{\lettrine} + to replace the letter normally used as dropped capital by an image. + \type{\lettrine[Image=yes]{A}{n exemple}} will load \type{A.eps} or + \type{A.pdf} instead of letter~A. +\item \type{FontHook} can be used to change the font and/or color of + the dropped capital (default: empty) +\item \type{TextFont} can be used to change the font and/or color of + the run||in text (default: \type{\sc}) +\stopitemize + +\noindent +The first, optional argument to the \type{\setuplettrine} command +allows you to create presets: The settings that follow will apply only +if the first text argument of \type{\lettrine} (see below) matches +this string exactly. I~have used this command at the top of this +article: +\starttyping +\setuplettrine[T][Findent=0.2em,Nindent=0.2em, + Oversize=.05,Hang=.15]] +\stoptyping +because otherwise the example on the previous page would not have +been as nice as it is. + +\section{Examples} +The following examples were all adapted from the file \type{demo.tex} +that is part of Daniel Flipo's original distribution. I've been forced +to make some changes here and there because the font for the Maps is +quite different from the font in the original examples, but I~have not +made changes to the original french text. + +\subsection{Standard options (using 2 lines)} + +\starttyping +\lettrine{E}{n} plein marais... +\stoptyping + +\begingroup +\language[fr] +\lettrine{E}{n} plein marais de la Souteyranne, \`a quelques kilom\`etres +au nord d'Aigues-Mortes, se trouve la Tour Carbonni\`ere. Construite +au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques +vestiges. +\par +\endgroup + +\subsection{Lettrine on a single line} + +\starttyping +\lettrine[Lines=1]{E}{n} plein marais... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Lines=1]{E}{n} plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, se trouve +la Tour Carbonni\`ere. +\par +\endgroup + +\subsection{Lettrine on a three lines} +\starttyping +\lettrine[Lines=3]{E}{n} plein marais... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Lines=3]{E}{n} plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, +se trouve la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des\break |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +\par +\endgroup + +\subsection{Lettrine in the margin} +\starttyping +\lettrine[Hang=1, Nindent=0pt, Lines=3] + {J}{ustement},... +\stoptyping + +\setupnarrower[middle=6pt] +\begingroup +\language[fr] +\startnarrower +\lettrine[Hang=1, Nindent=0pt, Lines=3]{J}{ustement}, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, +se trouve la Tour Carbonni\`ere. Construite au XIII\high{e}~si\`ecle, +elle contr\^olait l'unique voie d'acc\`es terrestre de la ville +fortifi\'ee, celle qui menait \`a Psalmody, l'une des +|<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. L'abbaye \'etait +ravitaill\'ee ---~dit-on ~--- par un souterrain qui la reliait au +ch\^ateau de Treillan. +\stopnarrower +\par +\endgroup + + +\subsection{Lettrine oversised, and partly in the margin} +\starttyping +\lettrine[Lines=3,Hang=0.2,Oversize=0.25] + {E}{n} ... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Lines=3, Hang=0.2, Oversize=0.25]{E}{n} +plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| \dots +% dont il ne reste que des vestiges. +\par +\endgroup + +\subsection{A guillemet in front of the lettrine} +\starttyping +\lettrine[Ante={<<}]{E}{n} plein marais ... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Ante={<<}]{E}{n} plein marais de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-Mortes, se trouve +la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des\break |<<|abbayes de sel|>>| \dots +% dont il ne reste que des vestiges. +\par +\endgroup + +\blank +The following four lettrines have all been typeset after changing the +default settings with the following command: + +\starttyping +\setuplettrine[Lines=4,FontHook={\color[gray]}] +\stoptyping + +\setuplettrine[Lines=4,FontHook={\color[gray]}] + +\subsection{A somewhat smaller and slightly raised lettrine} + +\starttyping +\lettrine[Oversize=-0.15, Raise=0.15] + {Q} {u'en plein marais} ... +\stoptyping + +\begingroup +\language[fr] +\lettrine[Oversize=-0.15, Raise=0.15]{Q}{u'en plein marais} + de la Souteyranne, \`a quel\-ques kilom\`etres au nord d'Aigues-Mortes, +se trouve la Tour Carbonni\`ere, surprend les visiteurs. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\subsection{The same lettrine, without corrections} + +\starttyping +\lettrine{Q}{u'en plein marais} de ... +\stoptyping + +\begingroup +\language[fr] +\lettrine{Q}{u'en plein marais} de la Souteyranne, +\`a quelques kilom\`etres au nord d'Aigues-\break Mortes, +se trouve la Tour Carbonni\`ere, surprend les visiteurs. +Construite au XIII\high{e}\break si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\subsection{Using the Slope option for the following lines} +\starttyping +\lettrine[Slope=0.4em,Findent=-0.5em, + Nindent=0.4em] + {\`A}{quelques kilom\`etres}... +\stoptyping + +\kern -12pt + +\begingroup +\language[fr] +\lettrine[Slope=0.4em, Findent=-0.5em, Nindent=0.4em]{\`A} {quelques +kilom\`etres} au nord d'Aigues-Mortes, se trouve la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee ---~dit-on~--- par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\kern 24pt +\subsection{Using the Slope option for the opposite effect} + +Also note the move into the margin + +\starttyping +\lettrine[Slope=-0.5em,Hang=0.5,Findent=0.2em] + {V}{oici} \`a... +\stoptyping + +\begingroup +\language[fr] +\startnarrower +\lettrine[Slope=-0.5em, Hang=0.5, Findent=0.2em]{V}{oici} +\`a quelques kilom\`etres au nord d'Aigues-Mortes la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie +d'acc\`es terrestre de la ville fortifi\'ee, celle qui menait \`a +Psalmody, l'une des |<<|abbayes de sel|>>| dont il ne reste que +quelques vestiges. L'abbaye \'etait ravitaill\'ee ---~dit-on~--- par +un souterrain qui la reliait au ch\^ateau de Treillan. +\stopnarrower +\par +\endgroup + +\subsection{Using a different font by using the FontHook} + +\starttyping +\def\myhook + {\definefontsynonym[LettrineFont][SansBold]} +\lettrine[FontHook={\myhook}, + Hang=.2, Findent=.3em] + {E}{n} plein marais... +\stoptyping + +\def\myhook + {\definefontsynonym[LettrineFont][SansBold]} + +\begingroup +\language[fr] +\lettrine[FontHook={\myhook},Hang=.2,Findent=.3em]{E}{n} plein +marais de la Souteyranne, \`a quelques +kilom\`etres au nord d'Aigues-Mortes, se trouve la Tour Carbonni\`ere. +Construite au XIII\high{e}~si\`ecle, elle contr\^olait l'unique voie d'acc\`es +terrestre de la ville fortifi\'ee, celle qui menait \`a Psalmody, +l'une des |<<|abbayes de sel|>>| dont il ne reste que quelques vestiges. +L'abbaye \'etait ravitaill\'ee par un souterrain qui +la reliait au ch\^ateau de Treillan. +\par +\endgroup + +\subsection{Use of an image instead of an actual letter} + +\setuplettrine[FontHook={}] + +\starttyping +\lettrine[Image=yes,Hang=.1, Oversize=.25, + Findent=0.1em, Raise=-.1] + {W} {er} reitet ... +\stoptyping + +{\switchtobodyfont[eul] +\lettrine[Image=yes,Hang=.1, Oversize=.25, Findent=0.1em, Raise=-.1] +{W}{er} reitet so sp\"at durch Nacht und Wind?\crlf +Es ist der Vater mit seinem Kind;\crlf +Er hat den Knaben wohl in dem Arm,\crlf +Er fa{\SS}t ihn sicher, er h\"alt ihn warm. +\par}% + +\section{Availability} + +The module can be downloaded from the new \ConTeXt\ module repository, +at\crlf +\hyphenatedurl{http://modules.contextgarden.net}. + +\blank +I have released this module into the public domain. + +\stopArticle +\stoptext
\ No newline at end of file diff --git a/Master/texmf-dist/tex/context/interface/third/lettrine.xml b/Master/texmf-dist/tex/context/interface/third/lettrine.xml new file mode 100644 index 00000000000..83093547786 --- /dev/null +++ b/Master/texmf-dist/tex/context/interface/third/lettrine.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> + +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" + name="context/third/t-lettrine" + language="all" version="2005.03.26"> + +<cd:command name="setuplettrine" file="t-lettrine.tex"> + <cd:sequence> + <cd:string value="setuplettrine"/> + </cd:sequence> + <cd:arguments> + <cd:keywords optional="yes"> + <cd:constant type="cd:text"/> + </cd:keywords> + <cd:assignments list="yes"> + <cd:parameter name="Lines"> + <cd:constant type="cd:number"/> + </cd:parameter> + <cd:parameter name="Hang"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Oversize"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Raise"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="Findent"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Nindent"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Slope"> + <cd:constant type="cd:dimension"/> + </cd:parameter> + <cd:parameter name="Ante"> + <cd:constant type="cd:text"/> + </cd:parameter> + <cd:parameter name="FontHook"> + <cd:constant type="cd:command"/> + </cd:parameter> + <cd:parameter name="TextFont"> + <cd:constant type="cd:command"/> + </cd:parameter> + <cd:parameter name="Image"> + <cd:constant type="yes"/> + <cd:constant type="no" default="yes"/> + </cd:parameter> + </cd:assignments> + </cd:arguments> +</cd:command> +<cd:command name="lettrine" file="t-lettrine.tex"> + <cd:sequence> + <cd:string value="lettrine"/> + </cd:sequence> + <cd:arguments> + <cd:assignments list="yes" optional="yes"> + <cd:inherit name="setuplettrine"/> + </cd:assignments> + <cd:content/> + <cd:content/> + </cd:arguments> +</cd:command> +</cd:interface> diff --git a/Master/texmf-dist/tex/context/third/lettrine/t-lettrine.tex b/Master/texmf-dist/tex/context/third/lettrine/t-lettrine.tex new file mode 100644 index 00000000000..ea86ddc416e --- /dev/null +++ b/Master/texmf-dist/tex/context/third/lettrine/t-lettrine.tex @@ -0,0 +1,163 @@ +%D \module +%D [ file=t-lettri, +%D version=2006.01.27, +%D title=\CONTEXT\ Lettrines, +%D subtitle=Funny stuff, +%D author=Taco Hoekwater, +%D date=\currentdate, +%D copyright=Public Domain] +%C +%C Donated to the public domain. + +%D This is just a quick and dirty conversion of the LaTeX package +%D +%D \ProvidesFile{lettrine.sty}[2004/05/22 v1.6 (D. Flipo)] +%D +%D Errors are likely mine, credit is due to Daniel.Flipo@univ-lille1.fr +%D +%D If enough people like it, I may even clean this mess up sometime. The +%D current version is just a (c)rude conversion of the low-level LaTeX +%D stuff to sometimes even lower-level ConTeXt. +%D +%D Changes: +%D 2005.08.29: support use within \startframedtext ..\stop +%D 2006.01.27: support use within \startnarrower..\stop + +\unprotect + +\newbox\Lettrinelbox +\newbox\Lettrinetbox + +\newcount\Lettrinelines + +\newdimen\LettrineHeight +\newdimen\Lettrinefirst +\newdimen\Lettrinenext +\newdimen\Lettrineraise + +\newdimen\Lettrinepindent +\newdimen\Lettrinefindent +\newdimen\Lettrinenindent + +\getparameters[LettrineDefault] + [Lines=2, + Hang=0, + Oversize=0, + Raise=0, + Findent=0pt, + Nindent=0.5em, + Slope=0pt, + Ante=, + FontHook=, + TextFont=\sc, + Image=\v!no] + +\def\setuplettrine{\dodoubleempty\dosetuplettrine} + +\def\dosetuplettrine[#1][#2]{% + \doifassignmentelse{#1}{% + \dodosetuplettrine[][#1]% + }{% + \def\ascii{}% + \doifsomething{#1}{\convertargument#1\to\ascii }% + \expandafter\dodosetuplettrine\expandafter[\ascii][#2]% + }% +} + + +\def\dodosetuplettrine[#1][#2]{% + \getparameters[LettrineDefault#1][#2] +} + +\def\doLettrineHeight{% + \LettrineHeight =\Lettrinelines\baselineskip\relax + \ifnum\Lettrinelines>1 + \advance\LettrineHeight -\baselineskip + \fi + \setbox\Lettrinetbox\hbox{{\LettrineTextFont x}}% + \LettrineHeight = \dimexpr \LettrineHeight+ \ht\Lettrinetbox + + \LettrineOversize\LettrineHeight \relax +} + +\def\doLettrineEPS#1{% + \doLettrineHeight\LettrineFontHook + \externalfigure[#1][\c!height=\LettrineHeight]} + +\def\doLettrineFont{% + \doLettrineHeight + \definefontsynonym[LettrineFont][Serif]% + \setbox\Lettrinetbox=\hbox{{\LettrineFontHook + \definedfont[LettrineFont at \the\LettrineHeight] X}}% + \scratchcounter = \numexpr (100*\LettrineHeight)/(\ht\Lettrinetbox/100) - 9999\relax + \ifnum\scratchcounter>0 + \def\tempa{1.\the\scratchcounter}% + \else + \def\tempa{1}% + \fi + \LettrineFontHook + \!!dimena = \tempa\LettrineHeight + \definedfont[LettrineFont at \the\!!dimena]% +}% + +\def\lettrine{\dosingleempty\dolettrine} + +\def\dolettrine[#1]#2#3{% + \convertargument#2\to\ascii + \def\lettrgetparam##1{% + \ifcsname LettrineDefault\ascii##1\endcsname + \setevalue{Lettrine##1}{\csname LettrineDefault\ascii##1\endcsname}% + \else + \setevalue{Lettrine##1}{\csname LettrineDefault##1\endcsname}% + \fi}% + \processcommalist + [Lines,Hang,Oversize,Raise,Findent,Nindent,Slope,Ante,FontHook,TextFont,Image]\lettrgetparam + \getparameters[Lettrine][#1]% + \Lettrinenindent=\LettrineNindent\relax + \Lettrinefindent=\LettrineFindent\relax + \Lettrinelines =\LettrineLines\relax + \setbox\Lettrinelbox\hbox{{\ifx\LettrineImage\v!yes\doLettrineEPS{#2}\else + \ifx\LettrineImage\v!true\doLettrineEPS{#2}\else + \doLettrineFont #2\fi\fi}}% + \setbox\Lettrinetbox\hbox{{\LettrineTextFont{#3}}}% + \ifnum\Lettrinelines=1 + \Lettrinefirst = \dimexpr \ht\Lettrinelbox-\ht\Lettrinetbox \relax + \Lettrineraise=0pt + \else + \setbox\scratchbox\hbox{{\LettrineTextFont x}}% + \Lettrinefirst = \dimexpr -\Lettrinelines\baselineskip + \baselineskip + -\ht\scratchbox \relax + \Lettrineraise = \dimexpr\LettrineRaise\Lettrinefirst \relax + \Lettrineraise = -\Lettrineraise \relax + \Lettrinefirst = \dimexpr\Lettrinefirst+\Lettrineraise+\ht\Lettrinelbox \relax + \Lettrineraise = \dimexpr\Lettrineraise-\Lettrinelines\baselineskip +\baselineskip \relax + \fi + \par + \ifdim\Lettrinefirst>0.2pt\vskip\Lettrinefirst\fi + \setbox\scratchbox= \hbox{\LettrineAnte}% + \setlocalhsize + \Lettrinepindent= \dimexpr \wd\Lettrinelbox -\LettrineHang\wd\Lettrinelbox + + \wd\scratchbox + \Lettrinefindent \relax + \Lettrinefirst=\dimexpr \localhsize -\Lettrinepindent +\rightskip+\leftskip\relax + \advance\Lettrinenindent \Lettrinepindent + \Lettrinenext=\dimexpr \localhsize -\Lettrinenindent +\rightskip+\leftskip\relax + \def\Lparshape{\the\numexpr\Lettrinelines+1\relax\space \the\Lettrinepindent\space \the\Lettrinefirst}% + \dorecurse{\numexpr \Lettrinelines - 1 \relax}{% + \edef\Lparshape{\Lparshape\space \the\Lettrinenindent\space \the\Lettrinenext}% + \advance\Lettrinenindent\LettrineSlope + \advance\Lettrinenext -\LettrineSlope + }% + \edef\Lparshape{\Lparshape\space 0pt\space \the\localhsize}% + \setbox\scratchbox = \hbox{\hbox{\LettrineAnte}\raise \Lettrineraise \hbox{\box\Lettrinelbox }}% + \scratchdimen = \dimexpr \dp\scratchbox + \ht\strutbox + 1pt\relax + \vskip\scratchdimen \penalty0\vskip-\scratchdimen + \noindent + \scratchdimen = \leftskip \leftskip=\scratchdimen + \scratchdimen = \rightskip \rightskip=\scratchdimen + \parshape=\Lparshape + \smash{\llap{\box\scratchbox}}% + \hskip \the\Lettrinefindent + \box\Lettrinetbox +} + +\protect +\endinput diff --git a/Master/texmf-dist/tpm/t-lettrine.tpm b/Master/texmf-dist/tpm/t-lettrine.tpm new file mode 100644 index 00000000000..064ade5c990 --- /dev/null +++ b/Master/texmf-dist/tpm/t-lettrine.tpm @@ -0,0 +1,32 @@ +<!DOCTYPE rdf:RDF SYSTEM "tpm.dtd"> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/"> + <rdf:Description about="http://dl.contextgarden.net/modules/t-lettrine.zip"> + <TPM:Name>t-lettrine</TPM:Name> + <TPM:Type>Package</TPM:Type> + <TPM:Date>2006/04/04 00:00:00</TPM:Date> + <TPM:Version>2006.04.04</TPM:Version> + <TPM:Creator>taco</TPM:Creator> + <TPM:Title>ConTeXt Lettrines</TPM:Title> + <TPM:Description> + t-lettrine is a port from LaTeX's lettrine.sty + </TPM:Description> + <TPM:Author>Taco Hoekwater</TPM:Author> + <TPM:Size>130482</TPM:Size> + <TPM:Build/> + <TPM:RunFiles size="8620"> +tex/context/third/lettrine/t-lettrine.tex +tex/context/interface/third/lettrine.xml +tpm/t-lettrine.tpm + </TPM:RunFiles> + <TPM:DocFiles size="121862"> +doc/context/third/lettrine/lettrine.pdf +doc/context/third/lettrine/lettrine.tex +doc/context/third/lettrine/W.pdf + </TPM:DocFiles> + <TPM:Requires> + <TPM:Package name="context"/> + </TPM:Requires> + <TPM:Provides>Package/t-lettrine</TPM:Provides> + </rdf:Description> +</rdf:RDF> + diff --git a/Master/tlpkg/tlpsrc/collection-context.tlpsrc b/Master/tlpkg/tlpsrc/collection-context.tlpsrc index b2fb6e0f075..176c36eef8a 100644 --- a/Master/tlpkg/tlpsrc/collection-context.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-context.tlpsrc @@ -13,5 +13,6 @@ depend context-construction-plan depend context-degrade depend context-french depend context-letter +depend context-lettrine depend collection-metapost depend collection-basic diff --git a/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc b/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc new file mode 100644 index 00000000000..d24ab8504a4 --- /dev/null +++ b/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc @@ -0,0 +1,5 @@ +name context-lettrine +category Package +runpattern d texmf-dist/tex/context/third/lettrine +runpattern f texmf-dist/tex/context/interface/third/t-lettrine.xml +docpattern d texmf-dist/doc/context/third/lettrine |