-
Notifications
You must be signed in to change notification settings - Fork 3
/
background.html
1121 lines (1082 loc) · 81.3 KB
/
background.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="Background information" />
<meta property="og:type" content="website" />
<meta property="og:url" content="background.html" />
<meta property="og:site_name" content="TeXstudio" />
<meta property="og:description" content="About documents separated in several files: LaTeX documents may be spread over multiple files. TeXstudio automatically understands parent/child relations of loaded documents. This includes the dete..." />
<meta name="description" content="About documents separated in several files: LaTeX documents may be spread over multiple files. TeXstudio automatically understands parent/child relations of loaded documents. This includes the dete..." />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="CHANGELOG" href="CHANGELOG.html" /><link rel="prev" title="Configuring TeXstudio" href="configuration.html" />
<link rel="shortcut icon" href="_static/texstudio.ico"/><!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Background information - 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"><a class="reference internal" href="configuration.html">Configuring TeXstudio</a></li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">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="background-information">
<h1>Background information<a class="headerlink" href="#background-information" title="Link to this heading">#</a></h1>
<!--
ini file / reset to default
profile
-->
<section id="about-documents-separated-in-several-files">
<h2>About documents separated in several files<a class="headerlink" href="#about-documents-separated-in-several-files" title="Link to this heading">#</a></h2>
<p>LaTeX documents may be spread over multiple files. TeXstudio
automatically understands parent/child relations of loaded documents.
This includes the detection of the root document and knowledge on
defined labels and commands.</p>
<section id="root-document">
<h3>Root Document<a class="headerlink" href="#root-document" title="Link to this heading">#</a></h3>
<p>The root document is the top-most file in a multi-file document. For a
single-file document this is the file itself. By default, all calls to
LaTeX will be performed on the root document except if a class <code class="docutils literal notranslate"><span class="pre">subfiles</span></code> is used. Then the next higher file with that document-class is compiled.</p>
<p>TeXstudio automatically detects the root document. If that does not
work, you can place a magic comment <code class="docutils literal notranslate"><span class="pre">%</span> <span class="pre">!TeX</span> <span class="pre">root</span> <span class="pre">=</span> <span class="pre">root-filename</span></code> at the
top of your included files.</p>
<p>As a last resort, you may set an <em>explicit root document</em> via
<code class="docutils literal notranslate"><span class="pre">Options</span> <span class="pre">-></span> <span class="pre">Root</span> <span class="pre">Document</span> <span class="pre">-></span> <span class="pre">Set</span> <span class="pre">Current</span> <span class="pre">Document</span> <span class="pre">As</span> <span class="pre">Explicit</span> <span class="pre">Root</span></code>.
This setting takes absolute precedence. All the commands of the
“Tools” menu will be called on this document (to be more precise, the
build system will expand the placeholder <code class="docutils literal notranslate"><span class="pre">%</span></code> to the root document), no
matter which document is active in the editor. Additionally, labels and
user-commands which are defined in any open document, can be used for
completion in any open document.</p>
<p>In earlier versions, the <em>explicit root document</em> was somewhat
misleadingly called <em>master document</em>.</p>
</section>
<section id="loaded-documents">
<h3>Loaded Documents<a class="headerlink" href="#loaded-documents" title="Link to this heading">#</a></h3>
<p>Obviously, TeXstudio can only use information (defined commands, labels,
document hierarchy, etc.) that it is aware of. We use the information in
all opened files, but if a label in a multi-file document is defined in
a not-loaded files, TeXstudio does not know about it and will mark it as
missing in references. To remedy this, you can just open the
corresponding file as well.</p>
<p>TeXstudio has an advanced option
<code class="docutils literal notranslate"><span class="pre">Editor</span> <span class="pre">-></span> <span class="pre">Automatically</span> <span class="pre">load</span> <span class="pre">included</span> <span class="pre">files</span></code>.
TeXstudio will automatically load and parse all files of
multi-file-documents as soon as one of the files is opened. You may have
to set the magic comment <code class="docutils literal notranslate"><span class="pre">%</span> <span class="pre">!TeX</span> <span class="pre">root</span> <span class="pre">=</span> <span class="pre">root-filename</span></code> if you do not
have the root document open. With this option enabled TeXstudio will
always know about your complete document and act accordingly when
performing highlighting or completion.</p>
<p>The option <code class="docutils literal notranslate"><span class="pre">Editor</span> <span class="pre">-></span> <span class="pre">Cache</span> <span class="pre">documents</span> <span class="pre">for</span> <span class="pre">faster</span> <span class="pre">reopening</span></code> lets txs store important information about opened files on the disk.
If the files are reopened, it uses the cached information to speed-up loading. Only if a file is explicitly opened in a tab, txs loads the complete file from disk.
In cached files, txs does not search, e.g. with find usages or find in project. The preview for labels does not work if the label is defined in a cached file. If that functionality is important for you, deactivate caching or load explicitly the files when needed.</p>
</section>
</section>
<section id="overview-of-texstudio-command-line-options">
<h2>Overview of TeXstudio command-line options<a class="headerlink" href="#overview-of-texstudio-command-line-options" title="Link to this heading">#</a></h2>
<p><code class="docutils literal notranslate"><span class="pre">texstudio</span> <span class="pre">file</span> <span class="pre">[--config</span> <span class="pre">DIR]</span> <span class="pre">[--root]</span> <span class="pre">[--line</span> <span class="pre">xx[:cc]]</span> <span class="pre">[--insert-cite</span> <span class="pre">citation]</span> <span class="pre">[--start-always]</span> <span class="pre">[--pdf-viewer-only]</span> <span class="pre">[--page</span> <span class="pre">yy]</span> <span class="pre">[--no-session]</span></code></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">--config</span> <span class="pre">DIR</span></code></p></td>
<td><p>use the specified settings directory.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--ini-file</span> <span class="pre">FILE</span></code></p></td>
<td><p><em>deprecated</em>: use <code class="docutils literal notranslate"><span class="pre">--config</span></code> instead.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--texpath</span></code></p></td>
<td><p>option to specify a path to search for the TeX binaries</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--root</span></code></p></td>
<td><p>defines the document as <em>explicit root document</em> (formerly called <em>master document</em>).</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--master</span></code></p></td>
<td><p><em>deprecated</em>: use <code class="docutils literal notranslate"><span class="pre">--root</span></code> instead.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--line</span> <span class="pre">xx[:cc]</span></code></p></td>
<td><p>position the cursor at line LINE and column COL, e.g. “–line 2:5” will jump to column 5 in line 2.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--insert-cite</span> <span class="pre">citation</span></code></p></td>
<td><p>pushes a bibtex key to TeXstudio, that will be inserted at the cursor position. This is intended as an interface for external bibliography managers to push citations to TeXstudio. You may either pass an (also custom) command like \mycite{key} or just the key. In the latter case, it is expanded to \cite{key}. Also comma separated key-lists are supported. TeXstudio recognizes, if the cursor is already within a citation macro. If so, only the key is inserted at an appropriate position, otherwise the full citation command is inserted.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--start-always</span></code></p></td>
<td><p>start a new instance, even if TXS is already running. This allows using of multiple instances.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--pdf-viewer-only</span></code></p></td>
<td><p>run as a standalone pdf viewer without an editor</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--page</span></code></p></td>
<td><p>display a certain page in the pdf viewer</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--no-session</span></code></p></td>
<td><p>do not load/save the session at startup/close</p></td>
</tr>
</tbody>
</table>
</div>
<p>Additional options only available in debug versions of TeXstudio:</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">--disable-tests</span></code></p></td>
<td><p>Prevent running any tests.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--execute-tests</span></code></p></td>
<td><p>Force running the most common tests.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--execute-all-tests</span></code></p></td>
<td><p>Force running all tests.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--update-translations</span></code></p></td>
<td><p>generate file <code class="docutils literal notranslate"><span class="pre">additionaltranslation.cpp</span></code>which contains translatable string from <code class="docutils literal notranslate"><span class="pre">uiconfig.xml</span></code>.</p></td>
</tr>
</tbody>
</table>
</div>
<p>Note: The most common tests are run automatically, if there were changes
to the executable (i.e. TXS has been compiled since the last run).
Furthermore all tests are run once a week.</p>
</section>
<section id="description-of-the-cwl-format">
<h2>Description of the cwl format<a class="headerlink" href="#description-of-the-cwl-format" title="Link to this heading">#</a></h2>
<p>cwl stands for completion word list and is a file format originally used
in Kile to define the commands listed in the completer. TeXstudio uses
an extended format of cwls to include additional semantic information
and allow for cursor and placeholder placement. It uses them for the
following purposes:</p>
<ul class="simple">
<li><p>Populating the autocompletion</p></li>
<li><p>Knowledge on the valid commands in the current document (depending
on \usepackage statements)</p></li>
<li><p>Semantic information that provide additional context in the editor;
e.g. a \ref-like command will check for the existence of the
referenced label</p></li>
</ul>
<section id="cwl-file-format">
<h3>cwl file format<a class="headerlink" href="#cwl-file-format" title="Link to this heading">#</a></h3>
<p>Each line of a cwl file defines a command. Comment lines are possible
and start with <code class="docutils literal notranslate"><span class="pre">#</span></code>. The command syntax is</p>
<p><code class="docutils literal notranslate"><span class="pre"><command>[#classification]</span></code></p>
<p>If no classification is given, the command is considered valid at any
position in a LaTeX document. The char <code class="docutils literal notranslate"><span class="pre">#</span></code> cannot be used inside a
<code class="docutils literal notranslate"><span class="pre">command</span></code>, as it has special meaning:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">#include:<packagename></span></code> (at start of line): also load
packagename.cwl. This should be used to indicate that a package
depends on other packages.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#repl:<search></span> <span class="pre"><replacement></span></code> (at start of line): define a letter
replacement, e.g. “a -> ä for German. Only used for letter
replacement in spell checking (babel)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#keyvals:<command[,command,...]></span></code> (at start of line): start
definition of keyvals for <code class="docutils literal notranslate"><span class="pre">command</span></code>, see graphicx.cwl in source
code. To specify possible values for keys, add them after # e.g.
<code class="docutils literal notranslate"><span class="pre">mode=#text,math</span></code><br />
Instead of single keys/values, complete special lists can be given,
e.g. <code class="docutils literal notranslate"><span class="pre">color=#%color</span></code>, see also tikz.cwl.<br />
<code class="docutils literal notranslate"><span class="pre">command</span></code> can consist of two parts, e.g. \documentclass/thesis
which is only valid when the command \documentclass uses thesis as
argument.<br />
If #c is added, the keyvals are only used for completion, not for
syntax checking<br />
If ##L is added to a key, a length is expected as argument.<br />
If ##l is added to a key, the argument is defining a label. (see
listings.cwl)<br />
If ##d is added to a key, the argument is treated same like command definition,i.e. no syntax check. (see
listings.cwl)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#endkeyvals</span></code> (at start of line): end definition of keyvals, see
graphicx.cwl in source code</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#ifOption:<option></span></code> (at start of line): the following block is only
loaded if <option> was used in the usepackage command, e.g.
\usepackage[svgnames]{color} -> option=svgnames</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#endif</span></code> (at start of line): end conditional block</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#</span></code> (at start of line with the exception of <code class="docutils literal notranslate"><span class="pre">#include</span></code>, <code class="docutils literal notranslate"><span class="pre">#repl</span></code>,
<code class="docutils literal notranslate"><span class="pre">#keyvals</span></code> or <code class="docutils literal notranslate"><span class="pre">#endkeyvals</span></code>): This line is a comment and will be
ignored.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">#</span></code> (in the middle of a line): Separates the command from the
classification</p></li>
</ul>
<p>cwl files should be encoded as UTF-8.</p>
</section>
<section id="command-format">
<h3>Command format<a class="headerlink" href="#command-format" title="Link to this heading">#</a></h3>
<p>In its simplest form the command is just a valid LaTeX expression as you
find it in the documentation, e.g. <code class="docutils literal notranslate"><span class="pre">\section{title}</span></code>. By default, every
option is treated as a placeholder. Alternatively, you may either just
define a stop position for the cursor by <code class="docutils literal notranslate"><span class="pre">%|</span></code> (Example:
<code class="docutils literal notranslate"><span class="pre">\left(%|\right)</span></code>) or use <code class="docutils literal notranslate"><span class="pre">%<</span> <span class="pre">%></span></code> to mark only part of an option as
placeholder (Example: <code class="docutils literal notranslate"><span class="pre">\includegraphics[scale=%<1%>]{file}</span></code>). New lines
can be included in a command by <code class="docutils literal notranslate"><span class="pre">%\</span></code>.</p>
<section id="argument-names">
<h4>Argument Names<a class="headerlink" href="#argument-names" title="Link to this heading">#</a></h4>
<p>The argument names are visible in the completer window and after
completion as placeholders in the editor. In general, you are free to
name the arguments as you like. We encourage to provide meaningful names
e.g. <code class="docutils literal notranslate"><span class="pre">\parbox[position]{width}{text}</span></code> instead of
<code class="docutils literal notranslate"><span class="pre">\parbox[arg1]{arg2}{arg3}</span></code>.</p>
<p>There are a few argument names that have special meaning:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">text</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%text</span></code>: The spellchecker will operate inside
this argument (by default arguments are not spellchecked).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">title</span></code>, ends with <code class="docutils literal notranslate"><span class="pre">%title</span></code>, <code class="docutils literal notranslate"><span class="pre">short</span> <span class="pre">title</span></code> or ends with
<code class="docutils literal notranslate"><span class="pre">%short</span> <span class="pre">title</span></code>: The spellchecker will operate inside this argument
(by default arguments are not spellchecked). Furthermore the
argument will be set in bold text (like in section).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">bibid</span></code> and <code class="docutils literal notranslate"><span class="pre">keylists</span></code>: If used in a command classified as “C”.
See the classifier description below.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cmd</span></code> and <code class="docutils literal notranslate"><span class="pre">command</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%cmd</span></code>: definition for command,
e.g. \newcommand{cmd}. This “cmd” will considered to have no
arguments and convey no functionality.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">def</span></code> and <code class="docutils literal notranslate"><span class="pre">definition</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%definition</span></code>: actual definition
for command, e.g. \newcommand{cmd}{definition}. This “definition”
will ignored for syntax check.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">args</span></code>: number of arguments for command, e.g.
\newcommand{cmd}[args]{definition}.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">package</span></code>: package name, e.g. \usepackage{package}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">citekey</span></code>: definition of new citation key name, e.g.
\bibitem{citekey}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">title</span></code> and <code class="docutils literal notranslate"><span class="pre">short</span> <span class="pre">title</span></code>: section name, e.g. \section[short
title]{title}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">color</span></code>: color name, e.g. \textcolor{color}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">width</span></code>, <code class="docutils literal notranslate"><span class="pre">length</span></code>, <code class="docutils literal notranslate"><span class="pre">height</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%l</span></code>: width or length
option e.g. \abc{size%l}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cols</span></code> and <code class="docutils literal notranslate"><span class="pre">preamble</span></code>: columns definition in tabular, etc., e.g.
\begin{tabular}{cols}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">file</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%file</span></code>: file name</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">URL</span></code>: URL</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">options</span></code>: package options, e.g. \usepackage[options]</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">imagefile</span></code>: file name of an image</p></li>
<li><p>ends with <code class="docutils literal notranslate"><span class="pre">%todo</span></code>: The argument is highlighted as todo. Note: To add
the element to the todo list in the structure panel, you have to
additionally add the classifier <code class="docutils literal notranslate"><span class="pre">D</span></code>. See todonotes.cwl for an
example.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">key</span></code>, <code class="docutils literal notranslate"><span class="pre">key1</span></code>, and <code class="docutils literal notranslate"><span class="pre">key2</span></code>: label/ref key</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">label</span></code> with option <code class="docutils literal notranslate"><span class="pre">#r</span></code> or key ending with <code class="docutils literal notranslate"><span class="pre">%ref</span></code>: ref key</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">label</span></code> with option <code class="docutils literal notranslate"><span class="pre">#l</span></code> or key ending with <code class="docutils literal notranslate"><span class="pre">%labeldef</span></code>: defines a
label</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">labellist</span></code>: list of labels as employed by cleveref</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">bib</span> <span class="pre">file</span></code> and <code class="docutils literal notranslate"><span class="pre">bib</span> <span class="pre">files</span></code>: bibliography file</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">class</span></code>: document class</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">placement</span></code> and <code class="docutils literal notranslate"><span class="pre">position</span></code>: position of env</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">%plain</span></code>: options ending with <code class="docutils literal notranslate"><span class="pre">%plain</span></code> are interpreted to have no
special meaning. This way, you can e.g. define <code class="docutils literal notranslate"><span class="pre">label%plain</span></code> to have
a placeholder named <code class="docutils literal notranslate"><span class="pre">label</span></code> without the semantics that it defines a
label.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">beamertheme</span></code>: beamer theme, e.g. \usebeamertheme{beamertheme}</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">keys</span></code>, <code class="docutils literal notranslate"><span class="pre">keyvals</span></code>, <code class="docutils literal notranslate"><span class="pre">%<options%></span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%keyvals</span></code>: key/value
list</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">envname</span></code>, <code class="docutils literal notranslate"><span class="pre">environment</span> <span class="pre">name</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%envname</span></code>: environment
name for \newtheorem, e.g. \newtheorem{envname}#N (classification
N needs to be present!)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">verbatimSymbol</span></code>: verbatim argument, e.g. <code class="docutils literal notranslate"><span class="pre">\verb|%<text%>|</span></code> and
<code class="docutils literal notranslate"><span class="pre">\verb{verbatimSymbol}#S</span></code> from latex-document.cwl in source code.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">formula</span></code> or ends with <code class="docutils literal notranslate"><span class="pre">%formula</span></code>: The argument is always treated as
if in math-mode. See chemformula.cwl for an example.</p></li>
<li><p>ends with <code class="docutils literal notranslate"><span class="pre">%special</span></code>: special argument which relates to data defined via special definition, see classifier ‘s’. The database is the text before <code class="docutils literal notranslate"><span class="pre">%</span></code>.</p></li>
<li><p>ends with <code class="docutils literal notranslate"><span class="pre">%specialDef</span></code>: special argument which defines data for a database, see classifier ‘s’.</p></li>
</ul>
<p>A %-suffix takes precedence over detection by name, i.e. an argument
<code class="docutils literal notranslate"><span class="pre">file%text</span></code> will be treated as text not as file.</p>
</section>
</section>
<section id="classification-format">
<h3>Classification format<a class="headerlink" href="#classification-format" title="Link to this heading">#</a></h3>
<p>The following classifications are known to TXS:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Classifier</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>*</p></td>
<td><p>unusual command which is used for completion only in with the “all” tab. This marker may be followed by other classifications.</p></td>
</tr>
<tr class="row-odd"><td><p>S</p></td>
<td><p>do not show in completer at all. This marker may be followed by other classifications.</p></td>
</tr>
<tr class="row-even"><td><p>M</p></td>
<td><p>do not use this as command description.</p></td>
</tr>
<tr class="row-odd"><td><p>m</p></td>
<td><p>valid only in math environment</p></td>
</tr>
<tr class="row-even"><td><p>t</p></td>
<td><p>valid only in tabular environment (or similar)</p></td>
</tr>
<tr class="row-odd"><td><p>T</p></td>
<td><p>valid only in tabbing environment</p></td>
</tr>
<tr class="row-even"><td><p>n</p></td>
<td><p>valid only in text environment (i.e. not math env)</p></td>
</tr>
<tr class="row-odd"><td><p>r</p></td>
<td><p>this command declares a reference like “\ref{key}”</p></td>
</tr>
<tr class="row-even"><td><p>c</p></td>
<td><p>this command declares a citation like “\cite{key}”</p></td>
</tr>
<tr class="row-odd"><td><p>C</p></td>
<td><p>this command declares a complex citation like “\textcquote{bibid}{text}”. The key needs to be given as <code class="docutils literal notranslate"><span class="pre">bibid</span></code></p></td>
</tr>
<tr class="row-even"><td><p>l</p></td>
<td><p>this command declares a label like “\label{key}”</p></td>
</tr>
<tr class="row-odd"><td><p>d</p></td>
<td><p>this command declares a definition command like “\newcommand{cmd}{def}”</p></td>
</tr>
<tr class="row-even"><td><p>g</p></td>
<td><p>this command declares an include graphics command like “\includegraphics{file}”</p></td>
</tr>
<tr class="row-odd"><td><p>i</p></td>
<td><p>this command declares an include file command like “\include{file}”</p></td>
</tr>
<tr class="row-even"><td><p>I</p></td>
<td><p>this command declares an import file command like “\import{path}{file}”</p></td>
</tr>
<tr class="row-odd"><td><p>u</p></td>
<td><p>this command declares an used package like “\usepackage{package}”</p></td>
</tr>
<tr class="row-even"><td><p>b</p></td>
<td><p>this command declares a bibliography like “\bibliography{bib}”</p></td>
</tr>
<tr class="row-odd"><td><p>U</p></td>
<td><p>this command declares a url command like “\url{URL}, where URL is not checked”</p></td>
</tr>
<tr class="row-even"><td><p>K</p></td>
<td><p>this command declares a bracket-like command like “\big{”</p></td>
</tr>
<tr class="row-odd"><td><p>D</p></td>
<td><p>this command declares a todo item (will be added to the todo list in the side panel). Note: To highlight the item in the editor, you have to additionally add the suffix <code class="docutils literal notranslate"><span class="pre">%todo</span></code>. See todonotes.cwl for an example.</p></td>
</tr>
<tr class="row-even"><td><p>B</p></td>
<td><p>this command declares a color (will be used for color completion only, no syntax checking)</p></td>
</tr>
<tr class="row-odd"><td><p>s</p></td>
<td><p>this command declares a special definition, the definition class is given after a “#”. The class name needs a preceding %. (e.g. %color), also see the examples below. Data is inserted again in <code class="docutils literal notranslate"><span class="pre">%special</span></code> argument or via keyvals.</p></td>
</tr>
<tr class="row-even"><td><p>V</p></td>
<td><p>this command declares a verbatim-like environment “\begin{Verbatim}”</p></td>
</tr>
<tr class="row-odd"><td><p>N</p></td>
<td><p>this command declares a newtheorem-like command like “\newtheorem{envname}”</p></td>
</tr>
<tr class="row-even"><td><p>L0 to L5</p></td>
<td><p>this command declares a structure command. The level is between L0 (<code class="docutils literal notranslate"><span class="pre">\part</span></code>-like) down to L5 (<code class="docutils literal notranslate"><span class="pre">\subparagraph</span></code>-like). Structure commands are highlighted in the code, can be folded and appear in the structure outline.</p></td>
</tr>
<tr class="row-odd"><td><p>/env1,env2,…</p></td>
<td><p>valid only in environment env1 or env2 etc.</p></td>
</tr>
<tr class="row-even"><td><p>\env</p></td>
<td><p>environment alias, means that the environment is handled like the “env” environment. This is useful for env=math or tabular.</p></td>
</tr>
</tbody>
</table>
</div>
<p>Examples:</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Line</p></th>
<th class="head"><p>Explanation</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">#</span> <span class="pre">test</span></code></p></td>
<td><p>comment</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">\typein{msg}#*</span></code></p></td>
<td><p>unusual command which is only shown in completion “all”</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">\sqrt{arg}#m</span></code></p></td>
<td><p>only in math mode valid</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">\pageref{key}#r</span></code></p></td>
<td><p>declares a reference command which is used correctly for completion</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">\vector(xslope,yslope){length}#*/picture</span></code></p></td>
<td><p>unusual command which is valid only in the picture environment</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">\begin{align}#\math</span></code></p></td>
<td><p>declares that the “align”-environment is handled like a math-env, concerning command validity and syntax highlighting!</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">\definecolor{name%specialDef}{model}{color-spec}#s#%color</span></code></p></td>
<td><p>adds <code class="docutils literal notranslate"><span class="pre">name</span></code> to the special list <code class="docutils literal notranslate"><span class="pre">%color</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">\color{color%special}</span></code></p></td>
<td><p>insert element from special list <code class="docutils literal notranslate"><span class="pre">%color</span></code> (here used as example)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">\myplot{file}{label}{params}#l</span></code></p></td>
<td><p>defines the second argument as label. Note: the argument has to be named <code class="docutils literal notranslate"><span class="pre">label</span></code> for this to work.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">\myplot{file}{customname%labeldef}</span></code></p></td>
<td><p>defines the second argument as label, but you are free to choose the name <code class="docutils literal notranslate"><span class="pre">customname</span></code> which will be used as a placeholder in the completer.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">\myplot{file}{label1%labeldef}{label2%labeldef}</span></code></p></td>
<td><p>defines the second and third arguments as labels.</p></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="cwl-guidelines">
<h3>cwl guidelines<a class="headerlink" href="#cwl-guidelines" title="Link to this heading">#</a></h3>
<p>Though TeXstudio can automatically create cwls from packages, these
autogenerated cwls do not contain meaningful argument names and no
classification of commands. Therefore we ship hand-tuned cwls for many
packages. We encourage users to contribute new cwl files. These should
have the following attributes:</p>
<ul class="simple">
<li><p><strong>package-based:</strong> Each cwl should correspond to a package. The
exception are some cwls containing fundamental (La)TeX commands, but
we’ve already written them so you should not have to bother. The
cwl should be named like the package so that automatic loading
works. If you <code class="docutils literal notranslate"><span class="pre">\usepackage{mypackage}</span></code> TeXstudio will load
mypackage.cwl if available.</p></li>
<li><p><strong>complete:</strong> The cwl should contain all commands in the package. If
you use a non-specified command in the editor, the syntax-checker
will mark it as unknown.</p></li>
<li><p><strong>specific:</strong> The commands should be classified if possible. This
allows TeXstudio to give additional context to the command (e.g.
warn if a math command is used outside of a math environment or
check references and citations.</p></li>
<li><p><strong>prioritized:</strong> Some packages may specify very many commands. Mark
the unusual ones by the *-classifier to prevent the completer from
overcrowding with rarely used commands.</p></li>
</ul>
</section>
<section id="cwl-file-placement">
<h3>cwl file placement<a class="headerlink" href="#cwl-file-placement" title="Link to this heading">#</a></h3>
<p>cwl files can be provided from three locations. If present, the user
provided cwl is taken, if not built-in versions are taken. As a last
resort, txs automatically generates cwls from latex styles, though these
only serve to provide syntax information. Context information for
arguments are not available and no completion hints are given.</p>
<ul class="simple">
<li><p><strong>%appdata%\texstudio\completion\user or
.config/texstudio/completion/user</strong> user generated cwls</p></li>
<li><p><strong>built-in</strong></p></li>
<li><p><strong>%appdata%\texstudio\completion\autogenerated or
.config/texstudio/completion/autogenerated</strong> auto-generated cwls</p></li>
</ul>
</section>
</section>
<section id="menu-definitions">
<h2>Menu Definitions<a class="headerlink" href="#menu-definitions" title="Link to this heading">#</a></h2>
<p>TeXstudio allows the user to adapt the menu, see <a class="reference internal" href="configuration.html#configuring-the-menu-advanced-option"><span class="std std-ref">how to configure the Menu</span></a>.</p>
<p>One way of doing this is by loading a definition file via the script command <code class="docutils literal notranslate"><span class="pre">loadManagedMenu</span></code>. Its format is described here.</p>
<p>The definition file is an xml file, general description of xml can be found on the internet.</p>
<p>The following shows an example which redefines the “\documentclass” entry in the latex menu and the “part” entry in the submenu “Sectioning”.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><TexMakerXUI></span>
<span class="nt"><menu</span><span class="w"> </span><span class="na">id=</span><span class="s">"main/latex"</span><span class="w"> </span><span class="na">text=</span><span class="s">"&amp;LaTeX"</span><span class="nt">></span>
<span class="w"> </span><span class="nt"><insert</span><span class="w"> </span><span class="na">id=</span><span class="s">"documentclass"</span><span class="w"> </span><span class="na">text=</span><span class="s">"\documentclass (redefined)"</span><span class="w"> </span><span class="na">insert=</span><span class="s">"Redefined"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><menu</span><span class="w"> </span><span class="na">id=</span><span class="s">"sectioning"</span><span class="w"> </span><span class="na">text=</span><span class="s">"&amp;Sectioning"</span><span class="nt">></span>
<span class="w"> </span><span class="nt"><insert</span><span class="w"> </span><span class="na">id=</span><span class="s">"part"</span><span class="w"> </span><span class="na">text=</span><span class="s">"part (redefined)"</span><span class="w"> </span><span class="na">insert=</span><span class="s">"Redefined part"</span><span class="w"> </span><span class="na">icon=</span><span class="s">"part"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"></menu></span>
<span class="nt"></menu></span>
<span class="nt"></TexMakerXUI></span>
</pre></div>
</div>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre"><TexMakerXUI>...</TexMakerXUI></span></code>: mandatory tag to enclose the actual menu definition</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre"><menu</span> <span class="pre">...>...</menu></span></code>: define a menu/submenu. All its entries need to be set between the tags.</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">id</span></code> attribute: unique identifier. “main/latex” is the “LaTeX” menu. The slash <code class="docutils literal notranslate"><span class="pre">/</span></code> is the hierarchy separator. Deeper hierarchies can be directly addressed. A new <code class="docutils literal notranslate"><span class="pre">id</span></code> adds entries instead of redefining them.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">text</span></code> attribute: The text that is shown as the menu name. <code class="docutils literal notranslate"><span class="pre">&amp;</span></code> marks the following character as character shortcut to reach that menu.</p></li>
</ul>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre"><insert</span> <span class="pre">...></span></code>: insert a menu entry</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">id</span></code> attribute: unique identifier. Here, for example “part”. A new <code class="docutils literal notranslate"><span class="pre">id</span></code> adds entries instead of redefining them.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">text</span></code> attribute: The text that is shown as the menu entry name. <code class="docutils literal notranslate"><span class="pre">&amp;</span></code> marks the following character as character shortcut to reach that entry.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">insert</span></code> attribute: text to insert. This is a normal txs macro, so a script with the header <code class="docutils literal notranslate"><span class="pre">%SCRIPT</span></code> works as well.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">icon</span></code> attribute (optional): icon file to show as icon. Usually txs internal files.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">shortcut</span></code> attribute (optional): define a short cut, e.g. <code class="docutils literal notranslate"><span class="pre">shortcut="Ctrl+Shift+T"</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">info</span></code>attribute (optional): define a tooltip which describes the functionality of this entry.</p></li>
</ul>
</li>
</ul>
<p>The “LaTeX” and “Math” menu are mainly defined by using this method. The source can be found <a class="reference external" href="https://github.com/texstudio-org/texstudio/blob/master/uiconfig.xml">here</a>.</p>
</section>
<section id="the-document-template-format">
<h2>The Document Template Format<a class="headerlink" href="#the-document-template-format" title="Link to this heading">#</a></h2>
<p>In its simplest form, a template is only a .tex file. Multi-file
templates can be created by packaging all .tex files in a zip archive.
Optionally, meta data can be stored in JSON format in a separate file
with the same name, but extension “.json” instead of “.tex” or
“.zip”. Currently the following entries are supported in the meta
data:</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">"Name"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"Book"</span><span class="p">,</span>
<span class="s2">"Author"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"TXS built-in"</span><span class="p">,</span>
<span class="s2">"Date"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"04.01.2013"</span><span class="p">,</span>
<span class="s2">"Version"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"1.1"</span><span class="p">,</span>
<span class="s2">"Description"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"Default LaTeX class for books using separate files for each chapter."</span><span class="p">,</span>
<span class="s2">"License"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"Public Domain"</span><span class="p">,</span>
<span class="s2">"FilesToOpen"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"./TeX_files/chapter01.tex;main.tex"</span>
<span class="p">}</span>
</pre></div>
</div>
<p>FilesToOpen only has an effect for multi-file documents. You may add a
preview image next to the template file. Again, it must have the same
name, but extension “.webp”.</p>
</section>
<section id="creating-table-templates">
<h2>Creating table templates<a class="headerlink" href="#creating-table-templates" title="Link to this heading">#</a></h2>
<p>The templates can be defined by the user as well. They have to be place
in the config directory (Linux: ~/.config/texstudio) and need to named
after the scheme tabletemplate_<em>name</em>.js.</p>
<p>Meta data is used to provide additional information for the template. It
can be stored in a <code class="docutils literal notranslate"><span class="pre">metaData</span></code> object in the source code. The code
<code class="docutils literal notranslate"><span class="pre">var</span> <span class="pre">metaData</span> <span class="pre">=</span> <span class="pre">{</span></code> has to start on the first line of the file. Currently
only string values are accepted. It is possible to use html tags for
formatting. Example:</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">var</span><span class="w"> </span><span class="nx">metaData</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span>
<span class="s2">"Name"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"Colored rows"</span><span class="p">,</span>
<span class="s2">"Description"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"Formats the table using alternate colors for rows. <br> <code>\usepackage[table]{xcolor}</code> is necessary."</span><span class="p">,</span>
<span class="s2">"Author"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"Jan Sundermeyer"</span><span class="p">,</span>
<span class="s2">"Date"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"4.9.2011"</span><span class="p">,</span>
<span class="s2">"Version"</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="s2">"1.0"</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The template itself is a javascript (see above) with some predefined
variables which contain the whole table. The new table is just placed as
replacement of the old one, using information from that variables. 3
variables are given:</p>
<ul class="simple">
<li><p>def the simplified table definition without any formatting (i.e. ll
instead of |l|l|)</p></li>
<li><p>defSplit the table definition split by column (<code class="docutils literal notranslate"><span class="pre">array=l,l,p{2cm}</span></code>)</p></li>
<li><p>env the actual environment name of the old table like “tabular” or
“longtable”</p></li>
<li><p>tab the actual table. It is a list of lines, each line is a list of
columns which contains the cell content as string</p></li>
</ul>
<p>To see the principle of work, the source for the “plain_tabular”
template is given here.</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">function</span><span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="nx">str</span><span class="p">){</span><span class="w"> </span><span class="c1">//define this function to make source more readable</span>
<span class="nx">cursor</span><span class="p">.</span><span class="nx">insertText</span><span class="p">(</span><span class="nx">str</span><span class="p">)</span>
<span class="p">}</span>
<span class="kd">function</span><span class="w"> </span><span class="nx">println</span><span class="p">(</span><span class="nx">str</span><span class="p">){</span><span class="w"> </span><span class="c1">//define this function to make source more readable</span>
<span class="nx">cursor</span><span class="p">.</span><span class="nx">insertText</span><span class="p">(</span><span class="nx">str</span><span class="o">+</span><span class="s2">"\n"</span><span class="p">)</span>
<span class="p">}</span>
<span class="kd">var</span><span class="w"> </span><span class="nx">arDef</span><span class="o">=</span><span class="nx">def</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">""</span><span class="p">)</span><span class="w"> </span><span class="c1">// split the table definition (ll -> 'l' 'l')</span>
<span class="nx">println</span><span class="p">(</span><span class="s2">"\\begin{tabular}{"</span><span class="o">+</span><span class="nx">arDef</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">""</span><span class="p">)</span><span class="o">+</span><span class="s2">"}"</span><span class="p">)</span><span class="w"> </span><span class="c1">//print table env</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span><span class="w"> </span><span class="nx">i</span><span class="o">=</span><span class="mf">0</span><span class="p">;</span><span class="nx">i</span><span class="o"><</span><span class="nx">tab</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">){</span><span class="w"> </span><span class="c1">// loop through all rows of the table</span>
<span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nx">line</span><span class="o">=</span><span class="nx">tab</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span><span class="w"> </span><span class="c1">// line is a list of all columns of row[i]</span>
<span class="w"> </span><span class="k">for</span><span class="p">(</span><span class="kd">var</span><span class="w"> </span><span class="nx">j</span><span class="o">=</span><span class="mf">0</span><span class="p">;</span><span class="nx">j</span><span class="o"><</span><span class="nx">line</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">j</span><span class="o">++</span><span class="p">){</span><span class="w"> </span><span class="c1">// loop through all columns of a row</span>
<span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="nx">line</span><span class="p">[</span><span class="nx">j</span><span class="p">])</span><span class="w"> </span><span class="c1">// print cell</span>
<span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="nx">j</span><span class="o"><</span><span class="nx">line</span><span class="p">.</span><span class="nx">length</span><span class="o">-</span><span class="mf">1</span><span class="p">)</span><span class="w"> </span><span class="c1">// if not last columns</span>
<span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="s2">"&"</span><span class="p">)</span><span class="w"> </span><span class="c1">// print &</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="nx">println</span><span class="p">(</span><span class="s2">"\\\\"</span><span class="p">)</span><span class="w"> </span><span class="c1">// close row with \\, note that js demands for backslashes in the string</span>
<span class="p">}</span>
<span class="nx">println</span><span class="p">(</span><span class="s2">"\\end{tabular}"</span><span class="p">)</span><span class="w"> </span><span class="c1">// close environment</span>
</pre></div>
</div>
<p>As can be seen in the example, the table has to be rebuilt completely,
thus allowing new formatting. A second example gives a slightly more
elaborate table (fullyframed_firstBold):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="kd">function</span><span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="nx">str</span><span class="p">){</span>
<span class="nx">cursor</span><span class="p">.</span><span class="nx">insertText</span><span class="p">(</span><span class="nx">str</span><span class="p">)</span>
<span class="p">}</span>
<span class="kd">function</span><span class="w"> </span><span class="nx">println</span><span class="p">(</span><span class="nx">str</span><span class="p">){</span>
<span class="nx">cursor</span><span class="p">.</span><span class="nx">insertText</span><span class="p">(</span><span class="nx">str</span><span class="o">+</span><span class="s2">"\n"</span><span class="p">)</span>
<span class="p">}</span>
<span class="k">if</span><span class="p">(</span><span class="nx">env</span><span class="o">==</span><span class="s2">"tabularx"</span><span class="p">){</span>
<span class="w"> </span><span class="nx">println</span><span class="p">(</span><span class="s2">"\\begin{tabularx}{\\linewidth}{|"</span><span class="o">+</span><span class="nx">defSplit</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">"|"</span><span class="p">)</span><span class="o">+</span><span class="s2">"|}"</span><span class="p">)</span>
<span class="p">}</span><span class="k">else</span><span class="p">{</span>
<span class="w"> </span><span class="nx">println</span><span class="p">(</span><span class="s2">"\\begin{"</span><span class="o">+</span><span class="nx">env</span><span class="o">+</span><span class="s2">"}{|"</span><span class="o">+</span><span class="nx">defSplit</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">"|"</span><span class="p">)</span><span class="o">+</span><span class="s2">"|}"</span><span class="p">)</span>
<span class="p">}</span>
<span class="nx">println</span><span class="p">(</span><span class="s2">"\\hline"</span><span class="p">)</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span><span class="w"> </span><span class="nx">i</span><span class="o">=</span><span class="mf">0</span><span class="p">;</span><span class="nx">i</span><span class="o"><</span><span class="nx">tab</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">){</span>
<span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nx">line</span><span class="o">=</span><span class="nx">tab</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span>
<span class="w"> </span><span class="k">for</span><span class="p">(</span><span class="kd">var</span><span class="w"> </span><span class="nx">j</span><span class="o">=</span><span class="mf">0</span><span class="p">;</span><span class="nx">j</span><span class="o"><</span><span class="nx">line</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">j</span><span class="o">++</span><span class="p">){</span>
<span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nx">col</span><span class="o">=</span><span class="nx">line</span><span class="p">[</span><span class="nx">j</span><span class="p">];</span>
<span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nx">mt</span><span class="o">=</span><span class="nx">col</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/^\\textbf/</span><span class="p">);</span>
<span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="nx">i</span><span class="o">==</span><span class="mf">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="nx">mt</span><span class="p">)</span>
<span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="s2">"\\textbf{"</span><span class="p">)</span>
<span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="nx">line</span><span class="p">[</span><span class="nx">j</span><span class="p">])</span>
<span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="nx">i</span><span class="o">==</span><span class="mf">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="o">!</span><span class="nx">mt</span><span class="p">)</span>
<span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="s2">"}"</span><span class="p">)</span>
<span class="w"> </span><span class="k">if</span><span class="p">(</span><span class="nx">j</span><span class="o"><</span><span class="nx">line</span><span class="p">.</span><span class="nx">length</span><span class="o">-</span><span class="mf">1</span><span class="p">)</span>
<span class="w"> </span><span class="nx">print</span><span class="p">(</span><span class="s2">"&"</span><span class="p">)</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="nx">println</span><span class="p">(</span><span class="s2">"\\\\ \\hline"</span><span class="p">)</span>
<span class="p">}</span>
<span class="nx">println</span><span class="p">(</span><span class="s2">"\\end{"</span><span class="o">+</span><span class="nx">env</span><span class="o">+</span><span class="s2">"}"</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="style-sheets">
<h2>Style Sheets<a class="headerlink" href="#style-sheets" title="Link to this heading">#</a></h2>
<p>Qt supports modifying the appearance of an application using <a class="reference external" href="http://doc.qt.io/qt-5/stylesheet-syntax.html">style sheets</a>. You may use this
to adapt the GUI of the main window by placing a file <code class="docutils literal notranslate"><span class="pre">stylesheet.qss</span></code>
into the settings directory. The file is read at program startup.</p>
<p>Please note that the style sheet may interfere with other ways of
configuring the GUI, in particular the style color scheme and other
options. Therefore we do not guarantee a consistent behavior when using
style sheets</p>
</section>
<section id="writing-your-own-language-definitions">
<h2>Writing your own language definitions<a class="headerlink" href="#writing-your-own-language-definitions" title="Link to this heading">#</a></h2>
<p>TeXstudio uses QCodeEdit as editor component. It specifies languages in
a special xml format named QNFA. This includes highlighting, parentheses
(for matching) and code folding. In a normal TeXstudio installation you
won’t find any .qnfa files, because we compile the files of the
included languages into the binary. You can add your own languages or
overwrite the default ones by placing appropriate .qnfa files in a
<code class="docutils literal notranslate"><span class="pre">languages</span></code> folder inside the settings directory. Definitions here take
precedence over the builtin ones.</p>
<p>The .qnfa file specifies the syntax of the language. The actual format
information is specified in a .qxf file. You can either use the formats
specified in
<a class="reference external" href="https://github.com/texstudio-org/texstudio/tree/master/utilities/qxs">defaultFormats.qxf</a>
or provide your own .qxf file along with the .qnfa file.</p>
<p>You should read the <a class="reference external" href="http://texstudio.sourceforge.net/manual/qce/QNFA.html">syntax format specification</a>
and have a look at the <a class="reference external" href="https://github.com/texstudio-org/texstudio/tree/master/utilities/qxs">formats shipped with TeXstudio</a>.</p>
<p>Note: We expose the language specification to you as end-user to give
you more flexibility in adapting TeXstudio to your needs. But you should
take it as is, because we don’t have the capacity to give support here.
It’s a powerful API, but neither polished nor fully featured. You might
find some constructs in the shipped .qnfa files, which are not
documented in the syntax format specification. Additionally, the
regular-expression based formatting of QNFA is not sufficient to define
all the highlighting we wanted for LaTeX. Therefore we have extra
highlighting functionality directly implemented in the sourcecode for
the “(La)TeX” language, e.g. the highlighting inside the parentheses
of <code class="docutils literal notranslate"><span class="pre">\begin</span></code> and <code class="docutils literal notranslate"><span class="pre">\end</span></code>. You won’t be able to modify this or add it to
other languages.</p>
<section id="example">
<h3>Example<a class="headerlink" href="#example" title="Link to this heading">#</a></h3>
<p>The following is a small example which specifies some highlighting of
python code:</p>
<p>python.qnfa</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span><!DOCTYPE QNFA>
<QNFA language="Python" extensions="py" defaultLineMark="">
<sequence parenthesis="round:open" parenthesisWeight="00">\(</sequence>
<sequence parenthesis="round:close" parenthesisWeight="00">\)</sequence>
<!-- highlight def and function name -->
<sequence id="python/definition" format="python:definition">def$s?$w*</sequence>
<sequence id="python/number" format="python:number">[0-9]+</sequence>
<list id="python/keyword" format="python:keyword">
<word>return</word>
<word>if</word>
<word>elif</word>
<word>else</word>
</list>
</QNFA>
</pre></div>
</div>
<p>python.qxf</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span><!DOCTYPE QXF>
<QXF version="1.0" >
<!-- full specification -->
<format id="python:keyword" >
<bold>false</bold>
<italic>false</italic>
<overline>false</overline>
<underline>false</underline>
<strikeout>false</strikeout>
<waveUnderline>false</waveUnderline>
<foreground>#B200FF</foreground>
</format>
<!-- but it is sufficient to specify deviations from default -->
<format id="python:number" >
<italic>true</italic>
<overline>false</overline>
<foreground>#007F0E</foreground>
</format>
<format id="python:definition" >
<bold>true</bold>
</format>
</QXF>
</pre></div>
</div>
<p>The results is the following highlighting:</p>
<p><img alt="" src="_images/format_example.webp" /></p>
</section>
</section>
<section id="building-texstudio">
<h2>Building TeXstudio<a class="headerlink" href="#building-texstudio" title="Link to this heading">#</a></h2>
<p>TeXstudio uses <code class="docutils literal notranslate"><span class="pre">cmake</span></code> as a building system.</p>
<p>To compile and install TeXstudio, write in a terminal:</p>
<div class="highlight-latex notranslate"><div class="highlight"><pre><span></span>mkdir build
cd build
cmake ..
cmake --build . --target install
</pre></div>
</div>
<p>On Unix and MacOSX you can also use:
sudo sh BUILD.sh</p>
<p>(you only need to use sudo if you want to install it system-wide)</p>
<p>Requirements :</p>
<ul class="simple">
<li><p>Qt tool kit (qt.io) (6.2+ recommended)</p></li>
<li><p>Poppler for the internal pdf preview
(is automatically disabled if poppler is not found)</p></li>
</ul>
<p>More details on building TeXstudio can be found in the <a class="reference external" href="https://github.com/texstudio-org/texstudio/wiki/Compiling">wiki</a>.</p>
<p><code class="docutils literal notranslate"><span class="pre">cmake</span></code> detects the presence of optional dependencies and builds accordingly.
The optional dependencies are listed below.</p>
<div class="table-wrapper colwidths-auto docutils container">
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>dependency</p></th>
<th class="head"><p>feature when present</p></th>
<th class="head"><p>when not present</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>poppler-qt</p></td>
<td><p>internal pdf viewer</p></td>
<td><p>no pdf viewer</p></td>
</tr>
<tr class="row-odd"><td><p>libquazip</p></td>
<td><p>use system libquazip</p></td>
<td><p>build and use internal libquazip</p></td>
</tr>
<tr class="row-even"><td><p>hunspell</p></td>
<td><p>use system hunspell</p></td>
<td><p>build and use internal hunspell</p></td>
</tr>
<tr class="row-odd"><td><p>qtermwidget</p></td>
<td><p>provide terminal pane</p></td>
<td><p>no terminal pane</p></td>
</tr>
</tbody>
</table>
</div>
<p>TeXstudio offers some optional features which can be turned on/off as desired.
The change is done via cmake options, e.g. <code class="docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">-DTEXSTUDIO_ENABLE_CRASH_HANDLER=OFF</span> <span class="pre">..</span></code></p>
<p>Options:</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>default</p></th>
<th class="head"><p>description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>TEXSTUDIO_ENABLE_CRASH_HANDLER</p></td>
<td><p>on</p></td>
<td><p>provide a crash handler</p></td>
</tr>
<tr class="row-odd"><td><p>TEXSTUDIO_BUILD_ADWAITA</p></td>
<td><p>on</p></td>
<td><p>build adwaita style</p></td>
</tr>
<tr class="row-even"><td><p>TEXSTUDIO_ENABLE_TESTS</p></td>
<td><p>off</p></td>
<td><p>build self-tests</p></td>
</tr>
<tr class="row-odd"><td><p>TEXSTUDIO_ENABLE_DEBUG_LOGGER</p></td>
<td><p>off</p></td>
<td><p>build debug logger</p></td>
</tr>
<tr class="row-even"><td><p>TEXSTUDIO_ENABLE_MEDIAPLAYER</p></td>
<td><p>off</p></td>
<td><p>build with pdf multimedia support. Requires QtMultimedia</p></td>
</tr>
<tr class="row-odd"><td><p>APPDATA</p></td>
<td><p>on</p></td>
<td><p>on linux, install texstudio.metainfo.xml</p></td>
</tr>
</tbody>
</table>
</div>
<section id="updating-translations">
<h3>Updating translations<a class="headerlink" href="#updating-translations" title="Link to this heading">#</a></h3>
<p>With <code class="docutils literal notranslate"><span class="pre">cmake</span></code> the command <code class="docutils literal notranslate"><span class="pre">lupdate</span></code> does not work directly.
Instead when building for qt6 a debug build (<code class="docutils literal notranslate"><span class="pre">DCMAKE_BUILD_TYPE=Debug</span></code>), a target <code class="docutils literal notranslate"><span class="pre">texstudio_lupdate</span></code> is defined which needs to be called.</p>
<div class="highlight-latex notranslate"><div class="highlight"><pre><span></span>build>qt-cmake .. -DCMAKE<span class="nb">_</span>BUILD<span class="nb">_</span>TYPE=Debug
build>cmake --build . -t texstudio<span class="nb">_</span>lupdate
</pre></div>
</div>
</section>
<section id="translating-manual">
<h3>Translating manual<a class="headerlink" href="#translating-manual" title="Link to this heading">#</a></h3>
<p>The manual is writen as markdown in <code class="docutils literal notranslate"><span class="pre">utilities/manual/source</span></code>.