summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-fil.tex3
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/font-map.tex125
-rw-r--r--tex/context/base/s-map-10.tex476
-rw-r--r--tex/context/base/s-ptj-01.tex445
-rw-r--r--tex/context/interface/keys-cz.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-fr.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
13 files changed, 933 insertions, 134 deletions
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex
index 417bc437f..dcd3ce9d3 100644
--- a/tex/context/base/cont-fil.tex
+++ b/tex/context/base/cont-fil.tex
@@ -108,4 +108,7 @@
\definefilesynonym [unic-chi] [unic-cjk]
\definefilesynonym [unic-jap] [unic-cjk]
+%definefilesynonym [practexjournal] [ptj-01]
+\definefilesynonym [pracjourn] [ptj-01]
+
\endinput
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index daaeb5782..f78a4b41d 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -13,7 +13,7 @@
% it's about time to clean up this file ...
-\newcontextversion{2006.11.17 19:52}
+\newcontextversion{2006.11.20 09:49}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index d8736992b..320bd9c3a 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -42,7 +42,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2006.11.17 19:52}
+\edef\contextversion{2006.11.20 09:49}
%D For those who want to use this:
diff --git a/tex/context/base/font-map.tex b/tex/context/base/font-map.tex
deleted file mode 100644
index 33e7fd7dd..000000000
--- a/tex/context/base/font-map.tex
+++ /dev/null
@@ -1,125 +0,0 @@
-%D \module
-%D [ file=font-map,
-%D version=1998.03.13,
-%D title=\CONTEXT\ Font Macros,
-%D subtitle=Postscript for Maps,
-%D author=Taco Hoekwater,
-%D date=\currentdate,
-%D copyright=NTG Maps]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
-%C details.
-
-% NOT YET ADAPTED TO THE NEW FONT MACROS
-
-\startnotmode[localfonts]
-
-\definefontsynonym [Mono] [pcrr7tn] [encoding=texnansi]
-\definefontsynonym [MonoSlanted] [pcrro7tn] [encoding=texnansi]
-\definefontsynonym [MonoBold] [pcrb7tn] [encoding=texnansi]
-\definefontsynonym [MonoBoldSlanted] [pcrbo7tn] [encoding=texnansi]
-\definefontsynonym [MonoBoldItalic] [pcrbo7tn] [encoding=texnansi]
-
-\definefontsynonym [Serif] [ptmr7d] [encoding=texnansi]
-\definefontsynonym [SerifBold] [ftb] [encoding=texnansi]
-\definefontsynonym [SerifItalic] [ptmri7d] [encoding=texnansi]
-\definefontsynonym [SerifSlanted] [ptmro9t] [encoding=texnansi]
-\definefontsynonym [SerifBoldItalic] [ftbi] [encoding=texnansi]
-\definefontsynonym [SerifBoldSlanted] [ftbi] [encoding=texnansi]
-\definefontsynonym [SerifCaps] [ptmrc9t] [encoding=texnansi]
-
-\definefontsynonym [Sans] [ftl] [encoding=texnansi]
-\definefontsynonym [SansBold] [ftb] [encoding=texnansi]
-\definefontsynonym [SansItalic] [ftli] [encoding=texnansi]
-\definefontsynonym [SansSlanted] [ftli] [encoding=texnansi]
-\definefontsynonym [SansBoldItalic] [ftbi] [encoding=texnansi]
-\definefontsynonym [SansBoldSlanted] [ftbi] [encoding=texnansi]
-\definefontsynonym [SansCaps] [ftr] [encoding=texnansi]
-
-\definefontsynonym [BigSerif] [ptmr7t] [encoding=texnansi]
-\definefontsynonym [BigSerifSlanted] [ptmro7t] [encoding=texnansi]
-
-\stopnotmode
-
-\startmode[localfonts]
-
-\definefontsynonym [BigSerif] [Serif]
-\definefontsynonym [BigSerifSlanted] [SerifSlanted]
-
-\stopmode
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm]
- [tf=Serif sa 1.06,
- bf=SerifBold sa 1,
- it=SerifItalic sa 1.06,
- sl=SerifSlanted sa 1.06,
- bi=SerifBoldItalic sa 1,
- bs=SerifBoldSlanted sa 1,
- sc=SerifCaps sa 1.06]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt] [rm]
- [tfa=BigSerif sa 1.200,
- tfb=BigSerif sa 1.440,
- tfc=BigSerif sa 1.728,
- tfd=BigSerif sa 2.074,
- bfa=SerifBold sa 1.200,
- bfb=SerifBold sa 1.440,
- bfc=SerifBold sa 1.728,
- bfd=SerifBold sa 2.074,
- sla=BigSerifSlanted sa 1.200,
- slb=BigSerifSlanted sa 1.440,
- slc=BigSerifSlanted sa 1.728,
- sld=BigSerifSlanted sa 2.074,
- bsa=SerifBoldSlanted sa 1.200,
- bsb=SerifBoldSlanted sa 1.440,
- bsc=SerifBoldSlanted sa 1.728,
- bsd=SerifBoldSlanted sa 2.074,
- bia=SerifBoldItalic sa 1.200,
- bib=SerifBoldItalic sa 1.440,
- bic=SerifBoldItalic sa 1.728,
- bid=SerifBoldItalic sa 2.074]
-
-\definebodyfont [22pt,17pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [ss]
- [tf=Sans sa 1,
- bf=SansBold sa 1,
- it=SansItalic sa 1,
- sl=SansSlanted sa 1,
- bs=SansBoldSlanted sa 1,
- bi=SansBoldSlanted sa 1,
- sc=SansCaps sa .8,
- tfa=Sans sa 1.200,
- tfb=Sans sa 1.440,
- tfc=Sans sa 1.728,
- tfd=Sans sa 2.074,
- bfa=SansBold sa 1.200,
- bfb=SansBold sa 1.440,
- bfc=SansBold sa 1.728,
- bfd=SansBold sa 2.074,
- bsa=SansBoldSlanted sa 1.200,
- bsb=SansBoldSlanted sa 1.440,
- bsc=SansBoldSlanted sa 1.728,
- bsd=SansBoldSlanted sa 2.074]
-
-\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt]
- [ tf=Mono sa 1,
- sl=MonoSlanted sa 1,
- bf=MonoBold sa 1,
- bs=MonoBoldSlanted sa 1,
- bi=MonoBoldSlanted sa 1,
- tfa=Mono sa 1.200,
- tfb=Mono sa 1.440,
- tfc=Mono sa 1.728,
- tfd=Mono sa 2.074,
- sla=MonoSlanted sa 1.200,
- slb=MonoSlanted sa 1.440,
- slc=MonoSlanted sa 1.728,
- sld=MonoSlanted sa 2.074]
-
-%D The Courier font does not contain \TEX's visual space. The
-%D next definition offers an alternative.
-
-\def\controlspace%
- {\hbox{\font\next=cmtt10 at \bodyfontsize\next\char32}}
-
-\endinput
diff --git a/tex/context/base/s-map-10.tex b/tex/context/base/s-map-10.tex
new file mode 100644
index 000000000..800eb5c15
--- /dev/null
+++ b/tex/context/base/s-map-10.tex
@@ -0,0 +1,476 @@
+%\module [
+% file=s-map-se,
+% version=2005.02.03,
+% title=\CONTEXT\ Style File,
+% subtitle=\MAPS\ basis stijl,
+% author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg},
+% date=\currentdate,
+% copyright={NTG / MAPS}%
+%]
+
+% This module re-implements the MAPS style for use with the Context
+% macro package. The original MAPS layout was designed and
+% implemented in LaTeX by Taco Hoekwater and Siep Kroonenberg.
+
+% This style will be cleaned up as soon as we have time for it.
+
+% - three layouts:
+% 1. two columns
+% 2. one column, with wide outer margins (option onecolumn)
+% 3. one column, with wide left margin (option asym)
+% - font sizes deviate from TeX's usual geometric progression
+% - use of sans-serif for headers and various details
+% - option realfonts uses Bitstream Charter, Euler Math and Latin Modern.
+% This is used for final typesetting.
+% The default font setup, intended for authors, uses Computer
+% Modern.
+
+% A mode nosubsub defines only two levels of sectioning. If you
+% don't need more and use the two-column layout, then this option
+% will probably improve the looks of your paper.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% pdftex support
+
+\newif\ifMapsInColumns
+\doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn
+\doifnotmode{onecolumn}{\MapsInColumnstrue}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% fonts
+
+%%%%%%%%% first, font sizes
+\definebodyfontenvironment [7pt][% LaTeX: scriptsize
+ interlinespace=8pt,
+ big=8pt,
+ small=6pt%
+]
+
+\definebodyfontenvironment [8pt][% LaTeX: footnotesize
+ interlinespace=9pt,
+ big=9pt,
+ small=7pt,
+ x=6pt%
+]
+
+\definebodyfontenvironment [9pt][% LaTeX: small
+ interlinespace=10pt,
+ big=10pt,
+ small=7pt,%
+ x=7pt,%
+ script=7pt%
+]
+
+\definebodyfontenvironment [10pt][% LaTeX: normalsize
+ interlinespace=11pt,
+ big=11pt,
+ small=9pt,%
+ x=8pt,%
+ script=7pt%
+]
+
+\definebodyfontenvironment [11pt][% LaTeX: large
+ interlinespace=11pt,
+ big=11pt,
+ small=10pt,%
+ x=9pt,%
+ script=8pt%
+]
+
+\definebodyfontenvironment [14pt][%
+ interlinespace=14pt,
+ big=24pt,
+ small=11pt,
+ x=10pt%
+]
+
+\definebodyfontenvironment [24pt][%
+ interlinespace=24pt,
+ big=24pt,
+ small=14pt,
+ x=11pt%
+]
+
+%%% font families
+
+\starttypescript [map] [texnansi]
+
+ \definetypeface[map][ss][sans] [map] [default][encoding=\typescripttwo]
+ \definetypeface[map][rm][serif][charter] [default][encoding=\typescripttwo,rscale=0.95]
+ \definetypeface[map][tt][mono] [modern] [default][encoding=\typescripttwo]
+ \definetypeface[map][mm][math] [euler] [default][encoding=\typescripttwo]
+
+ \usemathcollection[eul]
+
+\stoptypescript
+
+% activate protruding
+\setupinterlinespace[line=11pt]
+
+\setupfontsynonym[handling=pure]
+
+\setupalign[hanging]
+
+\usetypescript[map][texnansi]
+
+\setupbodyfont [map,10pt]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% additional general typographic details
+
+\setupindenting [yes,next,11pt] % indenting after enumerations etc.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% 3 versions of layout with matching headers
+
+% I would like to move the entire layout slightly toward the spine,
+% but Context seems to provide no good handle for that.
+% So instead, I'll use a two-column layout centered on the page and
+% matching single-column layouts.
+
+% It is easy to do the shift toward the spine when assembling the
+% volume with LaTeX pdfpages.
+
+\definepapersize [maps][%
+ width=595.3bp, % 21cm
+ height=756bp% 10.5in
+]
+
+\setuppapersize [maps][maps]
+
+% parameters:
+% margin -> latex marginparwith
+
+\setuplayout[%
+ topspace=40pt,
+ height=692pt,
+ header=33pt,
+ margin=106pt,
+ leftmargindistance=11pt,
+ rightmargindistance=11pt%
+]
+
+
+\setupblank[5.5pt]
+
+\setuppagenumbering [location=]
+
+\definetyping [widetyping]
+
+\setupheader [style=\ss]
+\setupfooter [style=\ss]
+
+\def\AuHead{%
+ %\ifnum\pageno=\MapsPage \hbox{}\else
+ \MapsRunningAuthor%\fi
+}
+\def\TiHead{%
+ \ifnum\pageno=\MapsPage \relax \MapsRunningAuthor %\hbox{}
+ \else \MapsRunningTitle\fi}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% sectioning
+
+\setupheads[sectionnumber=no, align=right]
+
+\def\hfonti{\bfa}
+\def\hfontii{\bf}
+\def\hfontiii{\rm\bi}
+\def\runin#1#2{#2.}
+
+\doifmodeelse{nosubsub}{%
+\setuphead [section][%
+ style=\hfontii,
+ before={\blank[halfline]},
+ after={}%
+]
+\setuphead [subsection][%
+ style=\hfontiii,
+ command=\runin,
+ alternative=text,
+ before={\blank[halfline]}%
+]}{%
+\setuphead [section][%
+ style=\hfonti,
+ before={\blank[13pt]},
+ after={\blank[6pt]}%
+]
+\setuphead [subsection][%
+ style=\hfontii,
+ before={\blank[6pt]},
+ after={}%
+]
+\setuphead [subsubsection][%
+ style=\hfontiii,
+ command=\runin,
+ alternative=text,
+ before={\blank[halfline]}%
+]}
+
+\doifmodeelse{nosubsub}{%
+\setuphead [subject][%
+ style=\hfontii,
+ before={\blank[halfline]},
+ after={}%
+]
+\setuphead [subsubject][%
+ style=\hfontiii,
+ command=\runin,
+ alternative=text,
+ before={\blank[halfline]}%
+]}{%
+\setuphead [subject][%
+ style=\hfonti,
+ before={\blank},
+ after={\blank[halfline]}%
+]
+\setuphead [subsubject][%
+ style=\hfontii,
+ before={\blank[halfline]},
+ after={}%
+]
+\setuphead [subsubsubject][%
+ style=\hfontiii,
+ command=\runin,
+ alternative=text,
+ before={\blank[halfline]}%
+]}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% floats
+
+\setupfloats [location=left, before={\ss}]
+\setupcaptions [style={\ss},
+ stopper=.,
+ inbetween={\blank[halfline]}]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% various document elements
+
+%\startnotmode[realfonts]
+\def\ChkBox{%
+ \hbox {\boxrulewidth=.4pt \raise.2ex\ruledvbox
+ {\phantom{\vrule width .85ex height .85ex%
+}}}}
+%\stopnotmode
+%\startmode[realfonts]
+%\def\ChkBox{\raise.12ex\hbox{\ws \char50}}
+%\stopmode
+\definesymbol [1][\ChkBox]
+
+\setupitemize[1][packed]
+
+\setupitemize [each][%
+ indentnext=no,
+ align=right,
+ width=1em,
+ distance=0pt%
+]
+
+% an outer form of itemize that does not indent
+% the paragraph.
+
+\definecomplexorsimpleempty\startouteritemize
+\def\complexstartouteritemize[#1]{\begingroup
+ \startitemize[width=1sp,#1]
+ \let\doitem\item
+ \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}%
+}
+
+\def\stopouteritemize{\stopitemize\endgroup}
+
+
+\setupenumerations [indentnext=no]
+
+\setupdescriptions [indentnext=no]
+
+\unexpanded\def\smalltyping{%
+ \switchtobodyfont[tt,9pt]%
+ \setuplocalinterlinespace[line=11pt]%
+ \parindent=0pt
+}
+
+% typing:
+% - prettyverbatim is NOT the default
+% - smaller size
+
+\setuptyping [%
+ style={\smalltyping},
+ option=none,
+ indentnext=no%
+]
+
+\def\footnum#1{#1.}
+
+\setupfootnotes
+ [location=none,
+ width=\textwidth,
+ bodyfont=9pt,
+ before=,
+ numbercommand=\footnum]
+
+\setupfootnotedefinition
+ [location=serried,
+ before=,
+ after=,
+ distance=0.5em]
+
+\setuptabulate
+ [before=\blank,
+ inner=\ss,
+ after=\blank]
+
+\def\startIntroEntry#1%
+ {\blank[line]
+ \startbaselinecorrection
+ \bgroup
+ \setupalign[right]
+ \setuptolerance[verytolerant]
+ \setupindenting[no]
+ \switchtobodyfont[9pt]%
+ \hyphenpenalty10000
+ \parfillskip 0pt plus 1fill
+ \rightskip6pt plus 1fill
+ \ss
+ \bgroup\bf #1\par\egroup
+ \ignorespaces }
+
+\def\stopIntroEntry
+ {\par\egroup \stopbaselinecorrection}
+
+\def\defineIntroEntry[#1][#2][#3]%
+ {\setvalue{start#1}{\startIntroEntry{#2}}%
+ \setvalue {stop#1}{\stopIntroEntry#3}}
+
+\defineIntroEntry[Keywords][Keywords][]
+\defineIntroEntry[Abstract][Abstract][]
+
+% article parameters (other fields and defaults)
+\def\MapsBibData[#1]%
+ {\getparameters [Maps]
+ [SubTitle=,
+ RunningAuthor=,
+ RunningTitle=,
+ Email=,
+ Address=,
+ Page=1,
+ Title=No Title given,
+ Author=No Author given,
+ Period=,
+ Number=99,
+ Year=2006,
+ #1]%
+ \doifnothing\MapsRunningAuthor
+ {\global\let\MapsRunningAuthor\MapsAuthor}%
+ \doifnothing\MapsRunningTitle
+ {\global\let\MapsRunningTitle\MapsTitle}}%
+
+\def\dostartArticle[#1]{%
+ \MapsBibData[#1]
+ \pageno=\MapsPage
+ \count0=\MapsPage
+ \setuppagenumber[number=\MapsPage]
+ \bgroup
+ \hsize = 457pt
+ \let\\\crlf
+ \blank[29pt,force]
+ \switchtobodyfont[rm,24pt]
+ \setupalign[right]
+ {\bf\noindent\MapsTitle\par\blank[6pt]}
+ \ifx\MapsSubTitle\empty \else
+ { \switchtobodyfont[ss,24pt]\sl\noindent
+ \advance \rightskip 0pt plus 2em
+ \MapsSubTitle\par}
+ \fi
+ \blank[30pt]
+ \egroup
+ \switchtobodyfont[rm,10pt]
+ \setupalign[width]
+ \ifMapsInColumns
+ \startcolumns\hyphenpenalty1000
+ \else
+ \clubpenalty10000
+ \widowpenalty10000
+ \fi
+}
+
+\definecolumnset[mapsset][n=2,grid=on]
+
+\def\startArticle{\dosingleempty\dostartArticle}
+
+\def\stopArticle{%
+ {\blank\let\\\crlf
+ \noindent\switchtobodyfont[ss,9pt]%
+ \MapsAuthor
+ \doifsomething{\MapsAddress}{\\\MapsAddress}%
+ \doifsomething{\MapsEmail}{\\\MapsEmail}}%
+ \ifMapsInColumns \stopcolumns \fi
+ \page
+}
+
+\installpagebreakhandler{last}{}
+
+%%% `logos' %%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\LATEX{La\TeX}
+\def\LaTeX{La\TeX}
+\def\TEX{\TeX}
+\def\CONTEXT{Con{\TeX}t}
+\def\ConTeXt{Con{\TeX}t}
+\def\METAFONT{Metafont}
+\def\METAPOST{MetaPost}
+\def\POSTSCRIPT{PostScript}
+
+
+%%%%%%%%%%%
+
+\doifmodeelse{onecolumn}{%
+ \setuplayout[width=340pt]
+ \doifmodeelse{asym}{% one col, asymmetric
+ \setuplayout[backspace=187.3pt]%
+ \setuptyping [widetyping][oddmargin=-117pt]
+ \setuppagenumbering [alternative={singlesided,doublesided}]
+ \setupheadertexts
+ [{\hbox{}\hskip-117pt\TiHead}]
+ [{{\tfx\MapsPeriod~}\MapsYear\quad\bf\pagenumber\hskip-30pt\hbox{}}]
+ [{\hbox{}\hskip-147pt{\bf\pagenumber}\quad {\tfx MAPS~}\MapsNumber}]
+ [\AuHead]
+ \setupfootertexts
+ }{% one col, symmetric
+ \setuplayout[backspace=70.3pt]
+ \setuppagenumbering [alternative=doublesided]
+ \setuptyping[blank=halfline]
+ \setupheadertexts
+ [\TiHead]
+ [{{\tfx\MapsPeriod~}\MapsYear\quad\bf\pagenumber\hskip-147pt\hbox{}}]
+ [{\hbox{}\hskip-147pt{\bf\pagenumber}\quad {\tfx MAPS~}\MapsNumber}]
+ [\AuHead]
+ \setupfootertexts
+}}{% two col
+ \setuplayout[width=457pt]
+ \setupcolumns[n=2,tolerance=verytolerant,distance=11pt]
+ \setuplayout[backspace=70.3pt,grid=yes]
+ \setuppagenumbering [alternative=doublesided]
+ \setuptyping[blank=halfline]
+ \setupheadertexts
+ [\TiHead]
+ [{{\tfx\MapsPeriod~}\MapsYear\quad\bf\pagenumber\hskip-30pt\hbox{}}]
+ [{\hbox{}\hskip-30pt{\bf\pagenumber}\quad {\tfx MAPS~}\MapsNumber}]
+ [\AuHead]
+ \setupfootertexts
+}
+
+%\MapsBibData
+% []
+
+%\abovedisplayskip = 12pt
+%\abovedisplayshortskip = 6pt
+
+\newdimen\iabovedisplayskip
+\newdimen\iabovedisplayshortskip
+%\let\abovedisplayskip\iabovedisplayskip
+%\let\abovedisplayshortskip\iabovedisplayshortskip
+
+%\protect
+\endinput
diff --git a/tex/context/base/s-ptj-01.tex b/tex/context/base/s-ptj-01.tex
new file mode 100644
index 000000000..98ec3ae03
--- /dev/null
+++ b/tex/context/base/s-ptj-01.tex
@@ -0,0 +1,445 @@
+%D \module
+%D [ file=s-ptj-01,
+%D version=2006.11.14,
+%D title=\CONTEXT\ Style File,
+%D subtitle=PracTeX Journal Style,
+%D author=Aditya Mahajan,
+%D email=adityam at umich dot edu,
+%D date=\currentdate,
+%D copyright=2006 Aditya Mahajan]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+%C
+%C This work may be distributed and|/|or modified under the
+%C conditions of the \LATEX\ Project Public License, either version~1.3
+%C of this license or (at your option) any later version.
+%C The latest version of this license is in
+%C \hyphenatedurl{http://www.latex-project.org/lppl.txt}
+%C and version~1.3 or later is part of all distributions of \LATEX\
+%C version~2005/12/01 or later.
+%C
+%C This work has the LPPL maintenance status \quote{maintained}.
+%C
+%C The Current Maintainer of this work is Aditya Mahajan.
+%C
+%C The Base Interpreter for this work is any \CONTEXT||formal.
+%C
+%C This work consists of the file \filename{t-pracjourn.tex}.
+
+%M % These macros are needed to compile the documentation.
+%M \def\PracTeX{Prac\kern-0.07em\TeX}
+%M \def\PRACTEX{\PracTeX}
+%M \def\TPJ {The \PRACTEX\ Journal}
+%M \useurl[TPJ][http://www.tug.org/pracjourn/][][\TPJ]
+
+\writestatus {loading} {Context Module for the PracTeX Journal}
+
+%D This module is for producing acticles for \from[TPJ]. It merely copies the
+%D layout of the the \LATEX\ class \filename{pracjourn.cls} available from
+%D \TPJ\ website (\url[TPJ]). A sample document is given at the end of this
+%D file. The typeset sample can be obtained by
+%D \starttyping
+%D texexec --mode=demo s-pracjourn.tex
+%D \stoptyping
+%D The documentation is written as comments. If you want to see a \PDF\ copy
+%D \starttyping
+%D texexec --module s-pracjourn.tex
+%D \stoptyping
+
+\startmodule[pracjourn]
+
+\unprotect
+
+%D First let's setup the paper size and layout for \TPJ. I am actually not
+%D sure about the \quote{official} layout requirement for \TPJ\ and have
+%D reverse engineered the layout from the typeset \LATEX\ examples. If you
+%D feel that anything is wrong here, please let me know.
+
+\setuppapersize
+ [letter][letter]
+
+\setuplayout
+ [ width=middle,
+ height=middle,
+ location=middle,
+ topspace=1.25in,
+ bottomspace=1in,
+ backspace=1in,
+ cutspace=1in,
+ leftmargin=0.25in,
+ rightmargin=0.25in,
+ leftmargindistance=0in,
+ rightmargindistance=0in,
+ header=1in,
+ footer=.5in,
+ headerdistace=0in,
+ footerdistance=.25in,
+ ]
+
+
+%D Next we do the font setup. \TPJ\ uses mathpazo for roman and math faces and
+%D uses latin modern for sans serif and monotype. For the main face, 12pt is
+%D used with a 15.5pt baseline skip. Font protrusion is enabled, but font
+%D expansion is not. We follow these conventions, but use
+%D Pagella fonts from \TEX{gyre} project, and scale latin modern fonts by
+%D 1.1 for better matching. Most of the numbers (page numbers, figure numbers,
+%D section numbers) are set in oldstyle.
+
+\usetypescript [serif,sans,mono] [hanging] [pure]
+\setupalign [hanging]
+
+\usetypescriptfile
+ [type-gyr]
+
+\definetypeface
+ [mainface] [rm] [serif] [palatino] [default] [encoding=texnansi]
+\definetypeface
+ [mainface] [ss] [sans] [modern] [default] [encoding=texnansi, rscale=1.1]
+\definetypeface
+ [mainface] [tt] [mono] [modern] [default] [encoding=texnansi, rscale=1.1]
+\definetypeface
+ [mainface] [mm] [math] [palatino] [default] [encoding=texnansi]
+
+\setupbodyfont
+ [mainface,12pt]
+
+\definefont [titlefont] [Regular at 20pt]
+\definefont [authorfont] [Regular at 14pt]
+
+\setupbodyfontenvironment
+ [12pt]
+ [interlinespace=15.5pt,em=italic]
+
+\setupbodyfontenvironment
+ [11pt]
+ [interlinespace=13.6pt,em=italic]
+
+%D The variables for the article are stored in the \mono{pracjourn} namespace.
+%D To initialize these variables use
+%D \starttyping
+%D \setvariables
+%D [pracjourn]
+%D [ title=Tile of the Article,
+%D author=Name of Author,
+%D address=Write your Address,
+%D revision={d=14,m=11,y=2006},
+%D copyright=Whatever you want,
+%D ]
+%D \stoptyping
+%D \mono{title} and \mono{author} should always be entered (even though this
+%D module does not make them mandatory, it makes little sense to have an
+%D article without a title or author. Other variables are optional. If a
+%D revision is not written, current date will be used to show the revision.
+%D Other variables for the article are the author's email address and website
+%D url. Due to catcode problems, it is not always possible to reliably enter
+%D these using the variable mechanism. To enter these use \type|\useURL|
+%D \starttyping
+%D \useURL[email][mailto:address@whatever.com][][address@whatever.com]
+%D \useURL[website][link to your homepage]
+%D \stoptyping
+%D If either of these \URL's are not present, they will be silently ignored
+%D while generating the title.
+
+\setvariables [pracjourn] [ title=]
+\setvariables [pracjourn] [ author=]
+\setvariables [pracjourn] [ address=]
+\setvariables [pracjourn] [copyright=]
+\setvariables [pracjourn] [ revision=]
+
+%D We use the buffer \filename{abstract} for the abstract. So to enter the
+%D abstract, write
+%D \starttyping
+%D \startbuffer[abstract]
+%D Write your abstract
+%D \stopbuffer
+%D \stoptyping
+%D Right now, there is no mechanism to inhibt abstracts. In case someone
+%D requires it, such a mechanism is easy to implement.
+
+\startbuffer[abstract]
+\stopbuffer
+
+%D The actual title with the additional information is typset by calling
+%D \starttyping
+%D \setups{title}
+%D \stoptyping
+%D Remember that the \type|\setvariables[pracjourn][...]| step must be done
+%D before \type|\setups{title}|.
+
+\setuphead
+ [title]
+ [style=\titlefont,
+ after={\blank[big]}]
+
+%D Next we define internal frames to take care of the layout of the extra
+%D material in the title. These start with \type|do...| to prevent clash with
+%D user macros. (I do not like writing @ in macro names).
+
+\defineframed
+ [doinfotitle]
+ [ frame=off,
+ strut=yes,
+ width=0.1\textwidth,
+ height=fit,
+ align=left,
+ location=hanging,
+ ]
+
+\defineframed
+ [doinfodetails]
+ [ frame=off,
+ strut=yes,
+ width=0.85\textwidth,
+ height=fit,
+ align=normal,
+ location=hanging,
+ ]
+
+\newif\iftitleskipdone
+
+\def\doadditionalinfo#1#2
+ {\titleskipdonetrue
+ \hbox to \textwidth
+ \bgroup
+ \hfill \doinfotitle{#1}
+ \hfill \doinfodetails{#2}
+ \egroup\endgraf}
+
+%D Now we take care of the actual layout of the title. Most of this is
+%D heuristic, as I was trying to get the same visual effect as the
+%D \filename{pracjourn.cls} class. If something does not match, please let me
+%D know. The additional information is typeset as
+%D \starttyping
+%D \hfill <box of .1\textwidth> \hfill <box of .85\textwidth>
+%D \stoptyping
+%D at 11pt size. We also add the title and author information in the \PDF\
+%D metadata.
+
+\startrawsetups [title]
+% Place the tile and the author
+ \title{\getvariable{pracjourn}{title}}
+ \blank[medium]
+ \bgroup\authorfont\setupinterlinespace
+ \getvariable{pracjourn}{author} \endgraf\egroup
+ \blank[2*big]
+% Place the additional information
+ \bgroup\switchtobodyfont[11pt]
+ \setupindenting[no]
+ \doifdefined{\v!file:::email}
+ {\doadditionalinfo{Email}{\tttf\from[email]\relax}}
+ \doifdefined{\v!file:::website}
+ {\doadditionalinfo{Website}{\from[website]\relax}}
+ \doifsomething{\getvariable{pracjourn}{address}}
+ {\doadditionalinfo{Address}{\getvariable{pracjourn}{address}}}
+ \iftitleskipdone \blank[big] \fi
+ \doadditionalinfo{Abstract}%
+ {\setupindenting[yes]
+ \setupinterlinespace
+ \getbuffer[abstract]
+ \endgraf}
+ \egroup
+ \blank[big]
+% If revision number is present, write it to \filename{_rev.tex}
+% FIXME: Do we need to ensure that the dates and month are two digits?
+ \doifsomething{\getvariable{pracjourn}{revision}}
+ {\expanded{\setvariables[pracjourn:date][y=,m=,d=,\getvariable{pracjourn}{revision}]}
+ \immediate\openout \scratchwrite _rev.tex
+ \immediate\write \scratchwrite
+ {\getvariable{pracjourn:date}{y}/\getvariable{pracjourn:date}{m}/\getvariable{pracjourn:date}{d}}
+ \immediate\closeout\scratchwrite}
+% Add information to pdfmetadata
+ \setupinteraction
+ [title={\getvariable{pracjourn}{title}},
+ author={\getvariable{pracjourn}{author}},
+ subtitle={The PracTeX Journal Article}]
+\stoprawsetups
+
+%D Next we setup the header and footer for the first page. \TPJ\ formats the
+%D header as
+%D \startlines
+%D The PracTeX Journal, year, No. number
+%D Article revision year/mm/dd
+%D \stoplines
+%D If a copyright notice is present, it is printed right aligned on the bottom
+%D of first page. Otherwise the footer on the first page is empty.
+
+\startlocalsetups [titleheader]
+ \framed[frame=off,width=\textwidth,align=normal,location=low]
+ {\small\setupinterlinespace
+ \doifelsenothing{\TPJissue}{For submission to \TPJ}{\TPJissue}\endgraf
+ \doifelsenothing{\getvariable{pracjourn}{revision}}
+ {Draft of \currentdate[year,/,mm,/,dd]}
+ {Article revision\space
+ \expanded{\date[\getvariable{pracjourn}{revision}][year,/,mm,/,dd]}}
+ \endgraf}
+\stoplocalsetups
+
+\startlocalsetups [titlefooter]
+ \framed[frame=off,width=\textwidth,align=flushright,location=low]
+ {\small\setupinterlinespace
+ \getvariable{pracjourn}{copyright}\endgraf}
+\stoplocalsetups
+
+\definetext [titleheader] [header] [\setups{titleheader}][]
+\definetext [titlefooter] [footer] [\setups{titlefooter}]
+\setuphead [title] [header=titleheader,footer=titlefooter]
+
+%D For rest of the pages, page number is printed on the middle of the footer.
+
+\setuppagenumbering [location={footer,middle}, style=mediaeval]
+
+%D Next we setup the formating for the sections. \TPJ\ wants font sizes of
+%D 17pt, 14pt, and 12pt respectively for section, subsection, and
+%D subsubsection. By default, \tex{tfa} is 1.2, \tex{tfb} is 1.4, so the sizes
+%D come out close to what is required. The section number is typset in
+%D oldstyle fonts.
+
+\setuphead
+ [section,subject]
+ [ style=\tfb,
+ numberstyle=mediaeval,
+ before={\blank[2*big]},
+ after={\blank[big]},
+ ]
+
+\setuphead
+ [subsection,subsubject]
+ [ style=\tfa,
+ numberstyle=mediaeval,
+ before={\blank[big]},
+ after={\blank[medium]},
+ ]
+
+\setuphead
+ [subsubsection,subsubsubject]
+ [ style=\tf,
+ numberstyle=mediaeval,
+ before={\blank[medium]},
+ after={\blank},
+ ]
+
+%D Now we setup the captions. The captions head are set in normal font, and
+%D the caption number is set in oldstlyle.
+
+\setupcaptions [headstyle=normal,stopper=:,conversion=mediaeval]
+
+%D Footnotes are placed in a box with a width of 1.5em. The footnote numeral
+%D are set in oldstyle font.
+
+\setupnote
+ [footnote]
+ [margindistance=0em,
+ conversion=mediaeval,
+ command=\pracjournfootnote,
+ ]
+
+\setupnotedefinition [footnote] [location=left,hang=1]
+
+\def\pracjournfootnote#1{\hbox to 1.5em{#1.}}
+
+%D \TPJ\ uses dash as the first level of itemize and text period as the second
+%D level. The third level is left unspecified.
+
+\definesymbol [1] [{\symbol[dash]}]
+\definesymbol [2] [\periodcentered]
+
+\setupitemize [each] [packed]
+\setupitemize [1] [packed,autointro] [margin=1em]
+
+%D We change \type|\type| so that the argument inside \type|\type| is pretty
+%D printed using \TEX's patterns. Another command \type|\normaltype| can be
+%D used if you do not want the original \type|\type|.
+
+\setuptype [option=TEX]
+\definetype [normaltype] [option=none]
+
+%D We enable colors, interaction and bookmarks.
+
+\setupinteraction [state=start,color=darkred,style=normal]
+\setupurl [color=darkred]
+\setupcolors [state=start]
+\placebookmarks [section,subsection] [section]
+
+%D We setup medium indenting, whitespace and blanks.
+
+\setupindenting [medium,yes]
+\setupwhitespace [medium]
+\setupblank [medium]
+
+%D We define logos for \PRACTEX\ and \TPJ. These can be accessed by
+%D \type|\PracTeX|, \type|\PRACTEX| and \type|\TPJ|.
+
+\def\PracTeX{Prac\kern-0.07em\TeX}
+\def\PRACTEX{\PracTeX}
+\def\TPJ {The \PRACTEX\ Journal}
+
+%D \filename{pracjourn.cls} provides two macros \type|\ctanfile| and
+%D \type|\ctanloc|. I am not sure what is the advantage of these macors. If
+%D you want to use these macros, you can use the \type|\useURL| mechanism of
+%D \CONTEXT. For example
+%D \starttyping
+%D \useURL[pracjourn][http://ctan.org/get?fn=/macros/contrib/latex/pracjourn][][\mono{CTAN:macros/contrib/latex/pracjourn}]
+%D The \LATEX\ style files for \TPJ\ is localed at \from[pracjourn]
+%D \stoptyping
+
+%D For the final version of the paper, the string \quotation{The PracTeX
+%D Journal year, No x} is written on the header. This only happens when the
+%D current directory contains a file \filename{_iss.tex} which contains string
+%D like \quotation{TPJ 2006 No 04, 2006-11-15}. This step is usually taken in
+%D the final production of the article. If this file is absent, \quotation{For
+%D submission to the PracTeX Journal} is written instead. The next macros are
+%D used to parse this file.
+
+\let\TPJissue\empty
+
+\def\parse@iss TPJ #1 No #2, #3-#4-#5\@nil%
+ {\!!counta#2\relax
+ \edef\TPJissue{\TPJ, #1, No.\,\the\!!counta}}
+
+%D Read the \filename{_iss.tex} file, if present to determine the current
+%D issue.
+
+\immediate\openin\scratchread _iss.tex
+\ifeof\scratchread\else
+ \read \scratchread to \!!stringa
+ \expandafter\parse@iss\!!stringa\@nil
+\fi
+\immediate\closein\scratchread
+
+\protect
+\stopmodule
+
+\doifnotmode{demo}{\endinput}
+
+\usemodule[pracjourn]
+
+\setvariables
+ [pracjourn]
+ [ title=\PRACTEX\ Article in \CONTEXT,
+ author=Aditya Mahajan,
+ address={Ann Arbor,\\ Michigan, USA.},
+ revision={y=2006,m=11,d=14},
+ copyright={Copyright \copyright\ 2006 Aditya Mahajan.}
+ ]
+
+\useURL[website][http://www.eecs.umich.edu/~adityam]
+\useURL[email][mailto:adityam@umich.edu][][adityam@umich.edu]
+
+%D If any of the above information is not provided, the corresponding entry
+%D will not apprear in the title.
+
+\startbuffer[abstract]
+Write abstract here
+\stopbuffer
+
+\starttext \setups[title]
+
+\section{Introduction}
+
+Write your article \unknown
+
+\stoptext
+
+\endinput
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index 2ff97c876..e91d53373 100644
--- a/tex/context/interface/keys-cz.xml
+++ b/tex/context/interface/keys-cz.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="jedna"/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index fb1e35eaf..e17db3f37 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="eins"/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index f515dffa8..ebba9e5e7 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="one"/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index 0c332407a..f2ecd90ae 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="un"/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 6091fe8ee..d221d91fa 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="uno"/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 7f238cdf6..82380fd1a 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="een"/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 80a061a17..6c817d52d 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2006.11.17 19:52">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2006.11.20 09:49">
<cd:variables>
<cd:variable name="one" value="unu"/>