Difference between revisions of "Article Abstracts"
(Added proper LaTeX example.) |
(Added a simple ConTeXt solution.) |
||
Line 18: | Line 18: | ||
== ConTeXt: A simple solution == | == ConTeXt: A simple solution == | ||
− | The simplest way of producing an abstract in a ConTeXt document is to specify the formatting directly. The | + | The simplest way of producing an abstract in a ConTeXt document is to specify the formatting directly. The code from LaTeX's <code>classes.dtx</code> is nearly trivial, and is quite easy to replicate in ConTeXt idioms. |
<texcode> | <texcode> | ||
− | + | \starttext | |
+ | \midaligned{\bf Abstract} | ||
+ | \startnarrower[2*middle] | ||
+ | This is the document's abstract. It contains enough text for two lines, but no more. | ||
+ | \stopnarrower | ||
+ | \blank[big] | ||
+ | This is the main text of the document. Like the abstract, it contains enough text | ||
+ | for two lines, to show the margins. | ||
+ | \stoptext | ||
+ | </texcode> | ||
+ | |||
+ | <context> | ||
\starttext | \starttext | ||
− | \ | + | \midaligned{\bf Abstract} |
− | + | \startnarrower[2*middle] | |
− | + | This is the document's abstract. It contains enough text for two lines, but no more. | |
− | + | \stopnarrower | |
− | + | \blank[big] | |
− | |||
− | |||
− | |||
− | |||
− | + | This is the main text of the document. Like the abstract, it contains enough text | |
− | + | for two lines, to show the margins. | |
\stoptext | \stoptext | ||
− | </ | + | </context> |
− | + | In the two-column document classes, LaTeX's <code>abstract</code> environment does nothing beyond putting a <code>\section*{Abstract}</code> in front of the abstract's text. This can be easily replicated in ConTeXt with <code>\subject{Abstract}</code>. (See [[Unnumbered Sections]].) | |
== ConTeXt: A more reusable solution == | == ConTeXt: A more reusable solution == | ||
{{todo|Write this whole section, along the lines of the parallel section in [[Document Titles]].}} | {{todo|Write this whole section, along the lines of the parallel section in [[Document Titles]].}} |
Revision as of 02:03, 5 September 2005
< From LaTeX to ConTeXt | Document Titles >
TODO: This is sort of a stub article which I sketched out to remind myself what I wanted to write later. If anyone else wants to work on it, feel free! (See: To-Do List) |
LaTeX
Much as with Document Titles, the standard LaTeX article and report classes define an abstract
environment to typeset an abstract in a way that distinguishes it from the rest of the text. In a single-column article, it is set somewhat narrower than the main text, with the word "Abstract" centered above it.
\documentclass{article} \begin{document} \begin{abstract} This is the abstract of the paper. \end{abstract} \end{document}
ConTeXt: A simple solution
The simplest way of producing an abstract in a ConTeXt document is to specify the formatting directly. The code from LaTeX's classes.dtx
is nearly trivial, and is quite easy to replicate in ConTeXt idioms.
\starttext \midaligned{\bf Abstract} \startnarrower[2*middle] This is the document's abstract. It contains enough text for two lines, but no more. \stopnarrower \blank[big] This is the main text of the document. Like the abstract, it contains enough text for two lines, to show the margins. \stoptext
In the two-column document classes, LaTeX's abstract
environment does nothing beyond putting a \section*{Abstract}
in front of the abstract's text. This can be easily replicated in ConTeXt with \subject{Abstract}
. (See Unnumbered Sections.)
ConTeXt: A more reusable solution
TODO: Write this whole section, along the lines of the parallel section in Document Titles. (See: To-Do List) |