-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathediting.html
1053 lines (1017 loc) · 65.6 KB
/
editing.html
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
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html class="no-js" lang="en" data-content_root="./">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Editing a TeX document" />
<meta property="og:type" content="website" />
<meta property="og:url" content="editing.html" />
<meta property="og:site_name" content="TeXstudio" />
<meta property="og:description" content="Creating a new document: There are two different ways to create a new document that are described in the following subsections: Setting the preamble of a TeX document: To define the preamble of you..." />
<meta name="description" content="Creating a new document: There are two different ways to create a new document that are described in the following subsections: Setting the preamble of a TeX document: To define the preamble of you..." />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Compiling a document" href="compiling.html" /><link rel="prev" title="Getting started" href="getting_started.html" />
<link rel="shortcut icon" href="_static/texstudio.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Editing a TeX document - TeXstudio 4.8.6 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=9701f087" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=4c969af8" />
<link rel="stylesheet" type="text/css" href="_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=e61b947c" />
<style>
body {
--color-code-background: #eeffcc;
--color-code-foreground: black;
}
@media not print {
body[data-theme="dark"] {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
}
}
</style></head>
<body>
<script>
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
</script>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
<symbol id="svg-sun" viewBox="0 0 24 24">
<title>Light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</symbol>
<symbol id="svg-moon" viewBox="0 0 24 24">
<title>Dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
</svg>
</symbol>
<symbol id="svg-sun-half" viewBox="0 0 24 24">
<title>Auto light/dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
<path d="M13 12h5" />
<path d="M13 15h4" />
<path d="M13 18h1" />
<path d="M13 9h4" />
<path d="M13 6h1" />
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation">
<div class="visually-hidden">Hide navigation sidebar</div>
</label>
<label class="overlay toc-overlay" for="__toc">
<div class="visually-hidden">Hide table of contents sidebar</div>
</label>
<div class="page">
<header class="mobile-header">
<div class="header-left">
<label class="nav-overlay-icon" for="__navigation">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">TeXstudio 4.8.6 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-header-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
<span class="sidebar-brand-text">TeXstudio 4.8.6 documentation</span>
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting started</a></li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Editing a TeX document</a></li>
<li class="toctree-l1"><a class="reference internal" href="compiling.html">Compiling a document</a></li>
<li class="toctree-l1"><a class="reference internal" href="viewing.html">Viewing a document (pdf)</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced features</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring TeXstudio</a></li>
<li class="toctree-l1"><a class="reference internal" href="background.html">Background information</a></li>
<li class="toctree-l1"><a class="reference internal" href="CHANGELOG.html">CHANGELOG</a></li>
</ul>
</div>
</div>
</div>
</div>
</aside>
<div class="main">
<div class="content">
<div class="article-container">
<a href="#" class="back-to-top muted-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
</svg>
<span>Back to top</span>
</a>
<div class="content-icon-container">
<div class="theme-toggle-container theme-toggle-content">
<button class="theme-toggle">
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
</button>
</div>
<label class="toc-overlay-icon toc-content-icon" for="__toc">
<div class="visually-hidden">Toggle table of contents sidebar</div>
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
</div>
<article role="main">
<section id="editing-a-tex-document">
<h1>Editing a TeX document<a class="headerlink" href="#editing-a-tex-document" title="Link to this heading">#</a></h1>
<section id="creating-a-new-document">
<h2>Creating a new document<a class="headerlink" href="#creating-a-new-document" title="Link to this heading">#</a></h2>
<p>There are two different ways to create a new document that are described
in the following subsections:</p>
<section id="setting-the-preamble-of-a-tex-document">
<h3>Setting the preamble of a TeX document<a class="headerlink" href="#setting-the-preamble-of-a-tex-document" title="Link to this heading">#</a></h3>
<p>To define the preamble of your document, you can use the “Quick start”
wizard (“Wizard” menu).</p>
<p><img alt="Quick Start" src="_images/quickstartwizard.webp" /></p>
<p>This dialog allows you to set the main features of your document (class,
paper size, encoding…).
Note : You can add other options by clicking the “+” buttons. All your
settings are recorded.</p>
<p>You can also type your own preamble model in the editor : with the
“Copy/paste” or “Save As” commands, you can use it for a new
document.</p>
</section>
<section id="using-templates-to-start-a-new-document">
<h3>Using Templates to start a new document<a class="headerlink" href="#using-templates-to-start-a-new-document" title="Link to this heading">#</a></h3>
<p>For new documents, templates can be used by using the command “File/New
from template”. A dialogue gives a selection of templates.</p>
<p><img alt="Templates" src="_images/template.webp" /></p>
<p>You can either create a new editor document from the template or create
it as file(s) on disk and open these in the editor. The former option is
not available for multi-file templates.</p>
<p>New templates can be created by using the command “File/Make Template”
on an opened document which you like to have has a template. Note that
this dialog currently does not support the full capabilities of the
template system. In particular you cannot supply a preview image or
create a multi-file template with it. You’ll have to do this manually
(s. <a class="reference internal" href="background.html#the-document-template-format"><span class="std std-ref">The template format</span></a> below).</p>
<p>User added templates can be edited or deleted by using the context menu
in the template selection dialogue. Built-in templates can not be
changed.</p>
<p>User templates are saved in the <code class="docutils literal notranslate"><span class="pre">/templates/user/</span></code> subdirectory of the
config directory.</p>
</section>
</section>
<section id="structure-your-document">
<h2>Structure your document<a class="headerlink" href="#structure-your-document" title="Link to this heading">#</a></h2>
<p>To define a new part in your document (part, section, subsection, …)
with TeXstudio, just use this combo box button in the format toolbar of
the main toolbar:</p>
<p><img alt="Sectioning" src="_images/doc3.webp" /></p>
</section>
<section id="browsing-your-document">
<h2>Browsing your document<a class="headerlink" href="#browsing-your-document" title="Link to this heading">#</a></h2>
<section id="the-structure-view">
<h3>The Structure View<a class="headerlink" href="#the-structure-view" title="Link to this heading">#</a></h3>
<p>The “Structure View” (left panel) lets you quickly reach any part of
your document. All you need to do is to click on any item (label,
section…) and you will be taken to the beginning of the corresponding
area in the editor. The mechanism for jumping to a line does not anymore
only consider line numbers but really remembers text lines. Thus adding
and removing lines will not lead to jumps to wrong locations.</p>
<p>A light-blue background shows the present cursor position in the text in the
structure view as well. A greenish background denotes sections which are
in the appendix.</p>
<p><img alt="Structure View" src="_images/structureview.webp" /></p>
<p>The “Structure View” is automatically updated as you type. You can
also use the “Refresh Structure” (menu “Idefix”) command at any
moment.</p>
<p>The structure view shows labels, sections, includes and beamer blocks
and todos.</p>
<p>There are two kind of todos that will be listed a) todos from a
todo-like command, e.g. \todo{} from the package todonotes. b)
todo-comments: This is a comment with a “% TODO” or “%todo”. You can
adapt the regular expression for other comments to be marked as
todo-comment in <em>options/advanced editor/Regular Expression for TODO
comment</em>, e.g “%\s?[A-Z][A-Z_-]+” for any comment starting
with at least two capital letter only comment.</p>
<p>The structure view also offers a context menu which allows one to
copy/cut all text which belongs to a section (including subsection) and
paste it before or after a section. Section can be indented/unindented
which means that the hierarchy level is changed by one, i.e. \section
is changed to \subsection, and all subsections are treated accordingly</p>
</section>
<section id="the-toc-view">
<h3>The TOC View<a class="headerlink" href="#the-toc-view" title="Link to this heading">#</a></h3>
<p>The side panel on the left offers a TOC view. The TOC shows the structure of your
whole document by means of section commands (part, section, subsection,
…). A mouse over shows you, in which file the section actually is.</p>
<p><img alt="TOC View" src="_images/TOC_standard.webp" /></p>
<p>The image shows this: A root file named document.tex that includes the
file named file1.tex. The root file contains the section „Main text”,
while file1.tex contains the subsection „External”. By placing the mouse
pointer over this subsection in the TOC view, you find the file name
file1.tex in the mouse over. This works even if the file is not open
(but the document must be loaded by TeXstudio, s. Automatically load
included files in editor settings). In this case a mouse click on the
subsection in the TOC will open the file for you. Notice the different
shades of color that indicate the sections are in different files. It
can happen, that an included file doesn’t contain any sections. Then the
file name itself appears in the TOC (without file extension):</p>
<p><img alt="TOC View with file" src="_images/TOC_file.webp" /></p>
<p>The mouse over now would show the name of the file that includes
file1.tex (namely document.tex). The indentation shows that the text of
file1.tex is part of the section “Main text”. You may like to choose a
different color in the configuration dialog (s. option Use color in
global TOC in <a class="reference internal" href="configuration.html#configuring-the-advanced-editor-settings-advanced-option"><span class="std std-ref">advanced editor settings</span></a>).</p>
</section>
<section id="using-bookmarks">
<h3>Using Bookmarks<a class="headerlink" href="#using-bookmarks" title="Link to this heading">#</a></h3>
<p>You can use bookmarks in the editor of TeXstudio. This can help keep
text lines in mind and speed up navigation between them. To the left of
the editor’s text area is a bookmark column that displays the bookmark
icons. Here you can open a context menu (s. image below) and select the
bookmark you want to set for a text line. Each of the ten numbered
bookmarks can be used only once (when you set it a second time in the
same editor, then the first one is removed), while the unnamed bookmark
can be used many times. Also you can remove bookmarks with the first
entry in the menu. A faster way setting bookmarks is clicking with the
left mouse button in the bookmark column and TeXstudio will choose a
bookmark or remove an existing one.</p>
<p><img alt="Bookmarks in TeXstudio" src="_images/bookmark1.webp" /></p>
<p>You may choose the Bookmarks view of the left side panel, which shows
the text for each line with a bookmark of all editors. With the ease of
a mouse click you can jump to the text line in the editor. A tooltip
shows the surrounding context of the line (s. left image below). The
lines are ordered in the order you created the bookmarks. A context menu
allows you to change the order of lines or remove bookmarks (s. right
image below).</p>
<p><img alt="Tooltip in view Bookmarks" src="_images/bookmark2.webp" /> <img alt="Context menu in view Bookmarks" src="_images/bookmark3.webp" /></p>
<p>You probably noticed the three buttons (placed in the status line) on
the lower right side of the TeXstudio window, which look like bookmarks
1, 2, and 3 (s. image Bookmarks above). With a click you can jump to the
corresponding bookmark in the current editor. In fact this is a subset
of the actions you can find in the menu Edit/Goto Bookmark shown in the
following image in the middle. This menu also shows you the shortcuts
you can use (you may miss Ctrl+0 at the end of the list, but this
shortcut resets the zoom level of the editor). From the Edit/Go to menu
you can choose entry Line to jump to a line with a given line number.
You may want to use Previous mark or Next mark to find unnamed
bookmarks. For the sake of completeness it should be said that bookmark
is one of several types of markers (s. <a class="reference internal" href="compiling.html#the-log-files"><span class="std std-ref">The log files</span></a>).
You can toggle the bookmark of the line with the text cursor using the
actions from the menu Edit/Toggle Bookmark, which can be seen in the
following image on the right.</p>
<p><img alt="Edit/Go to" src="_images/bookmark4.webp" /> <img alt="Edit/Goto Bookmark" src="_images/bookmark5.webp" /> <img alt="Edit/Toggle Bookmark" src="_images/bookmark6.webp" /></p>
</section>
</section>
<section id="formatting-your-text">
<h2>Formatting your text<a class="headerlink" href="#formatting-your-text" title="Link to this heading">#</a></h2>
<p>You can quickly set the format of a part of your text with the format part of the central toolbar.
More options are available in the “LaTeX” menu. Commonly used formatting commands like <code class="docutils literal notranslate"><span class="pre">\textbf</span></code> are also available as shortcuts, here <code class="docutils literal notranslate"><span class="pre">CTRL+B</span></code>.</p>
<p><img alt="Format Toolbar" src="_images/tb_central_format.webp" /></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A selected text can be directly framed by certain
environments. Example: while clicking on the button “Bold” or pressing <code class="docutils literal notranslate"><span class="pre">CTRL+B</span></code> after
having selected the word “Hello” , you will obtain the code:
<code class="docutils literal notranslate"><span class="pre">\textbf{Hello}</span></code>.</p>
</div>
<section id="capitalisation">
<h3>Capitalisation<a class="headerlink" href="#capitalisation" title="Link to this heading">#</a></h3>
<p>The menu “Edit” -> “Text Operations” contains a few methods for
changing the capitalization of selected text:</p>
<ul class="simple">
<li><p>To Lowercase</p></li>
<li><p>To Uppercase</p></li>
<li><p>To Titlecase (strict)</p></li>
<li><p>To Titlecase (smart)</p></li>
</ul>
<p>Both variants of “To Titlecase” leave small words like a, the, of etc.
in lowercase. Additionally, “To Titlecase (smart)” does not convert
any words containing capital letters, assuming they are acronyms which
require a fixed capitalization (e.g. “TeXstudio”).</p>
</section>
<section id="escaping-reserved-characters">
<h3>Escaping reserved characters<a class="headerlink" href="#escaping-reserved-characters" title="Link to this heading">#</a></h3>
<p>If you have text containing reserved TeX characters and want the text to
appear literally in your document, you have to escape the reserved
characters to prevent LaTeX from interpreting them. The following
functions take care of that (Menu: Idefix or context menu on the editor)</p>
<ul class="simple">
<li><p>Paste to LaTeX: Takes the text from the clipboard and escapes
reserved characters prior to pasting into the editor.</p></li>
<li><p>Convert to LaTeX: Escapes the reserved characters in the current
selection.</p></li>
</ul>
<p>For example: “Less than 10% of computer users know the meaning of
$PATH.” will be converted to “Less than 10\% of computer users know
the meaning of \$PATH.”</p>
</section>
</section>
<section id="inserting-a-list">
<h2>Inserting a list<a class="headerlink" href="#inserting-a-list" title="Link to this heading">#</a></h2>
<p>The usual list environments code can be insert quickly via the
“LaTeX-List” menu. Alternatively you can use the <a class="reference internal" href="#environment-completion">environment completion</a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The shortcut for the \item command is <code class="docutils literal notranslate"><span class="pre">Ctrl+Shift+I</span></code>.</p>
</div>
</section>
<section id="inserting-a-table">
<h2>Inserting a table<a class="headerlink" href="#inserting-a-table" title="Link to this heading">#</a></h2>
<p>With the “Tabular” wizard (“Wizard” menu), the LaTeX code for a
tabular environment can be quickly generated.</p>
<p>The cells can be filled manually. Copy and paste from a spreadsheet program works as well.
The wizard allows some tabular manipulation for border, cell merge and column alignment.
Once the code is generated, it can not be changed again with the wizard.</p>
<p><img alt="Tabular Wizard" src="_images/wizard_tabular.webp" /></p>
<section id="manipulating-tables">
<h3>Manipulating tables<a class="headerlink" href="#manipulating-tables" title="Link to this heading">#</a></h3>
<p>TeXstudio provides some commands to ease handling of tables. The
commands are located at LaTeX → Manipulate Table and in the Table
toolbar. Please be aware that some unexpected results may arise, if the
table constructing commands get too complex. Following commands are
offered:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Function</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><img alt="" src="_images/addRow.svg" /></p></td>
<td><p>Add Row after the current row</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/remRow.svg" /></p></td>
<td><p>removes the table row in which the cursor</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/addCol.svg" /></p></td>
<td><p>add a column in the complete table after current cursor position. If the cursor is positioned at start of line,first column,the column is added as new first column.</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/pasteCol.svg" /></p></td>
<td><p>paste a column in the complete table after current cursor position. If the cursor is positioned at start of line,first column,the column is added as new first column.</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/remCol.svg" /></p></td>
<td><p>remove current column</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/cutCol.svg" /></p></td>
<td><p>remove current column and store in clipboard. Use with <em>paste column</em></p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/alignCols.svg" /></p></td>
<td><p>Aligns the column separators (ampersand) by introducing whitespace. The text in the cells is aligned according to the specification in the table header. This helps reading the table source.</p></td>
</tr>
</tbody>
</table>
</div>
<p>The following functions are only accessible via the “Latex/Table Manipulation” menu.</p>
<ul class="simple">
<li><p>Add/Remove \hline: add/remove <code class="docutils literal notranslate"><span class="pre">\hline</span></code> in all rows following the
current row. If already a command <code class="docutils literal notranslate"><span class="pre">\hline</span></code> is present, no second
command is placed.</p></li>
<li><p>Remodel the table after a template,see <a class="reference internal" href="#using-table-templates">below</a>.</p></li>
</ul>
<p>TeXstudio also allows block cursors. Press <code class="docutils literal notranslate"><span class="pre">Ctrl+Alt</span></code>
and drag the cursor with the mouse. The <a class="reference internal" href="#block-cursor">block cursor</a> works like a set of
normal cursors. You can copy and paste text as usual. Also you can type
in new text, which will be added in every row.
Pressing <code class="docutils literal notranslate"><span class="pre">esc</span></code> or clicking somewhere into the text leaves this mode.</p>
<p><img alt="Block Selection" src="_images/block_selection.webp" /></p>
</section>
<section id="using-table-templates">
<h3>Using table templates<a class="headerlink" href="#using-table-templates" title="Link to this heading">#</a></h3>
<p>TeXstudio offers the possibility to reformat an existing latex table
after a table template.</p>
<p>For example, you have entered following table into txs:</p>
<div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\begin</span><span class="nb">{</span>tabular<span class="nb">}{</span>ll<span class="nb">}</span>
a<span class="nb">&</span>b<span class="k">\\</span>
c<span class="nb">&</span>d<span class="k">\\</span>
<span class="k">\end</span><span class="nb">{</span>tabular<span class="nb">}</span>
</pre></div>
</div>
<p>Place the cursor inside the table and select the menu “Latex/Manipulate
Tables/Remodel Table Using Template”.</p>
<p>Now you can select a template which defines the formatting of the table.
A number of templates are predefined by txs:</p>
<ul class="simple">
<li><p>fullyframed_firstBold</p></li>
<li><p>fullyframed_longtable</p></li>
<li><p>plain_tabular</p></li>
<li><p>plain_tabularx</p></li>
<li><p>rowcolors_tabular</p></li>
</ul>
<p>By selecting the first entry, the table is reformatted to:</p>
<div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\begin</span><span class="nb">{</span>tabular<span class="nb">}{</span>|l|l|<span class="nb">}</span>
<span class="k">\hline</span>
<span class="k">\textbf</span><span class="nb">{</span>a<span class="nb">}&</span><span class="k">\textbf</span><span class="nb">{</span>b<span class="nb">}</span><span class="k">\\</span> <span class="k">\hline</span>
c<span class="nb">&</span>d<span class="k">\\</span> <span class="k">\hline</span>
<span class="k">\end</span><span class="nb">{</span>tabular<span class="nb">}</span>
</pre></div>
</div>
<p>These templates give the opportunity to easily reformat tables after a
predefined fashion, thus achieving a uniform table style in a document,
even if the tables are entered in a very simple style.</p>
<p>The definition of new templates is described <a class="reference internal" href="background.html#creating-table-templates"><span class="std std-ref">here</span></a>.</p>
</section>
</section>
<section id="inserting-a-tabbing-environment">
<h2>Inserting a “tabbing” environment<a class="headerlink" href="#inserting-a-tabbing-environment" title="Link to this heading">#</a></h2>
<p>To help you to insert a “tabbing” code, you can use the “Tabbing”
wizard (“Wizard” menu) :</p>
<p><img alt="Tabbing Wizard" src="_images/wizard_tabbing.webp" /></p>
</section>
<section id="inserting-a-picture">
<h2>Inserting a picture<a class="headerlink" href="#inserting-a-picture" title="Link to this heading">#</a></h2>
<p>TeXstudio offers various ways to insert picture into the LaTeX code.</p>
<section id="inserting-picture-via-menu">
<h3>Inserting picture via menu<a class="headerlink" href="#inserting-picture-via-menu" title="Link to this heading">#</a></h3>
<p>To insert a picture in your document, just use the
command in the “LaTeX/include/\includegraphics{file}” menu. Then, click on the “browser” button in
the dialog to select the graphic file.</p>
<p><img alt="Figure Environment" src="_images/insertImage_menu.webp" /></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can insert a “figure” LaTeX environment (“LaTeX -
Environments” menu) before inserting the picture.</p>
</div>
</section>
<section id="inserting-a-picture-using-a-wizard">
<h3>Inserting a picture using a “wizard”<a class="headerlink" href="#inserting-a-picture-using-a-wizard" title="Link to this heading">#</a></h3>
<p>TeXstudio offers a wizard for handling graphics insertion code in your document. “Graphics
options” defines the optional parameter of
<code class="docutils literal notranslate"><span class="pre">\includegraphics[options]{file}</span></code>. While the most used width/height
attributes can be easily set, alternatively you have full control with
the user defined setting.</p>
<p>The code is placed inside a <code class="docutils literal notranslate"><span class="pre">figure</span></code> environment with the given position suggestions.</p>
<p>By pressing the “Save as default” button the current settings (except
file, caption and label) are stored and will hence be used as default
when you open the wizard.</p>
<p>The wizard also comes into play when you drag drop an image file to your
document or use copy in explorer and paste in TeXstudio. Together with
the adjustable default parameters this makes insertion of new pictures
very fast. Furthermore, if you start the wizard while the cursor is on
picture code, the wizard is used to manipulate the existing picture
settings.</p>
<p><img alt="Figure Wizard" src="_images/wizard_figure.webp" /></p>
</section>
</section>
<section id="cross-references-and-notes">
<h2>Cross References and notes<a class="headerlink" href="#cross-references-and-notes" title="Link to this heading">#</a></h2>
<p>This toolbox in the toolbar allows you to insert quickly the label,
cite, ref, footnote… code.</p>
<p><img alt="Structure View Labels" src="_images/tb_reference.webp" /></p>
<p>Selecting “reference” open a dialog which let’s you select a reference and inserts the complete code.
All other commands will be inserted with empty arguments.</p>
<p><img alt="Inserting reference" src="_images/insert_ref.webp" /></p>
<p>The labels used in your documents are displayed in the “Structure View”.
A right click on a label there allows you to insert it as reference or with a reference command at the current cursor position.</p>
<p><img alt="Inserting reference from structure view" src="_images/insert_ref_fromStructure.webp" /></p>
<p>Another option is to use the <a class="reference internal" href="#reference-bibid-completion">auto completer</a>.</p>
<section id="finding-reference-use">
<h3>Finding reference use<a class="headerlink" href="#finding-reference-use" title="Link to this heading">#</a></h3>
<p>The context menu on labels in the structure view (see above) offers to “find usage”.
This searches in all source files of the document (see <a class="reference internal" href="background.html#about-documents-separated-in-several-files"><span class="std std-ref">root file</span></a>) and finds the occurrence of that particular reference.
Here all the references may be changed by changing “Replace by” and clicking “Replace All”.</p>
<p><img alt="Find reference usage" src="_images/findUsage.webp" /></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If references in hidden documents are changed, they will be saved automatically when a compilation run is started. Otherwise you will be asked if you want to save when closing TeXstudio or closing all files which belong to that document.</p>
</div>
</section>
</section>
<section id="inserting-math-formula">
<h2>Inserting math formula<a class="headerlink" href="#inserting-math-formula" title="Link to this heading">#</a></h2>
<p>You can toggle “in-line math” environment with the “$..$”
button in the toolbar (<code class="docutils literal notranslate"><span class="pre">Ctrl+Shift+M</span></code>) or with the “Math” menu.
The shortcut for the “display math” environment is <code class="docutils literal notranslate"><span class="pre">Alt+Shift+M</span></code>.</p>
<p>The math part of the “Central” toolbar allows you to insert the most current mathematical
forms (frac, sqrt…) , the “Math” toolbar allows entering delimiter tags like \left and \right.</p>
<p><img alt="Math part of Central Toolbar" src="_images/tb_central_math.webp" /> <img alt="Math DElimiter Toolbar" src="_images/tb_math.webp" /></p>
<p>The “symbols panel” in the side panel offers the insertion of hundreds of mathematical symbols and special characters.
The list can be sorted by categories like “all”,”greek”,”operators”, etc.
You can also directly search for parts of the command.
A right click on the symbol allows to declare it as favorite, insert the command or if available, insert the unicode character into the text.
TeXstudio keeps track which symbols have been used here, so the most used will be listed as well.</p>
<p><img alt="Symbol Panel" src="_images/symbol_panel.webp" /></p>
<p>You can also define the format of your mathematical text via the
“Math” menu.</p>
<p>For the “array” environments, a wizard (like the “Tabular” wizard)
is available in the “Wizard” menu. With this wizard, you can select
the environment : array, matrix, pmatrix….</p>
<p>The cells can be edited directly.</p>
<p><img alt="Array Wizard" src="_images/wizard_array.webp" /></p>
</section>
<section id="auto-completion">
<h2>Auto Completion<a class="headerlink" href="#auto-completion" title="Link to this heading">#</a></h2>
<section id="command-completion">
<h3>Command completion<a class="headerlink" href="#command-completion" title="Link to this heading">#</a></h3>
<p>Whenever you press <code class="docutils literal notranslate"><span class="pre">\</span></code> followed by a letter, a list of possible LaTeX
tags is shown. If you type additional
letters, the list is filtered, so that only the tags starting with the
already written text are shown. If the list contains words which all
start with the same letter combination, you can press <code class="docutils literal notranslate"><span class="pre">Tab</span></code> to complete
all common letters. If only one element is present in the list, <code class="docutils literal notranslate"><span class="pre">Tab</span></code>
selects this one to do the completion, like <code class="docutils literal notranslate"><span class="pre">Enter</span></code>. This behavior is
similar to tab completion in bash shells. You can also press <code class="docutils literal notranslate"><span class="pre">Ctrl+Space</span></code>
to open this completer whenever you want.</p>
<p><img alt="open completer" src="_images/completer.webp" /></p>
<p>If a tag has different options, a short descriptive text is inserted
into your text, telling you the meaning of each option. You can press
<code class="docutils literal notranslate"><span class="pre">Ctrl+Left</span></code>, <code class="docutils literal notranslate"><span class="pre">Ctrl+Right</span></code> to select all positions.</p>
<p>If you change a command by completing a new command, only the command
name is substituted. The same is true for environments, where the
environment is changed in the <code class="docutils literal notranslate"><span class="pre">\begin</span></code>- and <code class="docutils literal notranslate"><span class="pre">\end</span></code>-command.</p>
<p>The completer has several operation modes which are shown in the tabs
below the command list. You can switch to the next mode by pressing <code class="docutils literal notranslate"><span class="pre">Shift+Space</span></code>.</p>
<ul class="simple">
<li><p>Typical: list only typical commands and filter out rather unusual
commands.</p></li>
<li><p>Most used: list only commands which have already been used in the
completer by the user. This Is empty if txs has not been used before.</p></li>
<li><p>Fuzzy: search the command in a fuzzy way. The command needs to
contain all given letters in the same order though with an arbitrary
of letters between them. E.g. <code class="docutils literal notranslate"><span class="pre">\bf</span></code> lists, among others,
\<strong>b</strong>egin{<strong>f</strong>igure}</p></li>
<li><p>All: list all known commands.</p></li>
</ul>
</section>
<section id="text-completion">
<h3>Text completion<a class="headerlink" href="#text-completion" title="Link to this heading">#</a></h3>
<p>Furthermore normal text can be completed by starting to type a word and
pressing <code class="docutils literal notranslate"><span class="pre">Ctrl+Space</span></code>. All appropriate words in the current document are
used as possible suggestions.</p>
<p><img alt="text completion" src="_images/completer_text.webp" /></p>
</section>
<section id="environment-completion">
<h3>Environment completion<a class="headerlink" href="#environment-completion" title="Link to this heading">#</a></h3>
<p>If an environment is to be inserted, typing in the beginning of the
environment name and pressing <code class="docutils literal notranslate"><span class="pre">Ctrl+Alt+Space</span></code> gives suggestions for
adequate environments which are inserted completely with
<code class="docutils literal notranslate"><span class="pre">\\begin{env}..\\end{env}</span></code>.</p>
<div class="tab-set docutils">
<input checked="True" class="tab-input" id="tab-set--0-input--1" name="tab-set--0" type="radio"><label class="tab-label" for="tab-set--0-input--1">Entering env-name</label><div class="tab-content docutils">
<p><img alt="env completing before" src="_images/completer_env_before.webp" /></p>
</div>
<input class="tab-input" id="tab-set--0-input--2" name="tab-set--0" type="radio"><label class="tab-label" for="tab-set--0-input--2">Completing env-name</label><div class="tab-content docutils">
<p><img alt="env completing after pressing keys" src="_images/completer_env.webp" /></p>
</div>
</div>
</section>
<section id="reference-bibid-completion">
<h3>Reference/BibID completion<a class="headerlink" href="#reference-bibid-completion" title="Link to this heading">#</a></h3>
<p>When entering reference commands, the completer offers those commands prefilled with potential references.</p>
<p>If a reference is changed or the command offers to enter several references, the completer can suggest available references.</p>
<p>It works the same for <em>bibIDs</em></p>
<div class="tab-set docutils">
<input checked="True" class="tab-input" id="tab-set--1-input--1" name="tab-set--1" type="radio"><label class="tab-label" for="tab-set--1-input--1">Reference command completion</label><div class="tab-content docutils">
<p><img alt="completing reference command" src="_images/completer_ref.webp" /></p>
</div>
<input class="tab-input" id="tab-set--1-input--2" name="tab-set--1" type="radio"><label class="tab-label" for="tab-set--1-input--2">Reference completion</label><div class="tab-content docutils">
<p><img alt="completing references" src="_images/completer_reference.webp" /></p>
</div>
</div>
</section>
<section id="keyval-completion">
<h3>KeyVal completion<a class="headerlink" href="#keyval-completion" title="Link to this heading">#</a></h3>
<p>TeXstudio knows the possible keys and values for a number of commands.
The completer opens automatically when entering keys or pressing <code class="docutils literal notranslate"><span class="pre">,</span></code> to start the next key.
It also treats length specifically to offer only these when appropriate.</p>
<div class="tab-set docutils">
<input checked="True" class="tab-input" id="tab-set--2-input--1" name="tab-set--2" type="radio"><label class="tab-label" for="tab-set--2-input--1">Complete key</label><div class="tab-content docutils">
<p><img alt="KeyVal completion" src="_images/completer_keys.webp" /></p>
</div>
<input class="tab-input" id="tab-set--2-input--2" name="tab-set--2" type="radio"><label class="tab-label" for="tab-set--2-input--2">Complete length value</label><div class="tab-content docutils">
<p><img alt="KeyVal completion" src="_images/completer_length.webp" /></p>
</div>
</div>
</section>
<section id="filename-completion">
<h3>Filename completion<a class="headerlink" href="#filename-completion" title="Link to this heading">#</a></h3>
<p>TeXstudio can also complete filenames, mainly for <code class="docutils literal notranslate"><span class="pre">\include</span></code>- and <code class="docutils literal notranslate"><span class="pre">\includegraphics</span></code>-commands.</p>
<p>If the completer selection is on an image file, that image is previewed as a tooltip.</p>
<div class="tab-set docutils">
<input checked="True" class="tab-input" id="tab-set--3-input--1" name="tab-set--3" type="radio"><label class="tab-label" for="tab-set--3-input--1">File name completion</label><div class="tab-content docutils">
<p><img alt="completing filename" src="_images/completer_filename.webp" /></p>
</div>
<input class="tab-input" id="tab-set--3-input--2" name="tab-set--3" type="radio"><label class="tab-label" for="tab-set--3-input--2">File name completion with preview</label><div class="tab-content docutils">
<p><img alt="completing filename preview" src="_images/completer_filename_preview.webp" /></p>
</div>
</div>
</section>
<section id="user-tags-completion">
<h3>User tags completion<a class="headerlink" href="#user-tags-completion" title="Link to this heading">#</a></h3>
<p>And finally, user tags can be assigned an abbreviation which can also be
used with completion. Just type in the start of the abbreviation and
start the completion with <code class="docutils literal notranslate"><span class="pre">Ctrl+Space</span></code>. The abbreviation should show up in
the completion list, especially marked with “abbreviation (Usertag)”.
They can be defined in the <a class="reference internal" href="advanced.html#personal-macros"><span class="std std-ref">personal macros</span></a>.
The abbreviation may start with a backslash (<code class="docutils literal notranslate"><span class="pre">\</span></code>) allowing autostart of the completer.</p>
<div class="tab-set docutils">
<input checked="True" class="tab-input" id="tab-set--4-input--1" name="tab-set--4" type="radio"><label class="tab-label" for="tab-set--4-input--1">Abbreviation</label><div class="tab-content docutils">
<p><img alt="completing user tag" src="_images/completer_usertag_text.webp" /></p>
</div>
<input class="tab-input" id="tab-set--4-input--2" name="tab-set--4" type="radio"><label class="tab-label" for="tab-set--4-input--2">Abbreviation starting with backslash</label><div class="tab-content docutils">
<p><img alt="completing user tag with backslash" src="_images/completer_usertag.webp" /></p>
</div>
</div>
</section>
</section>
<section id="spell-check">
<h2>Spell check<a class="headerlink" href="#spell-check" title="Link to this heading">#</a></h2>
<p>TeXstudio checks the spelling as you type.
Right-click on the word to
open a menu with a list of possible corrections. In this context menu
you can also add the word to the ignore list.</p>
<p><img alt="Spelling error" src="_images/spelling_error.webp" /></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If your dictionary is very
large (> 5MB), opening the context menu and showing possible
suggestions can take some seconds. If you don’t need the suggestion,
you can press shift while right clicking and don’t have to wait.</p>
</div>
<p>The active language is shown at the bottom of the main window.
You can directly select a different language by clicking on the language code, see <a class="reference internal" href="configuration.html#configuring-the-spell-checker"><span class="std std-ref">also</span></a>.</p>
<p><img alt="active language" src="_images/active_language.webp" /></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>More languages may be available in the configuration dialog, as txs filters the available language here to a predefined set plus all previously used languages.</p>
</div>
<p>The spell checking dialog, which can be open from the menu <em>tools/check spelling..</em> or with <code class="docutils literal notranslate"><span class="pre">CTRL+:</span></code>,
allows searching for these underlined spelling mistakes starting from the current cursor position.</p>
<p>Scrolls and selects the next misspelled word and offers suggestions to correct it. You may choose one of the suggestions, type something on your own in the <code class="docutils literal notranslate"><span class="pre">replace</span> <span class="pre">with</span> <span class="pre">field</span></code> or choose to ignore it.
<code class="docutils literal notranslate"><span class="pre">Adding</span></code> means to permanently add the found word as correct in the spell checker. The <code class="docutils literal notranslate"><span class="pre">Show</span> <span class="pre">User</span> <span class="pre">Words</span></code> button allows to check that list and also to remove mistakenly added words.</p>
<p><img alt="Spell checking dialog" src="_images/speller_dialog.webp" /></p>
</section>
<section id="syntax-check">
<h2>Syntax check<a class="headerlink" href="#syntax-check" title="Link to this heading">#</a></h2>
<p>TeXstudio tries to determine if a command is correct by an internal list of valid commands.
It also tries to understand command context to some degree, so to see that math commands outside a math environment are not correct.</p>
<p><img alt="Syntax error" src="_images/syntax_error.webp" /></p>
<p>A tool tip on the error marking states the reason, why txs thinks that there is an error.</p>
<p>The supported error types are:</p>
<ul class="simple">
<li><p>Unrecognized commands</p></li>
<li><p>Commands outside the proper environment, especially math-commands</p></li>
<li><p>Missing <code class="docutils literal notranslate"><span class="pre">\begin</span></code>/<code class="docutils literal notranslate"><span class="pre">\end</span></code> commands</p></li>
<li><p>Unrecognized key/value in some key/value options, e.g. <code class="docutils literal notranslate"><span class="pre">\includegraphics[*keyval</span> <span class="pre">option*]...</span></code></p></li>
<li><p>Mismatch in defined/realized column number in tabular-like environments</p></li>
</ul>
<p><img alt="Syntax error with tool tip" src="_images/syntax_error_tooltip.webp" /></p>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
<p>LaTeX commands and especially LaTeX syntax are too complex to successfully check them completely.
Marked errors are probably real errors except in special environments, but that does <strong>not</strong> guarantee an error free document.
However the syntax marking may help to find issue significantly, especially in tabular environments.</p>
</div>
</section>
<section id="thesaurus">
<h2>Thesaurus<a class="headerlink" href="#thesaurus" title="Link to this heading">#</a></h2>
<p>TeXstudio has integrated a simple thesaurus. OpenOffice 2.x databases
are used for this. By placing the cursor on a word and activating the
thesaurus (<code class="docutils literal notranslate"><span class="pre">Ctrl+Shift+F8</span></code> or Edit/Thesaurus), it tries to find synonyms
for this word. Please be patient if you start the thesaurus at first
time since loading the database just occurs then and can take a few
moments.</p>
<p><img alt="Thesaurus" src="_images/thesaurus.webp" /></p>
<p>The first line to the left contains the word, for which a synonym is
searched for. The list below gives a list of word classes. The can be
chosen to reduce the number of suggestions. The column to the right
contains the list of suggested synonyms. A selected word from this list
appears in the first line to the right as proposition for replacement of
the text. This word can be changed manually. It is also used to do
further investigations for words and their synonyms which “start with”
or “contain” that word. With “lookup” it can be directly used to
look for a synonym for that word.</p>
<p>The thesaurus can be selected in the <a class="reference internal" href="configuration.html#configuring-the-thesaurus"><span class="std std-ref">configuration</span></a>.</p>
</section>
<section id="searching-in-the-document">
<h2>Searching in the document<a class="headerlink" href="#searching-in-the-document" title="Link to this heading">#</a></h2>
<p>As any editor, TeXstudio offers to search (and replace) text within an open file.</p>
<section id="searching-text">
<h3>Searching text<a class="headerlink" href="#searching-text" title="Link to this heading">#</a></h3>
<p>The search is performed in a search panel below the actual text, activated either with <code class="docutils literal notranslate"><span class="pre">Ctrl+F</span></code> or edit/searching/find. Options can be chosen by enabling/disabling the option next to the search text box.</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Icon</p></th>
<th class="head"><p>function</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><img alt="" src="_images/down.svg" /></p></td>
<td><p>find next</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/up.svg" /></p></td>
<td><p>find previous</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/count.svg" /></p></td>
<td><p>count matches</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/case.svg" /></p></td>
<td><p>select case sensitivity (activated, case sensitive)</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/word.svg" /></p></td>
<td><p>find only complete words</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/regex.svg" /></p></td>
<td><p>use regular expression, see below</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/highlight.svg" /></p></td>
<td><p>highlight all matches</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/cursor.svg" /></p></td>
<td><p>start search from cursor/start of document</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/selection.svg" /></p></td>
<td><p>limit search on previous selected text</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/all.svg" /></p></td>
<td><p>filter search results like ‘all’,’math”,’non-math’,etc.</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/extend.svg" /></p></td>
<td><p>extended search, see <a class="reference internal" href="#extended-search">here</a></p></td>
</tr>
</tbody>
</table>
</div>
<p>Regular expression follows perl regex syntax, see also <a class="reference external" href="http://perldoc.perl.org/perlre.html">Perl’s regular expression documentation</a> and <a class="reference external" href="http://perldoc.perl.org/perlretut.html">Perl’s regular expression tutorial</a>.</p>
</section>
<section id="replacing-text">
<h3>Replacing text<a class="headerlink" href="#replacing-text" title="Link to this heading">#</a></h3>
<p>The search-panel extends to offer a replacement when pressing <code class="docutils literal notranslate"><span class="pre">Ctrl+R</span></code> or edit/Searching/replace.</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Icon</p></th>
<th class="head"><p>function</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><img alt="" src="_images/replacedown.svg" /></p></td>
<td><p>replace and find next</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/replaceup.svg" /></p></td>
<td><p>replace and find previous</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/replaceall.svg" /></p></td>
<td><p>replace all remaining matches</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/prompt.svg" /></p></td>
<td><p>ask every time before replacing</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/escape.svg" /></p></td>
<td><p>use escaped number to insert found groups, see perl regex above</p></td>
</tr>
</tbody>
</table>
</div>
<p><img alt="search panel" src="_images/searchpanel.webp" /></p>
</section>
<section id="extended-search">
<h3>Extended search<a class="headerlink" href="#extended-search" title="Link to this heading">#</a></h3>
<p>The extended search feature allows you to search within all files associated with a document.
The search word is updated when pressing “+” again on the search panel. “Update search” search with the given search word again through all specified files.
The drop down menu allows to search within a “Project”,i.e. all files containing to one document, “All doc”, i.e. all open documents in TeXstudio or a single “Current Document”.</p>
<p>The option “Files on disk” searches all the text in tex-files in the same folder like the current document. The folder and the file filter can be changed.</p>
<p>In the list of search results, a double-click on a match jumps to the location in the file. The matches can be selected/deselected to limit the results which are replaced by the replacement text by pressing “Replace all”.</p>
<p><img alt="extended search pane" src="_images/extendedSearch.webp" /></p>
</section>
</section>
<section id="handling-large-projects">
<h2>Handling large projects<a class="headerlink" href="#handling-large-projects" title="Link to this heading">#</a></h2>
<p>This section describes what support txs provides for larger projects.</p>
<p>Large projects usually are split into several included files.
In order to speed up compilation, the package <a class="reference external" href="https://www.ctan.org/pkg/subfiles">subfiles</a> offer compilation of the current document only. txs automatically loads all included files, so that it can provide proposal for user commands, labels and bibitems. To speed up reloading a project, txs caches all files, meaning it writes those information on the disk. When reloading that project, all loaded but not open (hidden) sub-files are just opened from the cached information which speeds up the reloading significantly. Obviously this only works on restoring an previous opened project, the initial opening may take a bit longer, see <a class="reference internal" href="background.html#about-documents-separated-in-several-files"><span class="std std-ref">also</span></a>.</p>
</section>
<section id="special-commands">
<h2>Special Commands<a class="headerlink" href="#special-commands" title="Link to this heading">#</a></h2>
<section id="delete-word-command-environment">
<h3>Delete word/command/environment<a class="headerlink" href="#delete-word-command-environment" title="Link to this heading">#</a></h3>
<p>With the shortcut Alt+Del, the word under the cursor is deleted. If it
is a command, the command is deleted including opening and closing
braces. E.g. <code class="docutils literal notranslate"><span class="pre">\textbf{text}</span></code> leave <code class="docutils literal notranslate"><span class="pre">text</span></code>. If it is an environment,
the enclosing <code class="docutils literal notranslate"><span class="pre">\begin</span></code>/<code class="docutils literal notranslate"><span class="pre">\end</span></code> are removed.
In case that matching delimiters are highlighted like <code class="docutils literal notranslate"><span class="pre">()</span></code>, both are removed.</p>
</section>
<section id="rename-environment">
<h3>Rename environment<a class="headerlink" href="#rename-environment" title="Link to this heading">#</a></h3>
<p>If you place the cursor on an environment name, after a moment a
mirror-cursor is activated on the environment name which allows
synchronous change of the environment name in the begin- and
end-command. So if you want to change a
<code class="docutils literal notranslate"><span class="pre">\begin{tabular}...\end{tabular}</span></code> construction to
<code class="docutils literal notranslate"><span class="pre">\begin{tabularx}...\end{tabularx}</span></code>, place the text cursor on
<code class="docutils literal notranslate"><span class="pre">tabular</span></code>, wait for a second and then, after the mirror-cursor
appears, change <code class="docutils literal notranslate"><span class="pre">tabular</span></code> to <code class="docutils literal notranslate"><span class="pre">tabularx</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can also double-click on the environment name to activate the mirror-cursor.</p>
</div>
</section>
<section id="cut-buffer">
<h3>Cut Buffer<a class="headerlink" href="#cut-buffer" title="Link to this heading">#</a></h3>
<p>If you select something and then start to type in a command and complete
it, the selection is put in as first argument. E.g. you have a <code class="docutils literal notranslate"><span class="pre">text</span></code>,
select it and start typing <code class="docutils literal notranslate"><span class="pre">\textbf</span></code>, command which is completed. The
resulting text is <code class="docutils literal notranslate"><span class="pre">\textbf{text}</span></code>.</p>
</section>
<section id="block-cursor">
<h3>Block cursor<a class="headerlink" href="#block-cursor" title="Link to this heading">#</a></h3>
<p>TeXstudio supports block cursors (or multiple cursors).
Cursors can be added by <code class="docutils literal notranslate"><span class="pre">Ctrl+Alt</span></code>+left click.
Alternatively pressing <code class="docutils literal notranslate"><span class="pre">Ctrl+alt+Up/down</span></code> also add block cursors.
The cursors can jointly move, add and remove text and select characters.
Pressing <code class="docutils literal notranslate"><span class="pre">esc</span></code> or clicking into the text ends the block cursor mode.</p>
<p><img alt="block cursor" src="_images/blockCursor.webp" /></p>
<p>By clicking <code class="docutils literal notranslate"><span class="pre">Ctrl+Shift</span></code>+left click a block from the current cursor to the mouse position is selected.</p>
<p><img alt="block cursor with selection" src="_images/blockCursor_selection.webp" /></p>
</section>
</section>
</section>
</article>
</div>
<footer>
<div class="related-pages">
<a class="next-page" href="compiling.html">
<div class="page-info">
<div class="context">
<span>Next</span>
</div>
<div class="title">Compiling a document</div>
</div>
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
</a>
<a class="prev-page" href="getting_started.html">
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
<div class="page-info">
<div class="context">
<span>Previous</span>
</div>
<div class="title">Getting started</div>
</div>
</a>
</div>
<div class="bottom-of-page">
<div class="left-details">
<div class="copyright">
Copyright © 2022, TeXstudio Team
</div>
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo</a>
</div>
<div class="right-details">
</div>
</div>
</footer>
</div>
<aside class="toc-drawer">
<div class="toc-sticky toc-scroll">
<div class="toc-title-container">
<span class="toc-title">
On this page
</span>
</div>
<div class="toc-tree-container">
<div class="toc-tree">
<ul>
<li><a class="reference internal" href="#">Editing a TeX document</a><ul>
<li><a class="reference internal" href="#creating-a-new-document">Creating a new document</a><ul>
<li><a class="reference internal" href="#setting-the-preamble-of-a-tex-document">Setting the preamble of a TeX document</a></li>
<li><a class="reference internal" href="#using-templates-to-start-a-new-document">Using Templates to start a new document</a></li>
</ul>
</li>
<li><a class="reference internal" href="#structure-your-document">Structure your document</a></li>
<li><a class="reference internal" href="#browsing-your-document">Browsing your document</a><ul>
<li><a class="reference internal" href="#the-structure-view">The Structure View</a></li>
<li><a class="reference internal" href="#the-toc-view">The TOC View</a></li>
<li><a class="reference internal" href="#using-bookmarks">Using Bookmarks</a></li>
</ul>
</li>
<li><a class="reference internal" href="#formatting-your-text">Formatting your text</a><ul>
<li><a class="reference internal" href="#capitalisation">Capitalisation</a></li>
<li><a class="reference internal" href="#escaping-reserved-characters">Escaping reserved characters</a></li>
</ul>
</li>
<li><a class="reference internal" href="#inserting-a-list">Inserting a list</a></li>
<li><a class="reference internal" href="#inserting-a-table">Inserting a table</a><ul>
<li><a class="reference internal" href="#manipulating-tables">Manipulating tables</a></li>
<li><a class="reference internal" href="#using-table-templates">Using table templates</a></li>
</ul>
</li>
<li><a class="reference internal" href="#inserting-a-tabbing-environment">Inserting a “tabbing” environment</a></li>
<li><a class="reference internal" href="#inserting-a-picture">Inserting a picture</a><ul>
<li><a class="reference internal" href="#inserting-picture-via-menu">Inserting picture via menu</a></li>
<li><a class="reference internal" href="#inserting-a-picture-using-a-wizard">Inserting a picture using a “wizard”</a></li>