-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfiguration.html
1250 lines (1214 loc) · 81.7 KB
/
configuration.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="Configuring TeXstudio" />
<meta property="og:type" content="website" />
<meta property="og:url" content="configuration.html" />
<meta property="og:site_name" content="TeXstudio" />
<meta property="og:description" content="TeXstudio can be adapted in a wide range. Some options are directly available in the GUI via context menus, see here, others are available with the “Configure TeXstudio” command in the “Options” me..." />
<meta name="description" content="TeXstudio can be adapted in a wide range. Some options are directly available in the GUI via context menus, see here, others are available with the “Configure TeXstudio” command in the “Options” me..." />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Background information" href="background.html" /><link rel="prev" title="Advanced features" href="advanced.html" />
<link rel="shortcut icon" href="_static/texstudio.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Configuring TeXstudio - TeXstudio 4.8.5 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.5 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.5 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"><a class="reference internal" href="editing.html">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 current current-page"><a class="current reference internal" href="#">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="configuring-texstudio">
<h1>Configuring TeXstudio<a class="headerlink" href="#configuring-texstudio" title="Link to this heading">#</a></h1>
<p>TeXstudio can be adapted in a wide range. Some options are directly available in the GUI via context menus, see <a class="reference internal" href="#adapting-the-main-gui">here</a>, others are available with the “Configure TeXstudio” command in the
“Options” menu (“Preferences” under Mac OS X). Note that there are
two levels of detail. More advanced or less often used options are only
visible if you toggle “Show advanced options” in the lower left
corner.</p>
<section id="adapting-the-main-gui">
<h2>Adapting the main GUI<a class="headerlink" href="#adapting-the-main-gui" title="Link to this heading">#</a></h2>
<section id="side-panel-docks">
<h3>Side-panel (Docks)<a class="headerlink" href="#side-panel-docks" title="Link to this heading">#</a></h3>
<p>The side-panel and the log panel may be hidden with a control on the lower-left edge of the main window.</p>
<p><img alt="Hide panes" src="_images/hide_panes.webp" /></p>
<p>The sidepanel itself consists of different docks which can be reordered, split and even moved to the right hand side of the window.</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">Side-panel with all docks</label><div class="tab-content docutils">
<p><img alt="side-panel with all docks" src="_images/dock_start.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">Dragging dock to new place</label><div class="tab-content docutils">
<p><img alt="Dragging dock to new place" src="_images/dock_move.webp" /></p>
</div>
<input class="tab-input" id="tab-set--0-input--3" name="tab-set--0" type="radio"><label class="tab-label" for="tab-set--0-input--3">Split off dock</label><div class="tab-content docutils">
<p><img alt="Split off dock" src="_images/dock_split.webp" /></p>
</div>
</div>
<p>The side-panel set-up can be reset to default by using View/Show/”Reset Sidepanel/Docks”.</p>
<p>The menu “View/Show” also offers to show/hide docks.</p>
<p><img alt="Viewer Menu for docks" src="_images/view_docks.webp" /></p>
</section>
<section id="toolbars">
<h3>Toolbars<a class="headerlink" href="#toolbars" title="Link to this heading">#</a></h3>
<p>The toolbars can be hidden by a right click anywhere on the toolbar area.</p>
<p><img alt="Toolbar Visibility Menu" src="_images/Tool_Bar_Menu.webp" /></p>
<p>They can be moved by dragging the handler on the left-hand side.</p>
<p><img alt="Moving Toolbars" src="_images/Tool_Bar_Move.webp" /></p>
</section>
</section>
<section id="configuring-some-general-aspects">
<h2>Configuring some general aspects<a class="headerlink" href="#configuring-some-general-aspects" title="Link to this heading">#</a></h2>
<p>This panel allows the setting of some general aspects.</p>
<ul class="simple">
<li><p>The “style” and “color scheme” of TeXstudio can be selected. The
modern variant is closer to texmaker, “Orion Dark” and “Adwaita Dark” provide a dark mode.</p></li>
<li><p>The language of the menus can be changed directly to ignore system settings.</p></li>
</ul>
<p><img alt="Configure General" src="_images/configure_general.webp" /></p>
<p>The advanced options allow:</p>
<ul class="simple">
<li><p>Limit the number of recent files</p></li>
<li><p>The use of system dialog instead of the qt dialog</p></li>
<li><p>show always the structure of the “master” document if one is set</p></li>
<li><p>automatically restore the previous session</p></li>
<li><p>and to store session paths relatively which allows easier moving of files/projects</p></li>
</ul>
<p><img alt="Configure General Advanced" src="_images/configure_general_adv.webp" /></p>
</section>
<section id="configuring-the-editor">
<h2>Configuring the editor<a class="headerlink" href="#configuring-the-editor" title="Link to this heading">#</a></h2>
<p>You may change the default encoding for new files (“Configure
TeXstudio” -> “Editor” -> “Editor Font Encoding”) if you don’t
want utf8 as encoding. Don’t forget to set the same encoding in the
preamble of your documents. (e.g. <code class="docutils literal notranslate"><span class="pre">\usepackage[utf8]{inputenc}</span></code>, if you
use utf-8).</p>
<p>TeXstudio can auto detect utf-8 and latin1 encoded files, but if you use
a different encoding in your existing documents you have to specify it
in the configuration dialog before opening them. (and then you also have
to disable the auto detection)</p>
<ul class="simple">
<li><p>“Folding” toggles the editors code-folding capability (hide
sections of the text).</p></li>
<li><p>The selection box “Indentation mode” lets you select, whether
indented lines are followed by lines of the same indentation after
pressing Enter or letting TeXstudio do automatic indentation.</p></li>
<li><p>Double quotes can be automatically replaced by language specific ones when typing <code class="docutils literal notranslate"><span class="pre">"</span></code></p></li>
<li><p>The editor can show line numbers left of the text if desired.</p></li>
<li><p>The shown inline checking results can be selected with some granularity.</p></li>
</ul>
<p><img alt="Configure Editor" src="_images/configure_editor.webp" /></p>
<p>The advanced options allow among others:</p>
<dl class="simple myst">
<dt>Automatically load all included files of a LaTeX document</dt><dd><p>This load all child document and scans them. This is necessary to provide a complete set of available references, bibID and possibly used packages if they are defined in a child document</p>
</dd>
<dt>Scan LaTeX distribution for installed packages</dt><dd><p>This scan allows txs to determine if the given packages are valid and also to provide proposal for package name completion</p>
</dd>
</dl>
<p><img alt="Configure Editor advanced" src="_images/configure_editor_adv.webp" /></p>
</section>
<section id="configuring-the-advanced-editor-settings-advanced-option">
<h2>Configuring the advanced editor settings (Advanced option)<a class="headerlink" href="#configuring-the-advanced-editor-settings-advanced-option" title="Link to this heading">#</a></h2>
<p>The advanced editor option allow fine control over many different aspects.
The overview here is incomplete and concentrates on commonly used changes.</p>
<dl class="simple myst">
<dt>Show image tooltip on images in files</dt><dd><p>when hovering over an image filename (e.g. in a \includegraphics command), a tooltip with the graphics content is shown</p>
</dd>
<dt>Show help as tooltip on text in editor</dt><dd><p>when hovering over a LaTeX command in the editor, txs can show a tooltip on that command if it is described in some latex command reference.</p>
</dd>
<dt>Line Wrapping</dt><dd><p>This allows to change the line wrapping mechanism. By default all lines are wrapped at the window edge.
They can also be wrapped after a defined number of characters which is not always the same horizontal width if the characters are not monospaced.
Or hard line wrapping after a number of characters can be selected. This inserts a new line when the number of characters exceeds a defined values. This insertion is done when saving a document and only for changed lines.</p>
</dd>
<dt>Auto save all files</dt><dd><p>txs allows to automatically save all files every few minutes</p>
</dd>
</dl>
<p><img alt="Configure Editor advanced" src="_images/configure_advancedEditor.webp" /></p>
<p>The section for the structure panel offers:</p>
<dl class="simple myst">
<dt>Reference command in context menu</dt><dd><p>use this command when inserting a reference with command from a context menu</p>
</dd>
<dt>Regular expression for TODO comment</dt><dd><p>define what comment is considered as TODO comment (which are highlighted and collected specifically )</p>
</dd>
<dt>Use color in global TOC</dt><dd><p>The global TOC can use colored background to distinguish between different included files. Different color schemes and no color are possible.</p>
</dd>
</dl>
<p><img alt="Configure Editor advanced: structure panel" src="_images/conf_structurepanel.webp" /></p>
<p>The table autoformatting affects the <a class="reference internal" href="editing.html#manipulating-tables"><span class="std std-ref">manipulate table tools</span></a>.</p>
<dl class="simple myst">
<dt>Special commands</dt><dd><p>Are special commands which do not add cell content and need to handled specially, e.g. <code class="docutils literal notranslate"><span class="pre">\hline</span></code> at the end of a row.</p>
</dd>
<dt>Special commands position</dt><dd><p>where to place them when reformatting a table.</p>
</dd>
<dt>One line per cell</dt><dd><p>when reformatting a table, just put each cell in an individual line</p>
</dd>
</dl>
<p><img alt="Configure Editor advanced: table autoformatting" src="_images/conf_tableautoformating.webp" /></p>
</section>
<section id="configuring-the-latex-related-commands">
<h2>Configuring the latex related commands<a class="headerlink" href="#configuring-the-latex-related-commands" title="Link to this heading">#</a></h2>
<p>LaTeX comes with a number of command line tools to compile and
manipulate LaTeX documents. The commands section defines there location
and arguments.</p>
<p>The default settings should work with the recent and standard LaTeX
distributions, but you could have to modify them (“Configure
TeXstudio” -> “Commands”). To change a command, just click on the
button at the end of the corresponding line and select the command in
the file browser : TeXstudio will automatically adapt the syntax of the
command.</p>
<p>You can use a number of special characters / character sequences to
address the context of the current document. They are expanded at
runtime:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Special Character</p></th>
<th class="head"><p>Expands to</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">%</span></code></p></td>
<td><p>filename of the root document for of current document without extension</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">@</span></code></p></td>
<td><p>current line number</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">?</span></code> followed by further characters</p></td>
<td><p>See the instruction at the bottom of the configuration dialog.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">[txs-app-dir]</span></code></p></td>
<td><p>Location of the TeXstudio executable (useful for portable settings)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">[txs-settings-dir]</span></code></p></td>
<td><p>Location of the settings file (texstudio.ini)</p></td>
</tr>
</tbody>
</table>
</div>
<p>You can always restore the original settings using the revert button to
the right.</p>
<p><img alt="Configure Commands" src="_images/configure_commands.webp" /></p>
<section id="command-syntax-in-detail">
<h3>Command syntax in detail<a class="headerlink" href="#command-syntax-in-detail" title="Link to this heading">#</a></h3>
<p>Before an external command is executed the command line undergoes
expansion where the following tokens are recognized and replaced by
TeXstudio:</p>
<ul class="simple">
<li><p><strong>%</strong> is replaced by the absolute pathname of the root (master)
document up to but excluding the file extension.</p></li>
<li><p><strong>%%</strong> is replaced by the % symbol.</p></li>
<li><p><strong>@</strong> is replaced by the current line number at the moment when the
corresponding external command was run.</p></li>
<li><p><strong>@@</strong> is replaced by the @ symbol.</p></li>
<li><p><strong>?[selector][pathname parts][terminating char]</strong> is replaced
by a formatted filename where:</p>
<ul>
<li><p><strong>[selector]</strong> selects the pathname that is used by
<strong>[pathname parts]</strong>. It can be one of the following:</p>
<ul>
<li><p><strong>No selector</strong> used at all. In this case the root (master)
document is selected.</p></li>
<li><p><strong>c:</strong> selects the current document which can be different
from the root document. Note that the trailing colon is a
part of the selector.</p></li>
<li><p><strong>p{ext}:</strong> searches for a file with same basename as the
root document and extension <strong>ext</strong>. The search is done in
the directory containing the root (master) document and in the
additional PDF search paths. If a matching file is found
then it selected for further processing by [pathname
parts]. If no matching file is found then TeXstudio selects
a default pathname which is the master file with its
extension replaced by <strong>ext</strong>. Note that the trailing colon
is a part of the selector.</p></li>
</ul>
</li>
<li><p><strong>[pathname parts]</strong> selects which parts of the selected
pathname are placed in the expanded command line. It can be one
or more of the following characters:</p>
<ul>
<li><p><strong>a</strong> expands to the absolute path of the selected pathname.
This absolute path is up to but excluding the filename of
the selected pathname.</p></li>
<li><p><strong>r</strong> expands to the relative path of the selected pathname.
This relative path is up to but excluding the filename of
the selected pathname.</p></li>
<li><p><strong>m</strong> expands to the complete basename of the selected
pathname. The complete basename is the filename part up to
but excluding the last dot in the filename.</p></li>
<li><p><strong>e</strong> expands to the extension of the selected pathname.</p></li>
</ul>
</li>
<li><p><strong>[terminating char]</strong> specifies the prefix and/or suffix
characters that enclose the expanded <strong>[pathname parts]</strong>. It
can be one of the following:</p>
<ul>
<li><p><strong>)</strong> Do not add characters before or after the expanded
<strong>[pathname parts]</strong>. Used to mark the end of the
expansion token.</p></li>
<li><p><strong>“</strong> to enclose the expanded <strong>[pathname parts]</strong> in
double quotes.</p></li>
<li><p><strong>.</strong> to add a dot after the expanded <strong>[pathname
parts]</strong>.</p></li>
<li><p><strong>(space)</strong> to add a space after the expanded <strong>[pathname
parts]</strong>.</p></li>
</ul>
</li>
</ul>
</li>
<li><p><strong>?*.ext</strong> causes the external command to be expanded once for each
.ext file.</p></li>
<li><p><strong>??</strong> is replaced by the ? symbol.</p></li>
</ul>
<p>Examples:</p>
<ul class="simple">
<li><p><strong>?ame”</strong> expands to the absolute pathname of the root document
enclosed in double-quotes (e.g. /some/directory/mydocument.tex).</p></li>
<li><p><strong>?e)</strong> expands to the extension of the root document without
leading dot (e.g. tex).</p></li>
<li><p><strong>?m</strong> expands to the double-quoted complete basename of the root
document (identical to <strong>%</strong>).</p></li>
<li><p><strong>?me</strong> expands to the filename of the root document (e.g.
example.tex).</p></li>
<li><p><strong>?p{pdf}:ame</strong> expands to the absolute pathname of the output PDF
file (e.g. /some/directory/mydocument.pdf).</p></li>
<li><p>?*.aux expands once for each .aux file in the current directory.</p></li>
</ul>
</section>
<section id="set-up-for-external-viewers">
<h3>Set-up for external viewers<a class="headerlink" href="#set-up-for-external-viewers" title="Link to this heading">#</a></h3>
<p>Some viewers can jump to (and visually highlight) a position in
the DVI/PDF file that corresponds to a certain line number in the (La)TeX
source file.
To enable this forward search, you can enter the command line of the
corresponding viewer either as command line for an user tool in the User
menu (User/User Commands/Edit…) or in the viewer command line in the
config dialog (“Options/Configure TeXstudio” -> “Commands”). When
the viewer is launched, the <strong>@</strong>-placeholder will be replaced by the
current line number and <strong>?c:ame</strong> by the complete absolute filename of
the current file. If your PDF file is not in the same directory as your
.tex file you can use the <strong>?p{pdf}:ame</strong> placeholder. For details see
<a class="reference internal" href="#command-syntax-in-detail">External Commands</a>.</p>
<p>On Windows, you can execute DDE commands by inserting a command of the
form: <code class="docutils literal notranslate"><span class="pre">dde:///service/control/[commands...]</span></code> or
<code class="docutils literal notranslate"><span class="pre">dde:///programpath:service/control/[commands...]</span></code> to start
the program if necessary.</p>
<p>Below you can find a list of commands for some common viewers. Of
course, you have to replace <em>(your program path)</em> with the path of the
program on your computer, if you want to use a command.</p>
<section id="sumatra">
<h4>Sumatra<a class="headerlink" href="#sumatra" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch Sumatra from TeXstudio and configure Sumatra for inverse search</dt><dd><p><code class="docutils literal notranslate"><span class="pre">"(your</span> <span class="pre">sumatra</span> <span class="pre">path)"</span> <span class="pre">-reuse-instance</span> <span class="pre">-inverse-search</span> <span class="pre">"\"*(your</span> <span class="pre">TeXstudio</span> <span class="pre">path)*\"</span> <span class="pre">\"%%f\"</span> <span class="pre">-line</span> <span class="pre">%%l"</span> <span class="pre">"?am.pdf"</span></code></p>
</dd>
<dt>Jump to a line in a running Sumatra (Windows only):</dt><dd><p><code class="docutils literal notranslate"><span class="pre">dde:///SUMATRA/control/[ForwardSearch("?am.pdf","?c:am.tex",@,0,0,1)]</span></code></p>
</dd>
<dt>Launch Sumatra if it is not running and jump to a line in it (Windows only)</dt><dd><p><code class="docutils literal notranslate"><span class="pre">dde:///(your</span> <span class="pre">sumatra</span> <span class="pre">path):SUMATRA/control/[ForwardSearch("?am.pdf","?c:am.tex",@,0,0,1)]</span></code></p>
</dd>
<dt>Launch TeXstudio from Sumatra</dt><dd><p><code class="docutils literal notranslate"><span class="pre">"(your</span> <span class="pre">TeXstudio</span> <span class="pre">path)"</span> <span class="pre">"%f"</span> <span class="pre">-line</span> <span class="pre">%l</span></code></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A possible value for <em>(your Sumatra path)</em> is <code class="docutils literal notranslate"><span class="pre">C:\Program</span> <span class="pre">Files\SumatraPDF\SumatraPDF.exe</span></code></p>
</div>
</section>
<section id="foxit-reader">
<h4>Foxit Reader<a class="headerlink" href="#foxit-reader" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch Foxit Reader from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">"(your</span> <span class="pre">Reader</span> <span class="pre">path)"</span> <span class="pre">"?am.pdf"</span></code></p>
</dd>
</dl>
</section>
<section id="acrobat-reader">
<h4>Acrobat Reader<a class="headerlink" href="#acrobat-reader" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch Acrobat Reader from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">"*(your</span> <span class="pre">Reader</span> <span class="pre">path)*"</span> <span class="pre">"?am.pdf"</span></code></p>
</dd>
</dl>
<p>Navigation and closing are achieved via DDE commands. Since version 10 of
the adobe products the DDE service name contains a letter for the
Product and the version number.</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Product</p></th>
<th class="head"><p>Service name</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Adobe Reader 9</p></td>
<td><p>acroview</p></td>
</tr>
<tr class="row-odd"><td><p>Adobe Acrobat 9</p></td>
<td><p>acroview</p></td>
</tr>
<tr class="row-even"><td><p>Adobe Reader 10</p></td>
<td><p>acroviewR10</p></td>
</tr>
<tr class="row-odd"><td><p>Adobe Acrobat 10</p></td>
<td><p>acroviewA10</p></td>
</tr>
<tr class="row-even"><td><p>Adobe Reader 11</p></td>
<td><p>acroviewR11</p></td>
</tr>
<tr class="row-odd"><td><p>Adobe Acrobat 11</p></td>
<td><p>acroviewA11</p></td>
</tr>
<tr class="row-even"><td><p>Adobe Reader DC</p></td>
<td><p>acroviewR15</p></td>
</tr>
<tr class="row-odd"><td><p>Adobe Acrobat DC</p></td>
<td><p>acroviewA15</p></td>
</tr>
</tbody>
</table>
</div>
<p>The following example is for Adobe Reader DC:</p>
<dl class="simple myst">
<dt>Jump to a position in a running Adobe Reader (Windows only)</dt><dd><p><code class="docutils literal notranslate"><span class="pre">dde:///acroviewR15/control/\[DocOpen(\"?am.pdf\")\]\[FileOpen(\"?am.pdf\")\]\[DocGotoNameDest(\"?am.pdf\",\"jump-position\")\]</span></code>
<em>jump-position can be defined with the hyperref package</em></p>
</dd>
</dl>
<p>If you have the problem that Adobe Reader does not open, you have to add
the program path like this: <code class="docutils literal notranslate"><span class="pre">dde:///"C:\Program</span> <span class="pre">Files</span> <span class="pre">(x86)\Adobe\Acrobat</span> <span class="pre">Reader</span> <span class="pre">DC\Reader\AcroRd32.exe":acroviewR15/control/[DocOpen("?am.pdf")][FileOpen("?am.pdf")][DocGotoNameDest("?am.pdf","jump-position")]</span></code></p>
<dl class="simple myst">
<dt>Close the document in a running Adobe Reader (Windows only)</dt><dd><p><code class="docutils literal notranslate"><span class="pre">dde:///acroviewR15/control/[DocOpen("?am.pdf")][FileOpen("?am.pdf")][DocClose("?am.pdf")]</span></code></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Since Adobe Reader blocks writing to PDFs which are open in the
Reader, you have to close the PDF before recompiling. You can define a
User Command for the above DDE-command and call it at the beginning of
your build chain. This ensures that the file will be closed and thus is
writable when compiling.</p>
</div>
</section>
<section id="yap-yet-another-previewer">
<h4>Yap (Yet Another Previewer)<a class="headerlink" href="#yap-yet-another-previewer" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch Yap from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">"(your</span> <span class="pre">Yap</span> <span class="pre">path)"</span> <span class="pre">-1</span> <span class="pre">-s</span> <span class="pre">@?c:m.tex</span> <span class="pre">%.dvi</span></code></p>
</dd>
<dt>Launch TeXstudio from Yap</dt><dd><p><code class="docutils literal notranslate"><span class="pre">"(your</span> <span class="pre">TeXstudio</span> <span class="pre">path)"</span> <span class="pre">"%f"</span> <span class="pre">-line</span> <span class="pre">%l</span></code></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A possible value for <em>(your Yap path)</em> is <code class="docutils literal notranslate"><span class="pre">C:\\Program</span> <span class="pre">Files\\MiKTeX</span> <span class="pre">2.7\\miktex\\bin\\yap.exe</span></code></p>
</div>
</section>
<section id="xdvi">
<h4>xdvi<a class="headerlink" href="#xdvi" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch xdvi from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">xdvi</span> <span class="pre">%.dvi</span> <span class="pre">-sourceposition</span> <span class="pre">@:?c:m.tex</span></code></p>
</dd>
<dt>Launch xdvi from TeXstudio and enable inverse search</dt><dd><p><code class="docutils literal notranslate"><span class="pre">xdvi</span> <span class="pre">-editor</span> <span class="pre">"texstudio</span> <span class="pre">%f</span> <span class="pre">-line\"</span> <span class="pre">%.dvi</span> <span class="pre">-sourceposition</span> <span class="pre">@:%.tex</span></code></p>
</dd>
</dl>
</section>
<section id="kdvi">
<h4>kdvi<a class="headerlink" href="#kdvi" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch kdvi from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">kdvi</span> <span class="pre">"file:%.dvi#src:@</span> <span class="pre">?c:m.tex"</span></code></p>
</dd>
</dl>
</section>
<section id="okular">
<h4>Okular<a class="headerlink" href="#okular" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch okular from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">okular</span> <span class="pre">--unique</span> <span class="pre">%.dvi#src:@</span> <span class="pre">?c:m.tex</span></code></p>
</dd>
<dt>Launch TeXstudio from Okular</dt><dd><p><code class="docutils literal notranslate"><span class="pre">texstudio</span> <span class="pre">%f</span> <span class="pre">-line</span> <span class="pre">%l</span></code></p>
</dd>
</dl>
</section>
<section id="skim">
<h4>Skim<a class="headerlink" href="#skim" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch Skim from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">(your</span> <span class="pre">Skim</span> <span class="pre">path)/Contents/SharedSupport/displayline</span> <span class="pre">@</span> <span class="pre">?am.pdf</span> <span class="pre">?c:ame</span></code></p>
</dd>
<dt>Launch TeXstudio from skim</dt><dd><p>Command <code class="docutils literal notranslate"><span class="pre">/applications/texstudio.app/contents/macos/texstudio</span></code>
with arguments: <code class="docutils literal notranslate"><span class="pre">"%file"</span> <span class="pre">-line</span> <span class="pre">%line</span></code></p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A possible value for <em>(your Skim path)</em> is <code class="docutils literal notranslate"><span class="pre">/Applications/Skim.app</span></code></p>
</div>
</section>
<section id="qpdfview">
<h4>qpdfview<a class="headerlink" href="#qpdfview" title="Link to this heading">#</a></h4>
<dl class="simple myst">
<dt>Launch qpdfview from TeXstudio</dt><dd><p><code class="docutils literal notranslate"><span class="pre">qpdfview</span> <span class="pre">--unique</span> <span class="pre">?am.pdf#src:?c:am.tex:@:0</span> <span class="pre">2></span> <span class="pre">/dev/null</span></code></p>
</dd>
<dt>Launch TeXstudio from qpdfview</dt><dd><p><code class="docutils literal notranslate"><span class="pre">texstudio</span> <span class="pre">"%1"</span> <span class="pre">-line</span> <span class="pre">%2</span></code></p>
</dd>
</dl>
</section>
</section>
</section>
<section id="configuring-the-build-system">
<h2>Configuring the build system<a class="headerlink" href="#configuring-the-build-system" title="Link to this heading">#</a></h2>
<p>TeXstudio provides general commands for translating latex.</p>
<p>The default settings use “pdflatex” and the internal pdf viewer. Other
commands and viewer can be selected as well as a different bibliography
translator.</p>
<p>The “embedded pdf viewer” does not open a new window for viewing the
pdf document but presents it directly next to the text in the editor.</p>
<p>A useful alternative might be using the “latexmk” as compile command
(if the command is installed on your system), as it handles dependencies
with biblatex and index very well.</p>
<p>The advanced options allows finer customization which is in general not
necessary.</p>
<p><img alt="Configure Build System" src="_images/configure_build.webp" /></p>
<p>User commands can be defined here by “adding” them. Each user command
has a name with a pattern <code class="docutils literal notranslate"><span class="pre"><command</span> <span class="pre">id>:<display</span> <span class="pre">name></span></code>, e.g.
<code class="docutils literal notranslate"><span class="pre">user0:User</span> <span class="pre">Command</span> <span class="pre">0</span></code>. The command id has to be unique and must not
contain spaces. In <a class="reference internal" href="#advanced-configuration-of-the-build-system">advanced mode</a>, you can reference it
using <code class="docutils literal notranslate"><span class="pre">txs:///<command</span> <span class="pre">id></span></code>. The display name will be shown in the
tools menu. The user commands can be activated either by short cut
(<code class="docutils literal notranslate"><span class="pre">alt+shift+F%n</span></code>) or by the tools menu (Tools/User).</p>
<p>User commands can either consist of a combination of known commands by
selecting them from a list of available commands. This is triggered by
clicking the spanner-symbol.</p>
<p>Alternatively a command can be directly selected through the file
system.</p>
<p><img alt="Configure user commands from known commands" src="_images/doc21.webp" /></p>
<section id="advanced-configuration-of-the-build-system">
<h3>Advanced configuration of the build system<a class="headerlink" href="#advanced-configuration-of-the-build-system" title="Link to this heading">#</a></h3>
<p>If you enable the advanced options, you can configure the build system
in more detail.</p>
<p>Every txs-command is a list of external programs/latex-commands and
other txs-commands to call. An external program can be called with its
usual command line, while a txs-command with id “foobar” is called by
<code class="docutils literal notranslate"><span class="pre">txs:///foobar</span></code>.</p>
<p>The commands in the list are separated by <code class="docutils literal notranslate"><span class="pre">|</span></code>, which is just a separator
(i.e. it will <strong>not</strong> pass the stdout from one program to the stdin of the
next).</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Use command lists only for the meta and user commands listed at
<em>Options -> Build</em>. Do not use them at <em>Options -> Commands</em>. The latter
should just be single commands (i.e. do not use <code class="docutils literal notranslate"><span class="pre">|</span></code> there). While it’s
currently working in some cases, generally we do not guarantee this
behavior. It can have surprising side effects such abortion of
compilation in some cases. Also, the use of <code class="docutils literal notranslate"><span class="pre">|</span></code> in <em>Commands</em> may be
prohibited completely without further notice in the future.</p>
</div>
<p>Each of these txs-command has a unique id, which is shown as tooltip of
the displayed name for “normal” commands and in the edit box for user
commands. Some important commands are usual: <code class="docutils literal notranslate"><span class="pre">txs:///quick</span></code> (Build & View,
the old quickbuild), <code class="docutils literal notranslate"><span class="pre">txs:///compile</span></code> (Default compiler), <code class="docutils literal notranslate"><span class="pre">txs:///view</span></code>
(Default viewer), <code class="docutils literal notranslate"><span class="pre">txs:///latex</span></code> (latex), <code class="docutils literal notranslate"><span class="pre">txs:///pdflatex</span></code> (pdflatex),
<code class="docutils literal notranslate"><span class="pre">txs:///view-pdf</span></code> (Default Pdf Viewer), <code class="docutils literal notranslate"><span class="pre">txs:///view-pdf-external</span></code> (External
pdf viewer).</p>
<p>For example, in a typical build configuration you might call
<code class="docutils literal notranslate"><span class="pre">txs:///quick</span></code> by pressing F1, which calls <code class="docutils literal notranslate"><span class="pre">txs:///compile</span></code>, which first
calls <code class="docutils literal notranslate"><span class="pre">txs:///pdflatex</span></code> that calls the actual pdflatex, and then calls
<code class="docutils literal notranslate"><span class="pre">txs:///view</span></code>, which calls <code class="docutils literal notranslate"><span class="pre">txs:///view-pdf</span></code>, which calls
<code class="docutils literal notranslate"><span class="pre">txs:///view-pdf-internal</span></code>, which displays the pdf.</p>
<p>There is no difference between commands defined as command on the
command config page, commands defined as build on the build config page,
or commands defined as user commands. They are just separated in the GUI
to simplify the interface.</p>
<p>This also means that you can change every command as you want, ignoring
its old definition (you could even change its id, when editing the ini
file.).</p>
<p>There are however three always defined internal commands, which can only
be called and not modified:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>command</p></th>
<th class="head"><p>description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///internal-pdf-viewer</span></code></p></td>
<td><p>Opens the internal viewer for the current document</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///view-log</span></code></p></td>
<td><p>Views the log file for the current document</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///conditionally-recompile-bibliography</span></code></p></td>
<td><p>Checks if the bib files have been modified, and calls <code class="docutils literal notranslate"><span class="pre">txs:///recompile-bibliography</span></code>, if that is the case</p></td>
</tr>
</tbody>
</table>
</div>
<p>The internal pdf viewer also accepts the following options
(txs:///internal-pdf-viewer) to modify its behavior:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>option</p></th>
<th class="head"><p>description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--embedded</span></code></p></td>
<td><p>Opens the viewer embedded</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--windowed</span></code></p></td>
<td><p>Opens the viewer windowed (default if no option is given)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--close-(all|windowed|embedded)</span></code></p></td>
<td><p>Close all open viewers, or just viewers of a specific kind</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--preserve-existing</span></code></p></td>
<td><p>Does not change any existing viewers (i.e. always opens a new one)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--preserve-(embedded|windowed)</span></code></p></td>
<td><p>Does not change any existing embedded/windowed viewers</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--preserve-duplicates</span></code></p></td>
<td><p>Only opens the pdf in the first opened viewer</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--(no-)auto-close</span></code></p></td>
<td><p>Determines whether the viewer should be closed, when the corresponding tex file is closed (default: auto-close iff embedded)</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--(no-)focus</span></code></p></td>
<td><p>Determines whether the viewer should be focused (default: focus iff windowed)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--(no-)foreground</span></code></p></td>
<td><p>Determines whether the viewer should be brought to front (default: foreground)</p></td>
</tr>
<tr class="row-odd"><td><p><em>filename</em></p></td>
<td><p>Determines the file to open. Like in other commands, <a class="reference internal" href="#configuring-the-latex-related-commands">file patterns</a> are supported. If this parameter is not provided, TXS uses <code class="docutils literal notranslate"><span class="pre">"?am.pdf"</span></code>, i.e. the absolute path of the main file. If the parameter is not an absolute filename, it is searched for in the directory of the main file as well as in <code class="docutils literal notranslate"><span class="pre">Options</span> <span class="pre">-></span> <span class="pre">Build</span> <span class="pre">-></span> <span class="pre">Build</span> <span class="pre">Options</span> <span class="pre">-></span> <span class="pre">Additional</span> <span class="pre">Search</span> <span class="pre">Paths</span> <span class="pre">-></span> <span class="pre">PDF</span> <span class="pre">Files</span></code></p></td>
</tr>
</tbody>
</table>
</div>
<p>It is also possible to modify the arguments of called subcommands with
argument modifiers or by adding a new argument. These modifiers are
passed through called lists, so it will always change the arguments of
the finally called program, even if the directly called subcommand is
just a wrapper around another command:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>command</p></th>
<th class="head"><p>description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///foobar</span> <span class="pre">--xyz</span></code></p></td>
<td><p>This will add the <code class="docutils literal notranslate"><span class="pre">xyz</span></code> option</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///foobar/[--xyz=123]</span></code></p></td>
<td><p>This will change the value of the <code class="docutils literal notranslate"><span class="pre">xyz</span></code> option to <code class="docutils literal notranslate"><span class="pre">123</span></code> (i.e. removing any <code class="docutils literal notranslate"><span class="pre">xyz</span></code> option defined in <code class="docutils literal notranslate"><span class="pre">foobar</span></code>)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///foobar/{--xyz=123}</span></code></p></td>
<td><p>This will remove <code class="docutils literal notranslate"><span class="pre">--xyz=123</span></code> from the <code class="docutils literal notranslate"><span class="pre">foobar</span></code> command line, ignoring <code class="docutils literal notranslate"><span class="pre">xyz</span></code> options with other values</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///foobar/{--xyz}</span></code></p></td>
<td><p>This will remove any <code class="docutils literal notranslate"><span class="pre">--xyz</span></code> option from the <code class="docutils literal notranslate"><span class="pre">foobar</span></code> command line, regardless of its value</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">txs:///foobar/{}</span></code></p></td>
<td><p>This will remove all options from the <code class="docutils literal notranslate"><span class="pre">foobar</span></code> command line, leaving only the name of the executable</p></td>
</tr>
</tbody>
</table>
</div>
<p>Finally, there are also hidden options, which can only be changed by
modifying the ini-file: Tools/Kind/LaTeX, Tools/Kind/Rerunnable,
Tools/Kind/Pdf, Tools/Kind/Stdout, Tools/Kind/Viewer, which give a list
of commands that are treated as latex compiler (e.g. show the log
afterwards), re-runnable (repeat command call, if there are warnings),
pdf generators (e.g. pdflatex), commands that prints to stdout (e.g.
bibtex), and viewers (e.g. only open once).</p>
</section>
<section id="details-of-the-execution-environment">
<h3>Details of the execution environment<a class="headerlink" href="#details-of-the-execution-environment" title="Link to this heading">#</a></h3>
<section id="environment-variables">
<h4>Environment Variables<a class="headerlink" href="#environment-variables" title="Link to this heading">#</a></h4>
<p>The environment variables available within the execution are the same as
the ones that are available in the context in which TeXstudio was
started. In particular this is true for the PATH. On Linux/OS X the PATH
may depend on the way you started TeXstudio. Programs started from the
GUI may have a different PATH setting than programs started from a shell
(because some variables may only defined in the context of a shell (e.g.
via <code class="docutils literal notranslate"><span class="pre">~/.bashrc</span></code>).</p>
<p>By default, TeXstudio parses environment variables in your commands. The
syntax is adapted to the according operating system. A variable MYVAR
would be written as <code class="docutils literal notranslate"><span class="pre">%MYVAR%</span></code> on Windows and <code class="docutils literal notranslate"><span class="pre">$MYVAR</span></code> on Linux and OS X.
Windows environment variables are case-insensitive, whereas they are
case-sensitive on Linux and OS X. Parsing of environment variables can
be deactivated in the Build section of the options.</p>
</section>
<section id="working-directory">
<h4>Working Directory<a class="headerlink" href="#working-directory" title="Link to this heading">#</a></h4>
<p>The working directory is set to the path of root document.</p>
</section>
<section id="shell-functionality">
<h4>Shell Functionality<a class="headerlink" href="#shell-functionality" title="Link to this heading">#</a></h4>
<p>All commands specified in the configuration (i.e. Commands and User
Commands) are executed directly. There is no shell involved. So most
shell functionality does not work.</p>
<section id="output-redirection">
<h5>Output Redirection<a class="headerlink" href="#output-redirection" title="Link to this heading">#</a></h5>
<p>TeXstudio provides limited output redirection capabilities. You can only
output to the message panel (<code class="docutils literal notranslate"><span class="pre">></span> <span class="pre">txs:///messages</span></code>) or suppress output
(<code class="docutils literal notranslate"><span class="pre">></span> <span class="pre">/dev/null</span></code>). The default setting depends on the command. The same
targets are allowed for stderr: <code class="docutils literal notranslate"><span class="pre">2></span> <span class="pre">txs:///messages</span></code>, <code class="docutils literal notranslate"><span class="pre">2></span> <span class="pre">/dev/null</span></code>.
Additionally, you can redirect to the same target as stdout by using
<code class="docutils literal notranslate"><span class="pre">2>&1</span></code>.</p>
<p>A typical use-case would be to suppress all output of a command:
<code class="docutils literal notranslate"><span class="pre">>/dev/null</span> <span class="pre">2>&1</span></code></p>
<p>Note: Instead of the Linux/Unix notation <code class="docutils literal notranslate"><span class="pre">></span> <span class="pre">/dev/null</span></code>, you may
alternatively use the Windows notation <code class="docutils literal notranslate"><span class="pre">></span> <span class="pre">nul</span></code>. Because these commands
are directly interpreted by TXS, both variants work on all operating
systems.</p>
</section>
<section id="using-other-shell-functionality">
<h5>Using other shell functionality<a class="headerlink" href="#using-other-shell-functionality" title="Link to this heading">#</a></h5>
<p>If you need shell functionality, you have to explicitly run a shell. You
can either do this directly in the user command:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sh -c "/path/to/testscript foo > bar"
</pre></div>
</div>
<p>or on Windows:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>cmd /C "/path/to/testscript.bat foo > bar"
</pre></div>
</div>
<p>Alternatively, you can call a wrapper script in the user command</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>/path/to/wrapperscript foo bar
</pre></div>
</div>
<p>and do the actual work inside the wrapper script:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>#!/bin/sh
# I am wrapperscript
/path/to/testscript $1 > $2
</pre></div>
</div>
</section>
</section>
</section>
</section>
<section id="configuring-the-language-set-up">
<h2>Configuring the language set-up<a class="headerlink" href="#configuring-the-language-set-up" title="Link to this heading">#</a></h2>
<p>TeXstudio supports language checking for spell-checking and grammar checking.
Further more a thesaurus is offered for selected languages.</p>
<p><img alt="Configure Language" src="_images/configure_language.webp" /></p>
<section id="configuring-the-spell-checker">
<h3>Configuring the spell checker<a class="headerlink" href="#configuring-the-spell-checker" title="Link to this heading">#</a></h3>
<p>TeXstudio offers an integrated spellchecker which can be used either via
a dialog or directly while typing. All text outside of LaTeX commands is
checked. Additionally, text in options of LaTeX commands is also
checked. TeXstudio determines if an option contains natural text and
thus should be spell checked by looking up its definition in the
completion word lists. For more information on completion word lists see
the section on <a class="reference internal" href="#configuring-the-autocompletion">completion</a> and the <a class="reference internal" href="background.html#description-of-the-cwl-format"><span class="std std-ref">description of the cwl format</span></a>.</p>
<p>TeXstudio comes with a large selection of dictionaries on Windows and MacOS.
On Linux the system offers Hunspell dictionaries and the corresponding languages should be installed from there.</p>
<p>The spell checker uses the Hunspell dictionary format, which is widely
used, e.g. in OpenOffice, LibreOffice and Firefox. Each dictionary
consists of two files (<code class="docutils literal notranslate"><span class="pre">.dic</span></code> and <code class="docutils literal notranslate"><span class="pre">.aff</span></code>). French, British and German
dictionaries are distributed with TeXstudio, on windows and osx a large number of languages is provided. You can add additional dictionaries yourself by placing them in the dictionary path. A
particularly convenient way to get additional dictionaries is
downloading a dictionary extension of
<a class="reference external" href="https://extensions.openoffice.org/de/search?f%5B0%5D=field_project_tags%3A157">OpenOffice</a>
or
<a class="reference external" href="https://extensions.libreoffice.org/?Tag%5B0%5D=50&amp;q=&amp;Tags%5B%5D=50">LibreOffice</a>
and importing them using the button <em>Import Dictionary</em> in the options.
The imported files are extracted into <code class="docutils literal notranslate"><span class="pre">[txs-settings-dir]/dictionaries</span></code>. If the imported file uses subfolders, you need to find the corresponding folder and put it into “Spelling Dictionaries Directories” field.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Linux distributions usually offer a wide range of hunspell dictionaries which can be used.
The actual dictionaries are usually stored under <code class="docutils literal notranslate"><span class="pre">/usr/share/hunspell</span></code></p>
<p>On OSX, by default the dictionary path should be <code class="docutils literal notranslate"><span class="pre">[txs-app-dir]/../Resources</span></code>.
On Windows, by default the dictionary path should be <code class="docutils literal notranslate"><span class="pre">[txs-app-dir]/dictionaries"</span></code>.</p>
</div>
<p>You can specify one or more search paths for the dictionaries in the
options. Multiple paths need to be separated by a semicolon. With the
paths you can use the special strings <code class="docutils literal notranslate"><span class="pre">[txs-app-dir]</span></code> and
<code class="docutils literal notranslate"><span class="pre">[txs-settings-dir]</span></code>. These are expanded to the path of the executable
and the config file (<code class="docutils literal notranslate"><span class="pre">texstudio.ini</span></code>) respectively. This expansion is
particularly useful if you use a portable version on a USB stick in
which the actual location of the program may depend on the computer you
are using.</p>
<p><img alt="Spellcheck Options" src="_images/spellcheck_options.webp" /></p>
<p>To make life easy TeXstudio lets you choose a preferred language for the
spell checker. However, if you frequently work with files in different
languages you may want to override the default behavior. This can be
done in two ways. First you can specify the language of the file via the
language menu in the status line. This setting will be lost as soon as
the file is closed. To permanently save the language of the file,
TeXstudio supports a special “magic comment”
<code class="docutils literal notranslate"><span class="pre">%</span> <span class="pre">!TeX</span> <span class="pre">spellcheck</span> <span class="pre">=</span> <span class="pre">de_DE</span></code>. If this comment is present in a file, its
language is automatically set when the file is loaded.</p>
<p><img alt="Spellcheck Menu" src="_images/spellcheck_menu.webp" /></p>
<p>Since the internal structure of the dictionaries is complex (e.g.
contains rules on how to generate a word with different inflections), it
is not possible to simply add words to the dictionary. Instead if a word
is missing in the dictionary, you can add it to an ignore list, so that
the spell checker won’t complain about it. The ignore list is normally
saved in the same directory as the dictionary. It’s a plain text file
with the extension .ign. If this isn’t possible (e.g. missing access
rights) the list is stored in the user configuration directory.</p>
</section>
<section id="configuring-the-thesaurus">
<h3>Configuring the thesaurus<a class="headerlink" href="#configuring-the-thesaurus" title="Link to this heading">#</a></h3>
<p>The thesaurus uses OpenOffice.org 2.x databases. Only GPL French and
US-English and German databases are distributed with TeXstudio.</p>
<p>Users can download others databases here :
<a class="reference external" href="http://wiki.services.openoffice.org/wiki/Dictionaries">http://wiki.services.openoffice.org/wiki/Dictionaries</a></p>
<p>The active thesaurus needs to be directly selected here. It does not synchronize with the selected spelling language.</p>
<p><img alt="Thesaurus selection" src="_images/conf_thesaurus.webp" /></p>
</section>
<section id="configuring-the-grammar-checker">
<h3>Configuring the grammar checker<a class="headerlink" href="#configuring-the-grammar-checker" title="Link to this heading">#</a></h3>
<p>The grammar checker is based on the standard http API of
<a class="reference external" href="http://www.languagetool.org/">LanguageTool</a>, and requires a separate
<a class="reference external" href="https://dev.languagetool.org/http-server">installation of LanguageTool</a> and java.</p>
<p>Once LanguageTool is installed, you can try it by starting the
LanguageTool standalone application, and start TeXstudio afterward.
LanguageTool then creates a locally running server at the address
<code class="docutils literal notranslate"><span class="pre">http://localhost:8081/</span></code> and TeXstudio automatically connects to it at
startup. When the connection is established, all typed paragraphs are
send to LT and after a short delay the possible grammar errors are
highlighted.</p>
<p>To automatically start LanguageTool with TeXstudio, you need to enter
the path to LT jar in the grammar page of the config dialog. If the java
executable is not in the default PATH, you also need to set the path to
it there.</p>
<p><img alt="LT settings" src="_images/conf_LT.webp" /></p>
<p>In the advanced config mode, you can also mark certain LT rules as
“special” whose matches will then be highlighted in a
different/customizable way. This can be useful to do a stylistic
analysis, e.g. by creating an own rule in LT highlighting all verbs or
all adverbs.</p>
<p><img alt="advanced LT rules" src="_images/conf_LT_adv.webp" /></p>
<p>Independent from LanguageTool, TeXstudio also checks for repeated and
bad (imprecise/slang) words. For this it needs a list of those words which need to be provided in the “Wordlist Directory” with the name “<em>language_code</em>.badWords”</p>
<p>The repetition check looks several words behind and marks repetition of short words in the immediate vicinity and repetition of long words up to 10 words before. These distances and
lengths can be changed in the advanced grammar config page.</p>
<p><img alt="Internal grammar check" src="_images/conf_grammar_internal.webp" /></p>
</section>
</section>
<section id="configuring-the-autocompletion">
<h2>Configuring the autocompletion<a class="headerlink" href="#configuring-the-autocompletion" title="Link to this heading">#</a></h2>
<p>TeXstudio has taken up completion word lists from Kile which extended
the number of known commands for completion considerably. TeXstudio
understands the use of <code class="docutils literal notranslate"><span class="pre">\documentclass</span></code> and <code class="docutils literal notranslate"><span class="pre">\usepackage</span></code> in order to
select valid lists of commands for completion as well as syntax
checking.</p>
<p>Concerning auto completion, TeXstudio allows one to adapt the behavior
to your liking. The following options are available:</p>
<ul class="simple">
<li><p>Automatically start completer …: the completer is automatically invoked when \<em>letter</em> is typed.</p></li>
<li><p>Auto replace Latex-Commands: when completing a command on a command, i.e. there are letters behind the cursor, these letters are removed and replaced by the new command completely.</p></li>
<li><p>Enable ToolTip-Help: show tool tips on selected latex commands in
the completion list.</p></li>
<li><p>Enable ToolTip-Preview: show tool tips with a preview of the completion, e.g. images in case of filenames, the surrounding text in case of references, etc.</p></li>
<li><p>Auto insert Math… : when inserting a math-symbol (e.g. a greek symbol) outside a math environment, txs automatically adds $ before and after that command.</p></li>
<li><p>Preferred command set: selects the tab of the completer when opening it anew, see <a class="reference internal" href="editing.html#auto-completion"><span class="std std-ref">section</span></a>.</p></li>
</ul>
<p>If your favorite package is not yet present for completion (and syntax
checking), you can provide a list of your own by placing a file
“packagename.cwl” in the <a class="reference external" href="https://github.com/texstudio-org/texstudio/wiki/Frequently-Asked-Questions#where-are-the-settings-stored">config directory</a>.
This directory is placed in ~/.config/texstudio under Linux and usually
“c:\Documents and Settings/User/AppData/Roaming/texstudio” under
Windows. Basically the file contains a list of valid commands. A
description of the exact format and an example are given in the
<a class="reference internal" href="background.html#description-of-the-cwl-format"><span class="std std-ref">appendix</span></a>.</p>