6
<chapter|TeXmacs overview>
8
<section|Formatting primitives>
10
This is a file which to test most of the TeXmacs constructs. First of all,
11
collossoraspberrycoloredtyrannosaurodinosaure is a very long
12
word.<htab|5mm>You agree?
14
<set|paragraph mode|center>You should!<reset|paragraph mode>
16
Here comes a ``line break''<format|line break>, which does not do anything
17
unless at the end of a line. The ``no <format|no line break>line <format|no
18
line break>break'' symbol prevents from line breaking.<format|new line>The
19
new line symbol really starts a new paragraph, and the<format|next
20
line>``next line'' symbol just inserts a carriage return.
22
The equantion array environment is based on the ``split'' construct:
24
<begin|eqnarray*>a<format|line separator>=<format|line
25
separator>b+c<space|0.6spc>;<format|next line>x<format|line
26
separator>=<format|line separator>y<rsup|2>+z<rsup|2>.<end|eqnarray*>
28
It is possible to insert<space|2cm|0fn|0.5fn>any amount of horizontal
31
vertical white space. It is also possible to
33
<set|paragraph mode|center><move|move|0cm|1cm><reset|paragraph mode>an
34
object or to <table|<resize|resize|extend|-1cm|-1cm|1cm|1cm>|1|1> it.
36
The ``group symbol'' also prevents from line breaking. An empty group may
37
be used to insert some invisible content, e.g.<group|> after a period in an
38
abbreviation (so that less space is inserted).
42
Here is a formula with some of the most basic mathematical operators:
44
<begin|equation*>sin z=<frac|1|x+y>+<sqrt|x>+<sqrt|y|3>+a<rsub|i>+b<rsup|2>\
47
Different types of indices, exponents and primes have been implemented:
49
<begin|equation*>a<rsub|i>+b<rsup|2>+c<rsub|i><rsup|3>+\<rho\><rprime|'''>+\
50
<lprime|`>\<beta\>+<lsub|1><lsup|2>X<rsub|3><rsup|4>.<end|equation*>
52
Here is a formula that demonstrates large delimiters and big operators:
54
<begin|equation*>X=<left|langle><big|sum><rsub|i=1><rsup|\<infty\>><frac|a<\
55
rsub|i>|b<rsub|i>+c<rsub|i>><mid|\|><big|prod><rsub|i=1><rsup|\<infty\>><fr\
56
ac|1|1+\<alpha\>*z<rsup|2<rsup|i>>><right|rangle><end|equation*>
58
Some other handy operators are ``above'' and ``below''
60
<begin|equation*><above|operator|script>+<below|operator|below><end|equatio\
65
<begin|equation*><wide|a|^>+<wide|b|~>+<wide|c|\<bar\>>+<wide|d|\<vect\>>+<\
66
wide|e|\<check\>>+<wide|f|\<breve\>>+<wide|g|\<acute\>>+<wide|h|\<grave\>>+\
67
<wide|<wide|\<imath\>|^>|^>+<wide|\<alpha\>+\<beta\>|^>+<wide|\<gamma\>+\<d\
68
elta\>|~>+<wide|\<varepsilon\>+\<varphi\>|\<bar\>>+<wide|\<zeta\>+\<eta\>|\\
69
<vect\>>+<wide|\<iota\>+\<kappa\>|\<check\>>+<wide|\<mu\>+\<nu\>|\<breve\>>\
72
Some mathematical symbols:
74
<begin|equation*>\<alpha\>\<oplus\>b\<amalg\>c\<precprec\>x\<boxtimes\>y+\<\
75
nabla\>(\<wp\>(x<rsub|1>),\<ldots\>,\<wp\>(x<rsub|n>))+<neg|x>+<neg|y>\<pre\
76
cprec\>S<rsub|a\<rightarrow\>b\<rightsquigarrow\>c><end|equation*>
78
We obtained <set|mode|math><neg|x><reset|mode> using the ``negation''
79
construct. We conclude with a tree
81
<begin|equation*><tree|x|y|<tree|a|b|c|d>|<tree|a|x<rsup|2>|y<rsup|2>>|z|<t\
82
ree|p|<tree|x|y|y>|<tree|y|x|x>>><end|equation*>
84
and some tabular material:
86
<begin|equation*><left|(><matrix|a<rsub|1,1>|\<cdots\>|a<rsub|1,n>|\<vdots\\
87
>||\<vdots\>|a<rsub|n,1>|\<cdots\>|a<rsub|n,n>|3|3><right|)><space|8spc><ta\
88
ble|b<rsub|1,1>|\<cdots\>|b<rsub|1,n>|\<vdots\>||\<vdots\>|b<rsub|n,1>|\<cd\
89
ots\>|b<rsub|n,n>|3|3><space|8spc><mosaic|<mosaic_item|links
90
boven|0w|1|1|none>|<mosaic_item|<set|color|blue>boven<reset|color>|0c|1|1|n\
91
one>|<mosaic_item|rechts boven|0e|1|1|none>|<mosaic_item|links|0w|1|1|none>\
92
|<mosaic_item|<set|color|blue>centrum<reset|color>|0c|1|1|none>|<mosaic_ite\
93
m|rechts|0e|1|1|none>|<mosaic_item|links
94
onder|0w|1|1|none>|<mosaic_item|<set|color|blue>onder<reset|color>|0c|1|1|n\
95
one>|<mosaic_item|rechts onder|0e|1|1|none>|3|3><end|equation*>
97
<section|Dynamic constructs>
99
Some examples of inactive constructs are <inactive|<symbol|symbol>>,
100
<inactive|<hybrid|command>> and <inactive|<plus|1|1>>. Let us show some
101
examples of how such constructs look like when activated:
103
<begin|eqnarray*><inactive|<symbol|alpha>><format|line
104
separator>\<longrightarrow\><format|line separator>\<alpha\><format|next
105
line><inactive|<hybrid|sin>><format|line
106
separator>\<longrightarrow\><format|line separator>sin<format|next
107
line><inactive|<hybrid|x>><format|line separator>\<longrightarrow\><format|\
108
line separator><x><format|next line><inactive|<assign|x|sin
109
y>><inactive|<hybrid|x>><format|line separator>\<longrightarrow\><format|li\
110
ne separator><assign|x|sin y><x><format|next
111
line><inactive|<assign|f|<inactive|<func|a|<a><rsub|1>,\<ldots\>,<a><rsub|n\
112
>>>>><inactive|<f|b>><format|line separator>\<longrightarrow\><format|line
113
separator><assign|f|<func|a|<a><rsub|1>,\<ldots\>,<a><rsub|n>>><f|b><space|\
114
25spc><format|next line><inactive|<plus|1|1>><format|line
115
separator>\<longrightarrow\><format|line separator><plus|1|1><format|next
116
line><inactive|<minus|7|4>><format|line
117
separator>\<longrightarrow\><format|line separator><minus|7|4><format|next
118
line><inactive|<times|3|3>><format|line
119
separator>\<longrightarrow\><format|line separator><times|3|3><format|next
120
line><inactive|<merge|Hi|There>><format|line
121
separator>\<longrightarrow\><format|line
122
separator><merge|Hi|There><format|next line><inactive|<number|1993|Roman>><\
123
format|line separator>\<longrightarrow\><format|line
124
separator><number|1993|Roman><format|next
125
line><inactive|<translate|File|english|french>><format|line
126
separator>\<longrightarrow\><format|line
127
separator><translate|File|english|french><end|eqnarray*>
129
Some examples of environments in the present ``letter'' style are:
131
<begin|itemize><item><set|color|red>First item<reset|color> in red.
133
<item><set|font shape|italic>Second item<reset|font shape> in italic.
135
<item><set|font series|bold>And so on<reset|font series>...<end|itemize>
137
<begin|theorem>The following conditions are equivalent:
139
<begin|enumerate-alpha><item><set|mode|math>P\<Longleftrightarrow\>Q<reset|\
142
<item><set|mode|math>Q\<Longleftrightarrow\>P<reset|mode>.<end|enumerate-al\
145
<end|theorem>A numbered equation with label ``eq'':
147
<begin|equation>a<rsup|2>+b<rsup|2>=c<rsup|2><end|equation><label|eq>
149
A reference to the equation (<reference|eq>).
151
Here comes an active hyperlink to <hlink|http://www.gnu.org|http://www.gnu.\
152
org>. Click <action|here|(display "Hello\\n")> to print hello to the
153
standard output. <specific|texmacs|This text><specific|latex|some funny
154
stuff> is only visible inside TeXmacs and will be translated to ``some
155
funny stuff'' when converted to LaTeX. We conclude with a picture:
157
<set|paragraph mode|center><postscript|../../misc/pixmaps/TeXmacs-solid.xpm\
158
||||||><reset|paragraph mode>
174
<vspace*|1fn><set|font series|<quote|bold>>TeXmacs overview<reset|font
175
series><htab|5mm>?<vspace|0.5fn>
177
Formatting primitives<htab|5mm>?
179
Mathematics<htab|5mm>?
181
Dynamic constructs<htab|5mm>?