diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-01-24 10:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-01-24 10:00:00 +0100 |
commit | 1b64f6bc515ace3fb763a3c3b8110007e44119af (patch) | |
tree | fa0097d1e58463a8241edcc4b9968e4871c9d711 /tex/context/base/x-xml-02.mkii | |
parent | d51b0199635ee8f6047164a466a8d556c68186a0 (diff) | |
download | context-1b64f6bc515ace3fb763a3c3b8110007e44119af.tar.gz |
beta 2011.01.24 10:00
Diffstat (limited to 'tex/context/base/x-xml-02.mkii')
-rw-r--r-- | tex/context/base/x-xml-02.mkii | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/tex/context/base/x-xml-02.mkii b/tex/context/base/x-xml-02.mkii new file mode 100644 index 000000000..24f811c4d --- /dev/null +++ b/tex/context/base/x-xml-02.mkii @@ -0,0 +1,91 @@ +%D \module +%D [ file=x-xml-02, +%D version=2001.10.10, +%D title=\CONTEXT\ XML Style File, +%D subtitle=Pretty Printing, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% texexec --use=xml-pretty yourfile.x** [--mode=letter] + +\doifnothing {\inputfilename} {\end} +\doiffileelse {\inputfilename} {} {\end} + +\startmode[letter] + \setuppapersize[letter][letter] +\stopmode + +\setuplayout + [backspace=1.5cm, + topspace=1.5cm, + bottomspace=1cm, + width=middle, + height=middle, + header=1.5cm, + footer=1.5cm] + +\setupcolors + [state=local] + +\setuppagenumbering + [location=] + +\setuplayout + [style=type] + +\setupbodyfont + [10pt,tt] + +\setuptolerance + [verytolerant] + +\setupalign + [broad,right] + +\lowercasestring\inputfilename \to \lcinputfilename +\defconvertedcommand\lcinputfilename\lcinputfilename % make _ safe + +\setupheadertexts + [\lcinputfilename] + +\setupfootertexts + [\currentdate\space\string| \currenttime\space \string| \pagenumber] + +% let's have a look at the type of content: + +\setupXMLfile + [level=2] + +\startmode[*suffix-xml] + % ok +\stopmode + +\startmode[*suffix-rng] + \showXMLlin[value] +\stopmode + +\startmode[*suffix-rlg] + \showXMLlin + [rl:type,rl:state,rl:name,rl:suffix,rl:label,rl:file,rl:original, + rl:width,rl:height,rl:base,rl:page] +\stopmode + +\startmode[*suffix-exa] + \showXMLlin + [exa:resolve,exa:include] +\stopmode + +\def\XMLbannerprocessor#1{\string<\string ?xml #1\string ?\string>\endgraf} + +\defineXMLprocessor [xml] {\XMLbannerprocessor} + +\starttext + +\showXMLfile{\inputfilename} + +\stoptext |