summaryrefslogtreecommitdiff
path: root/Master/tlpkg/texworks/texworks-help/TeXworks-manual/en/Firststeps.html
blob: 2f2d8eddd177cf937ee5c2b027495c07e9949093 (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
  "http://www.w3.org/TR/html4/loose.dtd">  
<html > 
<head><title>3 First steps</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)"> 
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)"> 
<!-- info,2,imgdir:images/,sec-filename,next,index=2,url-enc,html --> 
<meta name="src" content="index.tex"> 
<link rel="stylesheet" type="text/css" href="index.css"> 
</head><body 
>
<!--l. 5--><p class="noindent" ><div id="container"> <!--l. 5--><div class="crosslinks"><p class="noindent">[<a 
href="GoingfurtherEditingtools.html" >next</a>] [<a 
href="Installation.html" >prev</a>] [<a 
href="Installation.html#tailInstallation.html" >prev-tail</a>] [<a 
href="#tailFirststeps.html">tail</a>] [<a 
href="index.html#Firststeps.html" >up</a>] </p></div>
<!--l. 5--><p class="indent" >   <div class="chapternumber">3</div><h1><a 
 id="x10-90003"></a>First steps</h1>
<!--l. 8--><p class="indent" >   Let&#8217;s now see how to create a first document: for this
you&#8217;ll need to type some text in the editor window of T<sub>E</sub>Xworks. (L<sup>A</sup>)T<sub>E</sub>X is <em>not</em>
WYSIWYG<a 
 id="dx10-9001"></a><span class="footnote-mark"><a 
href="index11.html#fn1x4"><sup class="textsuperscript">1</sup></a></span><a 
 id="x10-9002f1"></a>
software, so you&#8217;ll have to type the text and the instructions for formatting it
and you&#8217;ll see the result only after &#8220;typesetting&#8221; the text. This looks a
little bit dry, but one very quickly gets used to it and it is well worth the
effort.
   <h3 class="sectionHead"><span class="titlemark">3.1   </span> <a 
 id="x10-100003.1"></a>Interface summary</h3>
<a 
 id="dx10-10001"></a>
<!--l. 15--><p class="noindent" >When one opens the editor, it shows a very sparse interface: a title bar, a menu
bar, two small toolbars<a 
 id="dx10-10002"></a>, a large typing zone (white) and, at the bottom, a status
bar. We are in the <em>source/editor<a 
 id="dx10-10003"></a></em> window. If you have already typeset the
document previously, the resulting <span class="path">.pdf</span> will be shown on the right hand side in
the <em>preview</em><a 
 id="dx10-10004"></a> window.
   <div class="wrapfig-l"> <img 
src="images/toolbar1.png" alt="pict"  
>                 </div>
<!--l. 24--><p class="noindent" >The first toolbar has a button to typeset and an drop-down menu to choose the
format for typesetting (we&#8217;ll choose <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">pdfLaTeX</span></span></span>). Knowing that the keyboard
shortcut for typesetting is <span class="keystroke">Ctrl</span><span class="keystroke">T</span> (Mac OS X: <span class="keystroke"> <img 
src="images/MacCmdKey.png" alt="pict"  
></span><span class="keystroke">T</span>) and that we almost never
change the format, we could even hide this toolbar. The selection of a
format for compiling can also be changed through the <em><b>Typeset</b></em><a 
 id="dx10-10005"></a> menu.
   <div class="wrapfig-l"> <img 
src="images/toolbar2.png" alt="pict"  
>                                   </div>
<!--l. 34--><p class="noindent" >The second toolbar provides the standard functions: New document, Open, Save |
Undo, Redo | Cut, Copy, Paste | Search, Replace.
<div class="center" 
>
<!--l. 36--><p class="noindent" >
<!--l. 37--><p class="noindent" > <img 
src="images/interface-summary.png" alt="pict"  
></div>
                                                                          

                                                                          
<!--l. 40--><p class="indent" >   Even though they are not looking like real buttons, the widgets in the status
bar can be clicked. The widgets showing the current position (line or page,
respectively), for example, open a dialog to enter a line or page to jump to when
clicked. The other widgets typically open contextual menus where some settings
can be changed.
<!--l. 42--><p class="noindent" >
   <h3 class="sectionHead"><span class="titlemark">3.2   </span> <a 
 id="x10-110003.2"></a>Creating a document</h3>
<!--l. 44--><p class="noindent" >
   <h4 class="subsectionHead"><span class="titlemark">3.2.1   </span> <a 
 id="x10-120003.2.1"></a>Writing the document</h4>
<!--l. 46--><p class="noindent" >As an example of the use of T<sub>E</sub>Xworks, we will work with L<sup>A</sup>T<sub>E</sub>X<a 
 id="dx10-12001"></a>, but any other T<sub>E</sub>X
system is possible. In particular, if you need to use some special
fonts<span class="footnote-mark"><a 
href="index12.html#fn2x4"><sup class="textsuperscript">2</sup></a></span><a 
 id="x10-12002f2"></a>&#8212;a
mandatory font for an official template, non-Latin alphabets, etc.&#8212;the X<sub>E</sub>T<sub>E</sub>X system is very
powerful.<span class="footnote-mark"><a 
href="index13.html#fn3x4"><sup class="textsuperscript">3</sup></a></span><a 
 id="x10-12003f3"></a>
<!--l. 48--><p class="indent" >   Let&#8217;s create our first document<a 
 id="dx10-12004"></a> now. Enter the following text exactly as shown.
To show some of the features of T<sub>E</sub>Xworks/L<sup>A</sup>T<sub>E</sub>X, it is in French intentionally.
<!--l. 50--><p class="indent" >   <div class="example">
   <div class="fancyvrb" id="fancyvrb2"><a 
 id="x10-12006r1"></a><span 
class="ec-lmtt-10x-x-109">\documentclass{article}</span><br class="fancyvrb" /><a 
 id="x10-12008r2"></a><br class="fancyvrb" /><a 
 id="x10-12010r3"></a><span 
class="ec-lmtt-10x-x-109">\usepackage[utf8]{inputenc}</span><br class="fancyvrb" /><a 
 id="x10-12012r4"></a><span 
class="ec-lmtt-10x-x-109">\usepackage[T1]{fontenc}</span>
<br class="fancyvrb" /><a 
 id="x10-12014r5"></a><span 
class="ec-lmtt-10x-x-109">\usepackage{geometry}</span><br class="fancyvrb" /><a 
 id="x10-12016r6"></a><span 
class="ec-lmtt-10x-x-109">\geometry{a4paper}</span><br class="fancyvrb" /><a 
 id="x10-12018r7"></a><br class="fancyvrb" /><a 
 id="x10-12020r8"></a><span 
class="ec-lmtt-10x-x-109">\usepackage[frenchb]{babel}</span><br class="fancyvrb" /><a 
 id="x10-12022r9"></a>
<br class="fancyvrb" /><a 
 id="x10-12024r10"></a><span 
class="ec-lmtt-10x-x-109">\title{Premier</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;document}</span><br class="fancyvrb" /><a 
 id="x10-12026r11"></a><span 
class="ec-lmtt-10x-x-109">\author{Un</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;TeXnicien}</span><br class="fancyvrb" /><a 
 id="x10-12028r12"></a><span 
class="ec-lmtt-10x-x-109">\date{}</span><br class="fancyvrb" /><a 
 id="x10-12030r13"></a><br class="fancyvrb" /><a 
 id="x10-12032r14"></a><span 
class="ec-lmtt-10x-x-109">\begin{document}</span>
<br class="fancyvrb" /><a 
 id="x10-12034r15"></a><span 
class="ec-lmtt-10x-x-109">\maketitle</span><br class="fancyvrb" /><a 
 id="x10-12036r16"></a><br class="fancyvrb" /><a 
 id="x10-12038r17"></a><span 
class="ec-lmtt-10x-x-109">Voici</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;un</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;texte</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;accentu</span><span 
class="ec-lmtt-10x-x-109">é</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;en</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;fran</span><span 
class="ec-lmtt-10x-x-109">çais!</span><br class="fancyvrb" /><a 
 id="x10-12040r18"></a><br class="fancyvrb" /><a 
 id="x10-12042r19"></a><span 
class="ec-lmtt-10x-x-109">\end{document}</span></div>
                                                                          

                                                                          
   </div>
<!--l. 72--><p class="indent" >   Save the file in a folder for test documents (e.g., <span class="path">&#x003C;home&#x003E;\TeXworks_tests</span>);
call the file <span class="path">first.tex</span>. Note that it should have a <span class="path">.tex</span> extension<a 
 id="dx10-12043"></a>.
   <h4 class="subsectionHead"><span class="titlemark">3.2.2   </span> <a 
 id="x10-130003.2.2"></a>Typesetting the document and viewing it</h4>
<!--l. 76--><p class="noindent" >Next we start typesetting<a 
 id="dx10-13001"></a><span class="footnote-mark"><a 
href="index14.html#fn4x4"><sup class="textsuperscript">4</sup></a></span><a 
 id="x10-13002f4"></a>
by clicking the green button  <img 
src="images/iconTypeset.png" alt="pict"  
> or by <span class="keystroke">Ctrl</span><span class="keystroke">T</span><a 
 id="dx10-13003"></a> (Mac OS X: <span class="keystroke"> <img 
src="images/MacCmdKey.png" alt="pict"  
></span><span class="keystroke">T</span>).
<!--l. 79--><p class="indent" >   A new panel opens between the typing area and the status bar:
the <em>output panel<a 
 id="dx10-13004"></a></em>, labeled <em>Log<a 
 id="dx10-13005"></a></em>; everything L<sup>A</sup>T<sub>E</sub>X is doing is displayed
there<span class="footnote-mark"><a 
href="index15.html#fn5x4"><sup class="textsuperscript">5</sup></a></span><a 
 id="x10-13006f5"></a>.
When L<sup>A</sup>T<sub>E</sub>X finishes this panel disappears (if there no error occurred) and a new
window will appear; in this new window, the <em>Preview window<a 
 id="dx10-13007"></a></em><a 
 id="dx10-13008"></a>, you can see a page
with a title &#8220;Premier document&#8221; followed by the name of the author &#8220;Un
TeXnicien&#8221;, both centred, the text &#8220;Voici un texte accentué en français!&#8221;, and a
page number at the bottom centre.
<!--l. 82--><p class="indent" >   Notice that the mouse cursor is like a magnifier in the new window. If you
press (and hold) the left button of the mouse you can see the text under the
magnifier much bigger (it is a magnifier, isn&#8217;t it!); you can move the magnifier and
so inspect the text in detail.
<!--l. 84--><p class="indent" >   To go back to the source, you can just click in its window or better use <span class="keystroke">Ctrl</span><span class="keystroke">&#8217;</span><a 
 id="dx10-13009"></a>
(Mac OS X <span class="keystroke"> <img 
src="images/MacCmdKey.png" alt="pict"  
></span><span class="keystroke">&#8217;</span>). This shortcut toggles between the two windows. See also
section <a 
href="GoingfurtherOthertools.html#x30-310005.1">5.1<!--tex4ht:ref: sec.synctex --></a> to automatically move to a specific location in the output from the
source or vice versa.
   <h4 class="subsectionHead"><span class="titlemark">3.2.3   </span> <a 
 id="x10-140003.2.3"></a>The work of L<sup>A</sup>T<sub>E</sub>X</h4>
<!--l. 88--><p class="noindent" >Let&#8217;s shortly analyse the result to understand what L<sup>A</sup>T<sub>E</sub>X did and why, now.
Introductions and full tutorials can be found on the internet: see for example
                                                                          

                                                                          
<em>lshort</em><span class="footnote-mark"><a 
href="index16.html#fn6x4"><sup class="textsuperscript">6</sup></a></span><a 
 id="x10-14001f6"></a>
which should be installed as part of your T<sub>E</sub>X distribution, and is also available from
CTAN<a 
 id="dx10-14002"></a>.<span class="footnote-mark"><a 
href="index17.html#fn7x4"><sup class="textsuperscript">7</sup></a></span><a 
 id="x10-14003f7"></a>
<!--l. 90--><p class="indent" >   First, we ask to create a document of the <em>article</em> class: this defines the global
layout of the document.
<!--l. 92--><p class="indent" >   Next, we say that the input document (the source) is saved with the
Unicode encoding <em>utf-8<a 
 id="dx10-14004"></a><a 
 id="dx10-14005"></a></em> and that it may contain characters which are
not present in the standard ASCII without accents. We also want to use
an output encoding T1 (the modern T<sub>E</sub>X encoding); we also want an <em>A4</em>
document and not the default <em>US letter</em> size. Finally, we make it clear
that the typography should follow the French rules using the <b><span class="sansserif">babel</span></b>
package.<span class="footnote-mark"><a 
href="index18.html#fn8x4"><sup class="textsuperscript">8</sup></a></span><a 
 id="x10-14006f8"></a>
Those general instructions for the work are done by packages<a 
 id="dx10-14007"></a> called with
options.
<!--l. 94--><p class="indent" >   Lastly, we finish the declaration part of the document, the <em>preamble</em><a 
 id="dx10-14008"></a>, giving
the title, the author, and the date of the document; here we specify no
date.
<!--l. 96--><p class="indent" >   Next comes the body of the document, which describes the actual content,
between the lines <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\begin{document}</span></span></span> and <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\end{document}</span></span></span> (these are L<sup>A</sup>T<sub>E</sub>X
commands).
<!--l. 98--><p class="indent" >   Let&#8217;s do some experiments to show the effect of these instructions.
For this, we put a % in front of the instructions; the % and everything
after it will be considered as comment<a 
 id="dx10-14009"></a>, which will be ignored by
                                                                          

                                                                          
L<sup>A</sup>T<sub>E</sub>X.<span class="footnote-mark"><a 
href="index19.html#fn9x4"><sup class="textsuperscript">9</sup></a></span><a 
 id="x10-14010f9"></a>
<!--l. 100--><p class="indent" >   Comment out the line <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\usepackage[utf8]{inputenc}</span></span></span>, and typeset the file.
You should see that the accented characters are now displayed incorrectly
in the preview window. If, in addition, you also comment out the line
<span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\usepackage[frenchb]{babel}</span></span></span>, L<sup>A</sup>T<sub>E</sub>X will give an error. Just hit <span class="keystroke"><img 
src="images/index2x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>to continue the
typesetting.
<!--l. 105--><p class="indent" >   After these experiments, let&#8217;s modify the text as follows: <div class="example">
   <div class="fancyvrb" id="fancyvrb3"><a 
 id="x10-14012r1"></a><span 
class="ec-lmtt-10x-x-109">\begin{document}</span><br class="fancyvrb" /><a 
 id="x10-14014r2"></a><span 
class="ec-lmtt-10x-x-109">\maketitle</span><br class="fancyvrb" /><a 
 id="x10-14016r3"></a><span 
class="ec-lmtt-10x-x-109">\tableofcontents</span><br class="fancyvrb" /><a 
 id="x10-14018r4"></a>
<br class="fancyvrb" /><a 
 id="x10-14020r5"></a><span 
class="ec-lmtt-10x-x-109">\section{Petite</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;d</span><span 
class="ec-lmtt-10x-x-109">émonstration}</span><br class="fancyvrb" /><a 
 id="x10-14022r6"></a><br class="fancyvrb" /><a 
 id="x10-14024r7"></a><span 
class="ec-lmtt-10x-x-109">Voici</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;un</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;texte</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;accentu</span><span 
class="ec-lmtt-10x-x-109">é</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;en</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;fran</span><span 
class="ec-lmtt-10x-x-109">çais!</span>
<br class="fancyvrb" /><a 
 id="x10-14026r8"></a><span 
class="ec-lmtt-10x-x-109">Suite</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;du</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;texte</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;entr</span><span 
class="ec-lmtt-10x-x-109">é</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;apr</span><span 
class="ec-lmtt-10x-x-109">ès</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;avoir</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;fait</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;un</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;retour</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;chariot.</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;Dans</span>
<br class="fancyvrb" /><a 
 id="x10-14028r9"></a><span 
class="ec-lmtt-10x-x-109">l</span><span 
class="ts1-lmtt10-x-x-109">'</span><span 
class="ec-lmtt-10x-x-109">éditeur</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;on</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;peut</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;demander</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;un</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;passage</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;automatique</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">à</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;la</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;ligne</span>
<br class="fancyvrb" /><a 
 id="x10-14030r10"></a><span 
class="ec-lmtt-10x-x-109">du</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;texte</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;saisi;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;mais</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;le</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;num</span><span 
class="ec-lmtt-10x-x-109">éro</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;de</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;ligne</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;n</span><span 
class="ts1-lmtt10-x-x-109">'</span><span 
class="ec-lmtt-10x-x-109">est</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;incr</span><span 
class="ec-lmtt-10x-x-109">ément</span><span 
class="ec-lmtt-10x-x-109">é</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;que</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;par</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;un</span>
<br class="fancyvrb" /><a 
 id="x10-14032r11"></a><span 
class="ec-lmtt-10x-x-109">retour</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;chariot.</span><br class="fancyvrb" /><a 
 id="x10-14034r12"></a><br class="fancyvrb" /><a 
 id="x10-14036r13"></a><span 
class="ec-lmtt-10x-x-109">Nouvelle</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;ligne</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;en</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;passant</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;une</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;ligne</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;dans</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;la</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;source:</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;c</span><span 
class="ts1-lmtt10-x-x-109">'</span><span 
class="ec-lmtt-10x-x-109">est</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;la</span>
<br class="fancyvrb" /><a 
 id="x10-14038r14"></a><span 
class="ec-lmtt-10x-x-109">mani</span><span 
class="ec-lmtt-10x-x-109">ère</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;d</span><span 
class="ts1-lmtt10-x-x-109">'</span><span 
class="ec-lmtt-10x-x-109">indiquer</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;un</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;changement</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;de</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;paragraphe.</span><br class="fancyvrb" /><a 
 id="x10-14040r15"></a><br class="fancyvrb" /><a 
 id="x10-14042r16"></a><span 
class="ec-lmtt-10x-x-109">\end{document}</span></div>
   </div>
Redo the previous experiments and observe the changes which appear.
<!--l. 126--><p class="indent" >   Note that entering only one carriage return doesn&#8217;t create a new paragraph. In
L<sup>A</sup>T<sub>E</sub>X, one has to have an empty line for that. In T<sub>E</sub>Xworks, the line number of the source (on the
right in the status bar) numbers the lines created with carriage return, not the
wrapped lines.
   <h3 class="sectionHead"><span class="titlemark">3.3   </span> <a 
 id="x10-150003.3"></a>And when errors occur?</h3>
<a 
 id="dx10-15001"></a>
<!--l. 130--><p class="noindent" >When you create a document for typesetting with L<sup>A</sup>T<sub>E</sub>X, you cannot avoid making
mistakes: forgetting a closing brace or an <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\end{}</span></span></span> to close an environment, using
mathematical commands without switching to mathematical mode, etc. When you
compile and there is an error, L<sup>A</sup>T<sub>E</sub>X stops, giving you a chance to deal with the
problem. This is shown by the stopping of the scrolling action in the output panel,
and an error message being displayed, with L<sup>A</sup>T<sub>E</sub>X waiting for an instruction to know
what it should do.
<div class="center" 
>
                                                                          

                                                                          
<!--l. 132--><p class="noindent" >
<!--l. 133--><p class="noindent" > <img 
src="images/consoleOutput.png" alt="pict"  
></div>
<!--l. 136--><p class="indent" >   One sees the <em>typing cursor<a 
 id="dx10-15002"></a></em> in the line between the output panel and the status
bar: the <em>console bar<a 
 id="dx10-15003"></a></em>.
<!--l. 138--><p class="indent" >   The error message is on many lines, for example like this:

<!--l. 141--><p class="indent" >
   <div class="fancyvrb" id="fancyvrb4"><a 
 id="x10-15005r1"></a><span 
class="ec-lmtt-10x-x-109">!</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;Undefined</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;control</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;sequence.</span><br class="fancyvrb" /><a 
 id="x10-15007r2"></a><span 
class="ec-lmtt-10x-x-109">l.168</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;...</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;fermante</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;ou</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;d</span><span 
class="ts1-lmtt10-x-x-109">'</span><span 
class="ec-lmtt-10x-x-109">une</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;commande</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;\veb</span>
<br class="fancyvrb" /><a 
 id="x10-15009r3"></a><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;+\end{}+</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;de</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;fermeture</span><span 
class="ec-lmtt-10x-x-109">&#x00A0;d</span><span 
class="ts1-lmtt10-x-x-109">'</span><span 
class="ec-lmtt-10x-x-109">un...</span><br class="fancyvrb" /><a 
 id="x10-15011r4"></a><span 
class="ec-lmtt-10x-x-109">?</span></div>
<!--l. 148--><p class="indent" >   L<sup>A</sup>T<sub>E</sub>X says that it doesn&#8217;t recognize the command name, sometimes suggests to see the
manual or to type <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">h</span></span></span> (plus <span class="keystroke"><img 
src="images/index3x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>) for help, points to the line number where it noticed
the error<span class="footnote-mark"><a 
href="index20.html#fn10x4"><sup class="textsuperscript">10</sup></a></span><a 
 id="x10-15012f10"></a>
(here 168), and shows the place of the error at the cut of the line (here at <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\veb</span></span></span>).
Finally, it shows that it waits for an action from us by displaying a single question
mark.
<!--l. 150--><p class="indent" >   There are different possible actions:
      <ul class="itemize1">
      <li class="itemize">Type <span class="keystroke"><img 
src="images/index4x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>and ask to continue as if nothing happened; sometimes this
      allows to finish compiling, but there will be an error in the result.
      </li>
      <li class="itemize">Type <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">h</span></span></span><span class="keystroke"><img 
src="images/index5x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>to ask for help; this help is not always clearer than the error
      message, but often gives a clue.
      </li>
      <li class="itemize">Type <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">i</span></span></span><span class="keystroke"><img 
src="images/index6x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>to tell L<sup>A</sup>T<sub>E</sub>X that we will propose a replacement text. Enter the
      text followed by <span class="keystroke"><img 
src="images/index7x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>; it will be used, beginning at the start of the error,
      but you should correct the source afterwards as L<sup>A</sup>T<sub>E</sub>X never changes that.
      </li>
      <li class="itemize">Type <span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">x</span></span></span><span class="keystroke"><img 
src="images/index8x.png" alt="&#x2190;'"  class="hookleftarrow" ></span>to stop compilation. This is the traditional (L<sup>A</sup>)T<sub>E</sub>X way to kill a
      typesetting process.
                                                                          

                                                                          
      <!--l. 157--><p class="noindent" >We can also kill the typesetting by repeating the action used to start
      it: the green typesetting button will have changed to a red one with a
      white cross  <img 
src="images/iconAbortTypesetting.png" alt="pict"  
>. By clicking on that button or by hitting <span class="keystroke">Ctrl</span><span class="keystroke">T</span> (Mac
      OS X: <span class="keystroke"> <img 
src="images/MacCmdKey.png" alt="pict"  
></span><span class="keystroke">T</span>) again, the L<sup>A</sup>T<sub>E</sub>X process is terminated. The output panel is
      still visible and so one can still see the error message.</li></ul>
<!--l. 161--><p class="indent" >   You should note that sometimes an error appears far from its actual
position. For example, when opening an environment but not closing it, L<sup>A</sup>T<sub>E</sub>X
doesn&#8217;t see the error before it encounters another end of environment
without closing of the first one. The error is often only picked up at the
<span class="obeylines-h"><span class="verb"><span 
class="ec-lmtt-12">\end{document}</span></span></span> command, which shows that another environment was not
closed!
<!--l. 163--><p class="indent" >   Sometimes, an error still occurs during subsequent runs of (L<sup>A</sup>)T<sub>E</sub>X even after it was
corrected in the document. This can happen because (L<sup>A</sup>)T<sub>E</sub>X creates a number of
intermediary files which can still contain the original, erroneous code. Therefore, it
is advisable to remove those files after fixing an error. T<sub>E</sub>Xworks provides a command to
facilitate this&#8212;see section <a 
href="GoingfurtherOthertools.html#x30-360005.6">5.6<!--tex4ht:ref: sec:remove-aux-files --></a>.
<!--l. 165--><p class="indent" >   After an error occurred, the output panel remains open&#8212;even after
consecutive typesetting runs&#8212;to help you fix the problem (which can sometimes
take several attempts and restarts of (L<sup>A</sup>)T<sub>E</sub>X). Once all problems are solved, you can
close the panel by the <em><b>Windows</b></em><span 
class="lmsy-10x-x-120">&#x2192;</span><em><b>Hide Output Panel</b></em><a 
 id="dx10-15013"></a> menu item. As an
alternative, you can also configure to output panel to hide automatically
as soon as the typesetting process finishes successfully by setting <em><b>Edit</b></em>
<span 
class="lmsy-10x-x-120">&#x2192;</span><em><b>Preferences&#x2026;</b></em><span 
class="lmsy-10x-x-120">&#x2192;</span><em><b>Typesetting</b></em><span 
class="lmsy-10x-x-120">&#x2192;</span><em><b>Hide output panel</b></em> to <em>On success</em>. Since one can
easily overlook other problems in the document (e.g., undefined references)
that do not cause (L<sup>A</sup>)T<sub>E</sub>X to fail, this option is only recommended to expert
users.
<!--l. 167--><p class="indent" >   To help you in finding and fixing error (at least if you are using L<sup>A</sup>T<sub>E</sub>X), T<sub>E</sub>Xworks comes with
a small script that extracts all errors, warnings, and other noteworthy messages
from the console output and presents them to you in a simple, tabular
form.
<div class="center" 
>
<!--l. 169--><p class="noindent" >
<!--l. 170--><p class="noindent" > <img 
src="images/errorParsingScript.png" alt="pict"  
></div>
<!--l. 173--><p class="indent" >   Here, you see a list of L<sup>A</sup>T<sub>E</sub>X messages, color-coded and sorted by severity. Red
represents errors, yellow indicates warnings, and blue stands for over- and
underfull box warnings. Next to the colour bar, you see the name of the file in
which the error was detected. Next to that, you see the line number (if the script
was able to determine that), as well as an excerpt from the console output telling
                                                                          

                                                                          
you what the error was. Moreover, the filename is a link which will take you to the
file (and, if a line number could be determined, also the line) where L<sup>A</sup>T<sub>E</sub>X reported
the error. Hopefully, you can quickly fix any errors that may occur this
way.
<!--l. 175--><p class="indent" >   In case you are not using L<sup>A</sup>T<sub>E</sub>X, this script may be of little use, particularly if the
console output is formatted differently. In this case, you can simply disable the
error parsing hook script (see section <a 
href="AdvanceduseScripting.html#x34-400006.2">6.2<!--tex4ht:ref: sec:installing-scripts --></a>).
   <h3 class="sectionHead"><span class="titlemark">3.4   </span> <a 
 id="x10-160003.4"></a>Changing T<sub>E</sub>Xworks parameters for convenience</h3>
<a 
 id="dx10-16001"></a>
<!--l. 180--><p class="noindent" >If the default font<a 
 id="dx10-16002"></a> of the editor doesn&#8217;t suit you, it is possible to change it
from <em><b>Format</b></em><span 
class="lmsy-10x-x-120">&#x2192;</span><em><b>Font&#x2026;</b></em> by selecting a new one in the dialogue box which
appears. This change will apply only to the current window, and until T<sub>E</sub>Xworks is
restarted.
<!--l. 182--><p class="indent" >   From the <em><b>Typeset</b></em> menu or from the drop-down on the <em><b>Typesetting tool bar</b></em>,
you can change the compilation format. Again this change will only be temporary
and for the current document.
<!--l. 184--><p class="indent" >   To have permanent changes, you need to change the <em>preferences<a 
 id="dx10-16003"></a></em> through the
<em><b>Edit</b></em><span 
class="lmsy-10x-x-120">&#x2192;</span><em><b>Preferences&#x2026;</b></em> menu item, using the <em><b>Editor</b></em> tab for the font and the
<em><b>Typesetting</b></em> tab for the compilation format: the default format is at the bottom of
the tab.
                                                                          

                                                                          
                                                                          

                                                                          
                                                                          

                                                                          
   <!--l. 5--><div class="crosslinks"><p class="noindent">[<a 
href="GoingfurtherEditingtools.html" >next</a>] [<a 
href="Installation.html" >prev</a>] [<a 
href="Installation.html#tailInstallation.html" >prev-tail</a>] [<a 
href="Firststeps.html" >front</a>] [<a 
href="index.html#Firststeps.html" >up</a>] </p></div>
<!--l. 5--><p class="indent" >   <a 
 id="tailFirststeps.html"></a>  </div> 
</body></html>