Repository navigation
Expand file tree
/
Copy pathediting.html
More file actions
1221 lines (1186 loc) · 80.4 KB
/
Copy pathediting.html
File metadata and controls
1221 lines (1186 loc) · 80.4 KB
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="prefetch" href="_static/texstudio128x128.webp" as="image">
<link rel="shortcut icon" href="_static/texstudio.ico"><!-- Generated with Sphinx 9.1.0 and Furo 2025.12.19 -->
<title>Editing a TeX document - TeXstudio 4.9.8 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=7bdb33bb" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=4c969af8" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=8dab3a3b" />
<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" 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" 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-with-moon" viewBox="0 0 24 24">
<title>Auto light/dark, in light mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
<circle cx="14.5" cy="9.55" r="3.6"/>
</svg>
</symbol>
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
<title>Auto light/dark, in dark mode</title>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
</svg>
</symbol>
<symbol id="svg-pencil" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
<path d="M13.5 6.5l4 4" />
<path d="M20 21l2 -2l-2 -2" />
<path d="M17 17l-2 2l2 2" />
</svg>
</symbol>
<symbol id="svg-eye" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
<path d="M20 21l2 -2l-2 -2" />
<path d="M17 17l-2 2l2 2" />
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
<label class="overlay sidebar-overlay" for="__navigation"></label>
<label class="overlay toc-overlay" for="__toc"></label>
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
<div class="page">
<header class="mobile-header">
<div class="header-left">
<label class="nav-overlay-icon" for="__navigation">
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
</label>
</div>
<div class="header-center">
<a href="index.html"><div class="brand">TeXstudio 4.9.8 documentation</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></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">
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
</label>
</div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
<div class="sidebar-logo-container">
<img class="sidebar-logo" src="_static/texstudio128x128.webp" alt="Logo"/>
</div>
<span class="sidebar-brand-text">TeXstudio 4.9.8 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" aria-label="Toggle Light / Dark / Auto color theme">
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></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">
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
</label>
</div>
<article role="main" id="furo-main-content">
<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 dialog 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 as 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
(see <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 dialog. Built-in templates cannot 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 no longer
only considers 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, beamer blocks
and todos.</p>
<p>There are two kinds 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. <code class="docutils literal notranslate"><span class="pre">%\s?[A-Z][A-Z_-]+</span></code> for any comment starting
with at least two capital letters.</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. Sections 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 <code class="docutils literal notranslate"><span class="pre">document.tex</span></code> that includes the
file named <code class="docutils literal notranslate"><span class="pre">file1.tex</span></code>. The root file contains the section “Main text”,
while <code class="docutils literal notranslate"><span class="pre">file1.tex</span></code> contains the subsection “External”. By placing the mouse
pointer over this subsection in the TOC view, you find the file name
<code class="docutils literal notranslate"><span class="pre">file1.tex</span></code> in the mouse-over. This works even if the file is not open
(but the document must be loaded by TeXstudio, see 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
<code class="docutils literal notranslate"><span class="pre">file1.tex</span></code> (namely <code class="docutils literal notranslate"><span class="pre">document.tex</span></code>). The indentation shows that the text of
<code class="docutils literal notranslate"><span class="pre">file1.tex</span></code> is part of the section “Main text”. You may like to choose a
different color in the configuration dialog (see 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 (see 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 of 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 (see 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 (see 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 (see 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 the entry <code class="docutils literal notranslate"><span class="pre">Line</span></code> 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 a bookmark
is one of several types of markers (see <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="capitalization">
<h3>Capitalization<a class="headerlink" href="#capitalization" 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 inserted quickly via the
“LaTeX/List Environment” 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 borders, cell merging and column alignment.
Once the code is generated, it cannot 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. The 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>Adds a 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 is</p></td>
</tr>
<tr class="row-even"><td><p><img alt="" src="_images/addCol.svg" /></p></td>
<td><p>Adds a column in the complete table after the 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>Pastes a column in the complete table after the 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>Removes current column</p></td>
</tr>
<tr class="row-odd"><td><p><img alt="" src="_images/cutCol.svg" /></p></td>
<td><p>Removes current column and stores it 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/Manipulate Tables” 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 a command <code class="docutils literal notranslate"><span class="pre">\hline</span></code> is already 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 the 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 in 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 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 pictures into the LaTeX code.</p>
<section id="inserting-pictures-via-menu">
<h3>Inserting pictures via menu<a class="headerlink" href="#inserting-pictures-via-menu" title="Link to this heading">¶</a></h3>
<p>To insert a picture in your document, just use the
command in the “LaTeX” -> “Input/Include Files” -> “\includegraphics{file}” menu. Then click on the “browse” 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 parameters 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 and 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… commands.</p>
<p><img alt="Structure View Labels" src="_images/tb_reference.webp" /></p>
<p>Selecting “ref” from the toolbox (or the menu “LaTeX/Cross References”) opens a dialog which lets 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 a 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 “find usage”.
This searches in all source files of the document (see <a class="reference internal" href="background.html#about-documents-separated-into-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-formulas">
<h2>Inserting math formulas<a class="headerlink" href="#inserting-math-formulas" title="Link to this heading">¶</a></h2>
<p>The math part of the “Central” toolbar allows you to insert the most common mathematical
forms (\frac, \sqrt… commands), 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>You can toggle the “in-line math” environment with the “$..$”
button in the “Central” toolbar (<code class="docutils literal notranslate"><span class="pre">Ctrl+Shift+M</span></code>) or in the “Math” menu.
The “display math - […]” environment is only available in the menu (or via shortcut <code class="docutils literal notranslate"><span class="pre">Alt+Shift+M</span></code>).</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 you to declare it as favorite, insert the command or, if available, insert the Unicode character into the text.
TeXstudio keeps track of 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 are 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
number 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 lengths 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 id="user-constructs-completion">
<h3>User constructs completion<a class="headerlink" href="#user-constructs-completion" title="Link to this heading">¶</a></h3>
<p>TeXstudio remembers used mathematical expressions (user constructs) which are likely reused and provides them in the completer.
These constructs are of the form</p>
<ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">\symbol_</span></code><em>something</em></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">\mathcmd{</span></code><em>something</em><code class="docutils literal notranslate"><span class="pre">}</span></code></p></li>
</ol>
<p>This feature can be disabled, see <a class="reference internal" href="configuration.html#configuring-the-autocompletion"><span class="std std-ref">configuration</span></a>.</p>
</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 languages here to a predefined set plus all previously used languages.</p>
</div>
<p>The spell checking dialog, which can be opened 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>It 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></code> field 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 checking that list and also removing 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 it can 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 tooltip 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 issues 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 for the 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. The list below gives a list of word classes. These 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 a 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 to previously 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 expressions follow 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” searches with the given search word again through all specified files.
The drop-down menu allows searching within a “Project”, i.e. all files belonging to one document, “All Docs”, i.e. all open documents in TeXstudio, or a single “Current Doc”.</p>
<p>The option “Files on disk” searches all the text in TeX files in the same folder as 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. Hovering over an entry previews the applied replacements. 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> offers compilation of the current document only. TXS automatically loads all included files, so that it can provide proposals for user commands, labels and bibitems. To speed up reloading a project, TXS caches all files, meaning it writes this information to 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 when restoring a previously opened project; the initial opening may take a bit longer, see <a class="reference internal" href="background.html#about-documents-separated-into-several-files"><span class="std std-ref">also</span></a>.</p>
</section>
<section id="file-explorer">
<h2>File Explorer<a class="headerlink" href="#file-explorer" title="Link to this heading">¶</a></h2>
<p>In the sidepanel, a file explorer can be shown which shows all files in the same directory as the current editor file.
Files can be opened by double-click.
Drag and drop of images opens the image wizard, drag and drop of a tex file puts “\include{filename}” at the current cursor position.</p>
</section>
<section id="collaborative-editing-pair-programming">
<h2>Collaborative Editing (Pair programming)<a class="headerlink" href="#collaborative-editing-pair-programming" title="Link to this heading">¶</a></h2>
<p>TeXstudio allows collaborative editing on documents. Collaborative editing means that a second person on a different computer can access the files of a shared folder after being told a special access code. The other computer can contact your computer, download all files of that folder and start browsing and editing these files as well.
You will see the other person’s cursor movement as well as any changes instantly.</p>
<section id="inviting-collaborators">
<h3>Inviting collaborators<a class="headerlink" href="#inviting-collaborators" title="Link to this heading">¶</a></h3>
<p>Here you need to start a host server by clicking “Tools/Start sharing folders”.
It will take the folder of the current file to set a folder to share.</p>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
<p>Please be aware that <strong>all</strong> files in that folder will be visible and accessible by your collaborator!</p>
</div>
<p>Once the server is successfully started, a symbol in the panel will appear to notify you.</p>
<p><img alt="Server connected" src="_images/ethersync_status_panel.webp" /></p>
<p>The tooltip on that icon will tell you the folder which is used for sharing as well as the current access code. The context menu (right-click) on the icon offers to copy the code into the clipboard.
This access code in the form of <code class="docutils literal notranslate"><span class="pre">4-alpha-button</span></code> needs to be communicated to the collaborator for them to access this folder (as long as the host server is running).</p>
<p><img alt="Copy access code" src="_images/ethersync_status_panel_copyCode.webp" /></p>
<p>Once they connect to any of those files, TeXstudio gets notified. If the file is open in your TeXstudio, their cursor will appear as a blue cursor. Any changes will directly appear in your file as well.
So will your cursor position and changes appear in their editor.</p>
<p>Once the connection is closed (“Tools/Disconnect from collaboration” or TeXstudio is closed), the changes will not be synchronized any more and neither their changes nor yours are exchanged.</p>
</section>
<section id="joining-collaboration">
<h3>Joining collaboration<a class="headerlink" href="#joining-collaboration" title="Link to this heading">¶</a></h3>
<p>In order to join another user for collaboration, an access code is needed.
If that has been communicated, connect to the host user with “Tools/Connect to other user for collaboration”.</p>
<p>TeXstudio asks for the access code and connects to the other user.
If that was successful, the status panel (see <a class="reference internal" href="#inviting-collaborators">above</a>) will turn green.
The data will be copied into your collaboration folder, see <a class="reference internal" href="configuration.html#configuring-collaboration"><span class="std std-ref">configuration</span></a>.
You can open any file there and you will see the cursor as well as any changes from any other connected editors instantly.</p>
<p>The connection is closed when you disconnect from collaboration (“Tools/Disconnect from collaboration” or close TeXstudio).</p>
</section>
</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> leaves <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 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="close-delimiter-or-environment">
<h3>Close delimiter or environment<a class="headerlink" href="#close-delimiter-or-environment" title="Link to this heading">¶</a></h3>
<p>With the shortcut Alt+Return, the last open delimiter (e.g. <code class="docutils literal notranslate"><span class="pre">{</span></code>) or the last open environment will be closed by inserting the corresponding text at the cursor position (e.g. <code class="docutils literal notranslate"><span class="pre">}</span></code> in case of an open brace or <code class="docutils literal notranslate"><span class="pre">\end{...}</span></code> in case of an open environment).</p>
</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 the 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>, a 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 adds 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>