diff options
Diffstat (limited to 'tex/context/sample')
-rw-r--r-- | tex/context/sample/demo-mps.tex | 23 | ||||
-rw-r--r-- | tex/context/sample/demo-tex.tex | 23 | ||||
-rw-r--r-- | tex/context/sample/demo-xml.tex | 53 |
3 files changed, 99 insertions, 0 deletions
diff --git a/tex/context/sample/demo-mps.tex b/tex/context/sample/demo-mps.tex new file mode 100644 index 000000000..57bb690c0 --- /dev/null +++ b/tex/context/sample/demo-mps.tex @@ -0,0 +1,23 @@ +% interface=en + +\starttext + +\setupcolors + [state=start] + +\startMPpage + path p ; color c[] ; + p := fullsquare scaled 4cm ; + c[0] := transparent(1,.5,red) ; + c[1] := transparent(1,.5,green) ; + c[2] := transparent(1,.5,blue) ; + for i = 0 upto 2 : + fill p rotated (i*30) withcolor white ; + endfor ; + for i = 0 upto 2 : + fill p rotated (i*30) withcolor c[i] ; + endfor ; + addbackground withcolor transparent(1,.5,cmyk(0,0,1,0)) ; +\stopMPpage + +\stoptext
\ No newline at end of file diff --git a/tex/context/sample/demo-tex.tex b/tex/context/sample/demo-tex.tex new file mode 100644 index 000000000..309a0acfc --- /dev/null +++ b/tex/context/sample/demo-tex.tex @@ -0,0 +1,23 @@ +% interface=en + +\setuppapersize + [S6][S6] + +\setuplayout + [width=middle, + height=middle] + +\setuphead + [chapter] + [header=high, + style=\bfc, + alternative=middle] + +\starttext + +\title{Peter D. Ward} \processfile{ward} +\title{Hermann Zapf} \processfile{zapf} +\title{Bill Bryson} \processfile{bryson} +\title{Edward R. Tufte} \processfile{tufte} + +\stoptext
\ No newline at end of file diff --git a/tex/context/sample/demo-xml.tex b/tex/context/sample/demo-xml.tex new file mode 100644 index 000000000..bf527a747 --- /dev/null +++ b/tex/context/sample/demo-xml.tex @@ -0,0 +1,53 @@ +% interface=en + +\defineXMLargument + [title] [label=] + {\title[\XMLop{label}]} + +\defineXMLenvironment + [itemize] [packed=] + {\doifelseXMLop{packed}{yes} + {\startitemize[packed]} + {\startitemize}} + {\stopitemize} + +\defineXMLenvironment + [item] + {\item} + {\par} + +\defineXMLenvironment + [p] + {\ignorespaces} + {\par} + +\starttext + +\startXMLdata +<title label="example">Just an Example</title> + +<p>There are three items:</p> + +<itemize packed="yes"> + <item>Number One</item> + <item>Number Two</item> + <item>Number Three</item> +</itemize> + +<p>And tree more</p> + +<itemize> + <item>First Line</item> + <item>Second Line</item> + <item>Third Line</item> +</itemize> +\stopXMLdata + +Instead of putting the data in here you can put it in a file, say +\type {sample.xml} and load that file using: + +\starttyping +\processXMLfilegrouped{sample.xml} +\stoptyping + +\stoptext
\ No newline at end of file |