summaryrefslogtreecommitdiff
path: root/tex/context/base/export-example.tex
blob: 32cb79c5ea2409689b83f480eec9a148b64b98dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
% language=uk

\usemodule[abr-01]

\setupexport
  [%bodyfont=16pt,
   width=650pt,
   %align=flushleft,
   hyphen=yes]

\setupbackend
  [export=yes]

% \setupalign
%   [flushleft]

\settaggedmetadata
  [title=Export Example,
   author=Hans Hagen,
   version=0.1]

\setupbodyfont
  [dejavu]

\setupinteraction
  [state=start]

\setuplayout
  [width=middle]

\setupwhitespace
  [big]

\definedescription
  [description]

\enabledirectives[export.css.hyphens=yes]
\enabledirectives[export.css.textwidth=100em]

\definehighlight[interesting][style=bold,color=red]

\starttext

\startchapter[title=Example]

\startparagraph \input zapf (Zapf) \stopparagraph

\startparagraph
    Watching a \interesting {movie} after reading a review on \goto{my favourite movie
    reviews site}[url(http://outlawvern.com/)] is much more fun. \footnote {Just a note.}
\stopparagraph

\placefigure
  {}
  {\startcombination[3*1]
     {\externalfigure[hacker.jpg][width=3cm]} {first}
     {\externalfigure[hacker.jpg][width=4cm]} {second}
     {\externalfigure[hacker.jpg][width=2cm]} {third}
   \stopcombination}

\startparagraph \input zapf (Zapf) \stopparagraph

\placefigure
  {}
  {\externalfigure[mill.png]}

\startparagraph \input tufte (Tufte) \stopparagraph

\placefigure
  {}
  {\externalfigure[cow.pdf]}

\startparagraph \input tufte (Tufte) \stopparagraph

\startitemize[1]
    \startitem \input ward (Ward) \stopitem
    \startitem \input knuth (Knuth) \stopitem
\stopitemize

\startitemize[2,packed]
    \startitem \input zapf (Zapf) \stopitem
    \startitem \input tufte (Tufte) \stopitem
\stopitemize

\startparagraph \input zapf (Zapf) \stopparagraph

\startdescription {Ward} \input ward \stopdescription

\startdescription {Tufte} \input tufte \stopdescription

\startparagraph \input knuth (Knuth) \stopparagraph

\startformula
e = mc^2
\stopformula

\startparagraph
Okay, it's somewhat boring to always use the same formula, so how about
$\sqrt{4} = 2$ or travelling at \unit{120 km/h} instead of $\unit{110 km/h}$.
\stopparagraph

\bTABLE
\bTR \bTD test \eTD \bTD test \eTD \eTR
\bTR \bTD[nx=2] test \eTD \eTR
\eTABLE

\starttabulate[|l|r|p|]
\NC left \NC right \NC \input ward \NC \NR
\NC l    \NC r     \NC \input ward \NC \NR
\stoptabulate

It looks like we're using \CONTEXT\ to produce some kind of \XML\ output.

\typefile{export-example.tex}

\stopchapter

\stoptext