L A T E X in proper ConT E Xt L A T E X ConT E Xt Berend de Boer 2000-feb-25 2002-oct-30
1 1 L A TEX ConTEXt 4 1.1 4 1.2 5 1.3 5 2 ConTEXt 6 2.1 6 2.2 6 2.3 8 2.4 8 3 L A TEX (environments) 10 3.1 abstract 10 3.2 bibliography 10 3.3 description 12 3.4 enumerate 14 3.5 itemize 15 3.6 quotation 15 3.7 verbatim 16 4 (floats) 18 4.1 (figures) 18 4.2 20 5 (tables) 21 5.1 tabular 21 5.2 tabbing 22 5.3 23 6 24 6.1 24 6.2 24 6.3 Display 24
2 6.4 24 6.5 25 6.6 (theorem) 25 7 27 7.1 27 7.2 (fonts) 27 7.3 28 7.4 29 7.5 30 7.6 30 7.7 31 7.8 32 7.9 34 8 35 8.1 35 8.2 35 8.3 35 8.4 bibtex 36 9 38 9.1 38 9.2 URL 38 10 40 10.1 Title page 40 10.2 Text in margin 40 10.3 40 10.4 Babel 40 10.5 Interfaces 40 10.6 Breaking lines 40 10.7 40
3 11 ConTEXt 42 11.1 texexec 42 11.2 42 L A TEX 43 ConTEXt 44 L A TEX ConTEXt 45 45 46 46
4 1 L A TEX ConTEXt 1.1 L A TEX.. ( 11 ).,..,.....,.,.. L A TEX, ConTEXt. ConTEXt L A TEX. L A TEX. ConTEXt 3. ConTEXt, on--screen.,, (cross--document). ConTEXt. ConTEXt L A TEX. ConTEXt. http: //www.pragma-ade.com/general/manuals/cont-nli.pdf.
5 1.2 ConTEXt.. ConTEXt http://www.pragma-ade.nl. http://www.pragma-ade.com/general/manuals /ms-cb-en.pdf. ConTEXt, http://www.pragma-ade.com /general/manuals/cont-nli.pdf. http://www. pragma-ade.com/general/manuals/cont-eni.pdf. 4TEX ConTEXt. http://4tex.ntg.nl /4tex5/. ConTEXt. mailto:majordomo@ntg.nl, subscribe ntg-context yourname@yourserver.yourdomain. 1.3 David Arnold, Wybo Dekker, Hans Hagen..
6 2 ConTEXt ConTEXt. 2.1 hello world. L A TEX. \documentclass{article} Hello world. ConTEXt. Hello world. ConTEXt. TEX \input. 2.2 L A TEX Hello World text.tex.. latex test.tex ConTEXt TEX. texexec test.tex texexec,, ( 11.1 )...
7 context test.tex. texexec. texexec test.tex texexec. TeXExec 1.9 - ConTeXt / PRAGMA ADE 1997-2000 executable : pdfetex format : cont-en inputfile : testc output : dvips interface : en current mode : all TeX run : 1. ConTEXt., ConTEXt. texexec.ini texexec. texexec -interface=en test.tex ConTEXt,.dvi.pdf..dvi.pdf texexec.ini texexec. texexec -output=pdftex test.tex : texexec --pdf test.tex texexec. % interface=en output=pdftex
8 This example compiles with the english interface and generates pdf output. 2.3 L A TEX ConTEXt. L A TEX. \documentclass{report} \chapter{one} My first chapter. \chapter{two} My second chapter. ConTEXt. \chapter{one} My first chapter. \chapter{two} My second chapter.., ConTEXt. 8.1. 2.4 (table of contents) L A TEX \tableofcontents. \documentclass{report} \tableofcontents
9 \chapter{one} My first chapter. \chapter{twoone} My second chapter. ConTEXt \completecontent. \completecontent \chapter{one} My first chapter. \chapter{two} My second chapter. texexec. ( 11.1 ). \completecontent ConTEXt \placecontent, \completecontent, \placecontent.
10 3 L A TEX (environments), L A TEX ConTEXt.. 3.1 abstract L A TEX abstract. article report documentclass. quotation. abstract. \documentclass{article} \begin{abstract} This is an abstract of this article. \end{abstract} ConTEXt abstract.., L A TEX article abstract. \startnarrower\switchtobodyfont[small] \midaligned{\bf Abstract}\par This is an abstract of this article. \stopnarrower \startnarrower. \switchtobodytext (body font). \midaligned. 3.2 bibliography L A TEX bibliography.
11 \documentclass{article} \section{my life} I ve read only two books in my life \cite{bekke92}, \cite{brodie84}. \begin{thebibliography}{brodie84} \bibitem[bekke92]{bekke92} J.H.~ter~Bekke, \emph{semantic datamodeling}, Prentice Hall, Hemel Hempstead, ISBN~0-13-806050-9, 1992. \bibitem[brodie84]{brodie84} L.~Brodie, \emph{thinking Forth, a language and philosophy for solving problems}, Prentice Hall, ISBN 0-13-917568-7, 1984. \end{thebibliography} \bibitem, bibliography. \cite. ConTEXt bib., http://www.cybercomm.nl/~bittext/temp/m-bib.zip. 11.2.,. ConTEXt..bbl.. \startpublication[k=brodie84, t=article, a=l.~brodie, y=1984, s=lb84] \artauthor[]{leo}[l.]{}{brodie} \arttitle{thinking Forth, a language and philosophy for solving problems} \journal{prentice Hall} \pubyear{1984} \stoppublication \startpublication[k=bekke92, t=article, a=j.h.~ter~bekke, y=1992,
12 s=jb92] \artauthor[]{johan}[j.h.]{ter}{bekke} \arttitle{semantic datamodeling} \journal{prentice Hall} \pubyear{1992} \stoppublication \startpublication.,. \usemodule[bib] \setuppublications [numbering=yes, sort=author] \section{my life} I ve read only two books in my life \cite[bekke92,brodie84]. But I ve admit that I no longer think Forth \cite[brodie84]. \completepublications \setuppublications.,,. L A TEX. \completepublications. \placepublications,. bibtex 8.4. 3.3 description L A TEX description. \documentclass{article}
13 \begin{description} \item[gnat] A small animal, found in the North Woods, that causes no end of trouble. \item[gnu] A large animal, found in crossword puzzles, that causes no end of trouble. \item[armadillo] A medium-sized animal. \end{description} ConTEXt \definedescription,. description L A TEX enumeration.. animal. description,.. \definedescription [animal] [location=hanging, margin=standard, headstyle=bold] \definestartstop [animals] [before=\blank\startpacked, after=\stoppacked\blank] \startanimals \animal{gnat} A small animal, found in the North Woods, that causes no end of trouble. \animal{gnu} A large animal, found in crossword puzzles, that causes no end of trouble. \startanimal{armadillo} A medium-sized animal. \stopanimal \stopanimals \startanimals animals description. \animal \startanimal (description). start/stop
14. \animal \par ( ). \definestartstop. animals,. \blank. \startpacked.,. \startitemize[4*broad,packed] \sym{gnat} A small animal, found in the North Woods, that causes no end of trouble. \sym{gnu} A large animal, found in crossword puzzles, that cuases no end of trouble. \sym{armadillo} A medium-sized animal. \stopitemize armadillo,.. ConTEXt. 4*broad broad. packed. 3.4 enumerate L A TEX enumerate. \documentclass{article} \begin{enumerate} \item First item. \item Second item. \end{enumerate} ConTEXt \startitemize. n.
15 \startitemize[n] \item First item. \item Second item. \stopitemize 3.5. 7.9. 3.5 itemize L A TEX itemize. \documentclass{article} \begin{itemize} \item First item. \item Second item. \end{itemize} ( ). ConTEXt \startitemize.. \startitemize \item First item. \item Second item. \stopitemize 3.5. 7.9. 3.6 quotation quote L A TEX.
16 \documentclass{article} \begin{quote} But letting go of the first is, to him, just a promise of pain with no promise of compensating pleasure. \end{quote} ConTEXt \startquotation. \startquotation But letting go of the first is, to him, just a promise of pain with no promise of compensating pleasure. \stopquotation L A TEX quotation, ConTEXt \startquotation. ConTEXt (inline quotes). \quote \quotation. This is a \quote{quote} and this is a \quotation{quotation}. \quote. \quotation. 3.7 verbatim L A TEX verbatim ( ) verbatim. \documentclass{article} \begin{verbatim} This is
17 verbatim \LaTeX. \end{verbatim} ConTEXt. \starttyping This is verbatim \ConTeXt. \stoptyping
18 4 (floats). ConTEXt. 4.1 (figures) L A TEX graphics graphicx. \includegraphics. pdftex. \documentclass{article} \usepackage[pdftex]{graphicx} \begin{figure} \includegraphics{test.png} \caption{test picture} \label{fig:test} \end{figure}. ConTEXt. \placefigure [] [fig:test] {Test picture} {\externalfigure[test.png]} L A TEX ConTEXt. ConTEXt. scale.
19 \placefigure [] [fig:test] {Test picture} {\externalfigure[test.png][scale=2000]} scale 1000(100%). 2000. (width) (dimension),.. ConTEXt,.. \useexternalfigure [testone] [test.png] [scale=2000] \useexternalfigure [testtwo] [test.png] [width=.5\textwidth] \placefigure [] [fig:testone] {Test picture: twice as large as it natural size} {\externalfigure[testone]} \placefigure [] [fig:testtwo] {Test picture: half as large as the text} {\externalfigure[testtwo]}, \useexternalfigure...
20 http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf. 4.2 L A TEX \listoffigures. \documentclass{article} \usepackage[pdftex]{graphicx} \listoffigures \begin{figure} \includegraphics{test.png} \caption{test picture} \label{figure:test} \end{figure} ConTEXt \completelistoffigures. \completelistoffigures \placefigure [fig:test] {Test picture} {\externalfigure[test.png]} \completecontent, \completelistoffigures \placelistoffigures.. \completelistoffigures..
21 5 (tables) 5.1 tabular L A TEX tabular. L A TEX. \documentclass{article} \begin{tabular}{ r r@{--}l p{1.25in} } \hline \multicolumn{4}{ c }{GG\&A Hoofed Stock} \\ \hline\hline &\multicolumn{2}{c }{Price}& \\ \cline{2-3} \multicolumn{1}{ c }{Year} & \multicolumn{1}{r@{\,\vline\,}}{low} & high & \multicolumn{1}{c }{Comments} \\ \hline 1971 & 97 & 245 & Bad year for farmers in the west. \\ \hline 72 & 245 & 245 & Light trading due to a heavy winter. \\ \hline 73 & 245 & 2001 & No gnus was very good gnus this year. \\ \hline \end{tabular} ConTEXt \starttable. \starttable[ r r l p(1.25in) ] \HL \VL \FOUR{GG\&A Hoofed Stock} \VL\SR \HL \VL \LOW{Year} \VL \TWO{Price} \VL \LOW{Comments} \VL\SR \DC \DL[2] \DC \DR \VL \VL low \VL high \VL \VL\SR \HL \VL 1971 \VL \TWO{97--245} \VL Bad year for farmers in the west. \VL\SR \HL \VL 72 \VL \TWO{245--245} \VL Light trading due to a heavy winter. \VL\SR
22 \HL \VL 73 \VL \TWO{245--2001} \VL No gnus was very good gnus this year. \VL\SR \HL \stoptable ConTEXt, \starttables L A TEX longtable. 5.2 tabbing L A TEX tabbing.,. \documentclass{article} \begin{tabbing} Armadillo: \= \kill Gnat: \> not edible \\ Armadillo: \> not edible\\ \end{tabbing} ConTEXt \starttabulate. \starttabulate[ l p ] \NC Gnat: \NC not edible \NC\NR \NC Armadillo: \NC not edible \NC\NR \stoptabulate L A TEX, ( ). ConTEXt \starttabulate \starttable.... \NC(Next Column), \NC \NR(Next Row). ConTEXt \starttabulate \starttable. \starttabulate.
23, p \starttabulate. \starttabulate,. 5.3 L A TEX \listoftables, table. ConTEXt \placelistoftables. L A TEX \placetable table.
24 6 6.1 ConTEXt L A TEX. TEX. L A TEX. ConTEXt TEX. ConTEXt TEX. 6.2 ConTEXt (in--text) $. 6.3 Display ConTEXt display $. \startformula. 6.4 L A TEX equation. \documentclass{article} \begin{equation} E = mc^2 \end{equation} ConTEXt display \placeformula. \placeformula $$ E = mc^2 $$
25 6.5 L A TEX eqnarray. \\. ConTEXt TEX \displaylines. \cr. $$\displaylines{zeroorone = ( ( Amount\ mod\ Currency_RoundingFactor )\cr +\ Currency_Boundary )\cr div\ Currency_RoundingFactor}$$ 6.6 (theorem) L A TEX \newtheorem... \documentclass{article} \newtheorem{guess}{conjecture} This is the first one: \begin{guess} All conjectures are interesting. \end{guess} ConTEXt \defineenumeration. L A TEX \newtheorem. \defineenumeration [guess] [text=conjecture, location=left, letter=it] This is the first one: \guess All conjectures are interesting.
26 This is the second one: \startguess Except this one. \stopguess \guess \startguess. \subguess, \subsubguess. ConTEXt \defineenumeration. http://www.pragma-ade.com/general/manuals /cont-eni.pdf.
27 7. L A TEX ConTEXt, ConTEXt,.. \setupsomething. 7.1 L A TEX \documentclass. \documentclass[a4paper]{article} ConTEXt \setuppapersize. \setuppapersize[a4] ConTEXt. A5 A4. 7.2 (fonts) L A TEX. \documentclass[12pt]{report} ConTEXt \setupbodyfont. \setupbodyfont[12pt]
28 \setupbodyfont. \switchtobodyfont. L A TEX. Helvetica. \documentclass{article} \usepackage{helvet} ConTEXt \setupbodyfont. \setupbodyfont[ber,phv,ss], ber (Karl Berry). phv Hevetica. ss sans-serif. times, helvetica, courier. \setupbodyfont[ber,pos] 7.3 L A TEX baselineskip. \documentclass{article} \setlength\baselineskip{12pt} 12pt, 10. L A TEX ConTEXt. \setupinterlinespace.
29 \setupinterlinespace[line=1.2\bodyfontsize] \bodyfontsize interlinespace. \bodyfontsize. 7.4, L A TEX \parskip. \documentclass{article} \setlength{\parskip}{3pt} This is my first paragraph. This is my second paragraph. 3. ConTEXt \setupwhitespace. \setupwhitespace[3pt] This is my first paragraph. This is my second paragraph.,.. [medium] [big]. \setupwhitespace[medium] This is my first paragraph. This is my second paragraph.
30 7.5 L A TEX. 0. \documentclass{article} \setlength{\parindent}{0pt} This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my second paragraph. ConTEXt.. \setupindenting[medium] This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my first paragraph. This is my second paragraph. 7.6 L A TEX \pagestyle. ConTEXt \setuppagenumbering. L A TEX. ConTEXt. 1. \pagestyle{plain}: \setuppagenumbering[location={footer,middle}] 2. \pagestyle{empty}:
31 \setuppagenumbering[location=] 3. \pagestyle{headings}: \setuppagenumbering[location={header,middle}] 4. \pagestyle{myheadings}: \setuppagenumbering[location=header] (see...) ConTEXt L A TEX. L A TEX (head), (body), (foot). ConTEXt. 7.7 L A TEX \pagenumbering. \documentclass{article} \pagenumbering{roman} \tableofcontents \chapter{introduction} \pagenumbering{arabic} This is a test. ConTEXt \setupnumbering. \startfrontmatter \setuppagenumbering[conversion=romannumerals] \setuppagenumber[number=1] \completecontent \stopfrontmatter \startbodymatter
32 \setuppagenumbering[conversion=numbers] \setuppagenumber[number=1] \chapter{introduction} This is a test. \stopbodymatter \startfontmatter \startbodymatter. front matter, body matter., \setuppagenumber (section) 1. \setuppagenumber., 1. 7.8 L A TEX L A TEX. L A TEX. ConTEXt. ConTEXt \setuphead.,. \setuphead[chapter][letter={\switchtobodyfont[20pt,ss]\bf}] \setuphead[section][letter={\switchtobodyfont[16pt,ss]\bf}] \chapter{this is a chapter} First sentence. \section{this is a section} First sentence. 20 (chapter). ( ). \setuppagenumbering[alternative=doublesided] \setuphead[chapter] [page=right]
33 \chapter{first thought} First sentence. \chapter{second thought} Second sentence. \setuppagenumbering. (chapter).... \setuphead [chapter] [numberstyle=bold, textstyle=cap, before=\hairline\blank, after={\nowhitespace\hairline\blank[line]}] \chapter{this is a chapter} A sentence. setup before after. ConTEXt.. (subsection). (section).. \setuphead [subsection] [command=\myhead] \def\myhead#1#2{#2} \chapter{this is a chapter}
34 \section{section} \subsection{yes} A sentence... \setuphead [subsection] [number=no] \chapter{this is a chapter} \section{section} \subsection{yes} A sentence. 7.9 ConTEXt. packed. \setupitemize[packed] \startitemize[n] \item First line. \item Second line, no white space above it. \stopitemize
35 8 8.1 8.2 8.3 L A TEX. (preamble) \makeindex.idx. \index. makeindex. \input. \documentclass{article} \makeindex Put \index{this} and \index{that} in the index. \input{testlatex.ind} ConTEXt. texexec \completeindex. Put \index{this} and \index{that} in the index. \completeindex
36 8.4 bibtex bibtex.bbl. bib ( 3.2 ).bbl. \setuppublications.
37 \usemodule[bib] \setuppublications [database={mybibs}, numbering=yes, sort=author] \section{my life} I ve read only two books in my life \cite[laan95:_types_pascal]. But I ve admit that I no longer think Forth \cite[wogan:73a]. \completepublications bib.
38 9 9.1 \usepackage{article} \usepackage [pdftitle={test document}, pdfauthor={berend de Boer}, pdfsubject={there is more than LaTeX}, pdfkeywords={latex ConTeXt TeX}, colorlinks, linkcolor=blue] {hyperref} \setupinteraction [status=start, title={test document}, author={berend de Boer}, subtitle={there is more than LaTeX}, keywords={latex ConTeXt TeX}, color=blue] 9.2 URL L A TEX hyperref. URL \href. \documentclass{article} \usepackage{hyperref} The \href{http://www.freebsd.org}{greatest server OS} on this world. ConTEXt URL.
39 \setupinteraction[state=start] \useurl [contextsupport] [http://www.pragma-ade.nl] The \ConTeXt\ support site is \from[contextsupport].
40 10 10.1 Title page 10.2 Text in margin 10.3 \setupcolors. \setupcolors[state=start] 10.4 Babel 10.5 Interfaces 10.6 Breaking lines 10.7 L A TEX \vspace... \vspace*. \documentclass{article} \vspace*{5cm} This line comes first. \vspace{2\baselineskip} This line comes second.
41 \vspace{.5\baselineskip} And this is the third line. ConTEXt \blank.. force. \blank[5cm,force] This line comes first. \blank[2*line] This line comes second. \blank[medium] And this is the third line.
42 11 ConTEXt 11.1 texexec ConTEXt texexec. TEX. 1. ConTEXt.tui. texexec.tuo. (, ),. 2. texexec. 11.2 ConTEXt. texexec --module m-bib http://www.pragma-ade.nl. contdoc.zip.
43 L A TEX L A TEX. b \bibitem 11 bibliography 10, 11 c \cite 11 comment 46 d description 12 \documentclass 27 e enumerate 14 eqnarray 25 equation 24 h \href 38 i \includegraphics 18 \index 35 \input 35 itemize 15 l \listoffigures 20 \listoftables 23 longtable 22 m \makeindex 35 n \newtheorem 25 p \pagenumbering 31 \pagestyle 30 \parskip 29 q quotation 16 quote 15 t tabbing 22 \tableofcontents 8 table 23 tabular 21 v \vspace 40 \vspace* 40
44 ConTEXt ConTEXt b bib 36, 45 \blank 14, 41 \bodyfontsize 29 c \completecontent 9, 20 \completeindex 35 \completelistoffigures 20 \completepublications 12 \cr 25 d \definedescription 13 \defineenumeration 25, 26 \definestartstop 14 i \input 6 m \midaligned 10 n \NC 22 \NR 22 p \placecontent 9 \placeformula 24 \placelistoffigures 20 \placelistoftables 23 \placepublications 12 \placetable 23 q \quotation 16 \quote 16 s \setupbodyfont 27, 28 \setupcolors 40 \setuphead 32 \setupinterlinespace 28 \setupnumbering 31 \setuppagenumber 32 \setuppagenumbering 30, 33 \setuppapersize 27 \setuppublications 12, 36 \setupwhitespace 29 \startbodymatter 32 \startfontmatter 32 \startformula 24 \startitemize 14, 15 \startnarrower 10 \startpacked 14 \startpublication 12 \startquotation 16 \starttable 21, 22 \starttables 22 \starttabulate 22, 23 \switchtobodyfont 28 \switchtobodytext 10 u \useexternalfigure 19
45 L A TEX ConTEXt L A TEX ConTEXt. L A TEX. \begin{environment} \end{environment} ConTEXt. \startenvironment \stopenvironment L A TEX environment ConTEXt environment Remark abstract no equivalent. array no equivalent. center alignment description See section 3.3 displaymath document text enumerate itemize equation placeformula eqnarray displaylines Use the standard TEX commands. figure Use placefigure. flushleft alignment flushright alignment itemize itemize letter no equivalent. list itemize math Use $ before and $ after the formula. minipage no equivalent. note no equivalent. overlay no equivalent. picture MPgraphic In ConTEXt you can include metapost code to achieve the same and better effects. quote citaat quotation citaat slide no equivalent. sloppypar tabbing tabulate table table Use together with placetable tabular table titlepage no equivalent. thebibliography publication Requires the bib. theindex Use completeindex.
46 trivlist verbatim verse itemize typing L A TEX 3. ConTEXt. L A TEX command ConTEXt command Remark setlanguage Provided by the babel package. L A TEX. ConTEXt. L A TEX package ConTEXt environment Remark comment comment Comment out certain parts of your document so it does not show up in the.dvi or.pdf file. L A TEX s comment is part of Rainer Sch pf s verbatim package. longtable tables The longtable package provides tables that can be broken accross page.
47