summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent/defaultSettings.yaml
blob: d457e96e3a3a59da101107b686e25de43107678f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# defaultSettings.yaml for latexindent.pl, version 3.6, 2019-05-05
#                      a script that aims to
#                      beautify .tex, .sty, .cls files
#
# (or latexindent.exe if you're on Windows)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# See http://www.gnu.org/licenses/.
# 
# Chris Hughes, 2017
# 
# For all communication, please visit: https://github.com/cmhughes/latexindent.pl


# You're welcome to change anything you like in here, but 
# it would probably be better to have your own user settings 
# files somewhere else - remember that this file may be overwritten
# when you update your distribution. Please see the manual
# for details of how to setup your own settings files.
#
# Please read the manual first to understand what each switch does.

# latexindent can be called without a file extension, 
# e.g, simply
#       latexindent myfile
# in which case the choice of file extension is chosen
# according to the choices made in fileExtensionPreference
# Other file extensions can be added.
fileExtensionPreference:
    .tex: 1
    .sty: 2
    .cls: 3
    .bib: 4

# default file extension of backup file (if original is overwritten with -w switch)
# for example, if your .tex file is called
#       myfile.tex
# and you specify the backupExtension as BACKUP.bak then your 
# backup file will be
#       myfileBACKUP.bak
backupExtension: .bak

# only one backup per file; if onlyOneBackUp is 0 then, as a safety measure, 
# the number on the extension increments by 1 each time:
#     myfile.bak0, myfile.bak1, myfile.bak2
#
# if you set onlyOnebackUp to 1, then the backup file will
# be overwritten each time (not recommended until you trust the script)
onlyOneBackUp: 0

# some users may only want a set number of backup files, 
# say at most 3; in which case, they can change this switch.
# If maxNumberOfBackUps is set to 0 (or less) then infinitely 
# many backups are possible, unless onlyOneBackUp is switched on
maxNumberOfBackUps: 0

# some users may wish to cycle through back up files, for example, 
# with maxNumberOfBackUps: 4, they may wish to delete the oldest
# back up file, and keep only the most recent.
#
#    copy myfile.bak1 to myfile.bak0
#    copy myfile.bak2 to myfile.bak1
#    copy myfile.bak3 to myfile.bak2
#    copy myfile.bak4 to myfile.bak3
#
# the back up will be written to myfile.bak4
cycleThroughBackUps: 0

# preferences for information displayed in the log file
logFilePreferences:
    showEveryYamlRead: 1
    showAmalgamatedSettings: 0
    showDecorationStartCodeBlockTrace: 0
    showDecorationFinishCodeBlockTrace: 0
    endLogFileWith: '--------------' 
    showGitHubInfoFooter: 1
    PatternLayout:
        default: "%A%n"
        trace: "%A%n"
        ttrace: "%A%n"

#  verbatim environments specified 
#  in this field will not be changed at all!
verbatimEnvironments:
    verbatim: 1
    lstlisting: 1
    minted: 1

#  verbatim commands such as \verb! body !, \lstinline$something else$
verbatimCommands:
    verb: 1
    lstinline: 1

#  no indent blocks (not necessarily verbatim 
#  environments) which are marked as %\begin{noindent}
#  or anything else that the user puts in this hash
#  table
noIndentBlock:
    noindent: 1
    cmhtest: 1

# remove trailing whitespace from all lines 
removeTrailingWhitespace:
    beforeProcessing: 0
    afterProcessing: 1

# \begin{document} and \end{document} are treated differently
# by latexindent within filecontents environments
fileContentsEnvironments:
    filecontents: 1
    filecontents*: 1

# indent preamble
indentPreamble: 0

# assume no preamble in cls, sty, by default
lookForPreamble:
    .tex: 1
    .sty: 0
    .cls: 0
    .bib: 0

# some preambles can contain \begin and \end statements
# that are not in their 'standard environment block', for example,
# consider the following key = values:
#    preheadhook={\begin{mdframed}[style=myframedstyle]},
#    postfoothook=\end{mdframed},
preambleCommandsBeforeEnvironments: 0

# Default value of indentation
defaultIndent: "\t"

# name of code blocks that should have their body aligned at ampersand delimiters
lookForAlignDelims:
   tabular: 
      delims: 1
      alignDoubleBackSlash: 1
      spacesBeforeDoubleBackSlash: 1
      multiColumnGrouping: 0
      alignRowsWithoutMaxDelims: 1
      spacesBeforeAmpersand: 1
      spacesAfterAmpersand: 1
      justification: "left"
   tabularx:
      delims: 1
   longtable: 1
   tabu: 1
   array: 1
   matrix: 1
   bmatrix: 1
   Bmatrix: 1
   pmatrix: 1
   vmatrix: 1
   Vmatrix: 1
   align: 1
   align*: 1
   alignat: 1
   alignat*: 1
   aligned: 1
   cases: 1
   dcases: 1
   listabla: 1

# if you want the script to look for \item commands 
# and format it, as follows (for example),
#       \begin{itemize}
#           \item content here
#                 next line is indented
#                 next line is indented
#           \item another item
#       \end{itemize}
# then populate indentAfterItems. See also itemNames
indentAfterItems:
    itemize: 1
    enumerate: 1
    description: 1
    list: 1

# if you want to use other names for your items (such as, for example, part)
# then populate them here; note that you can trick latexindent.pl
# into indenting all kinds of commands (within environments specified in 
# indentAfterItems) using this technique.
itemNames:
    item: 1
    myitem: 1

# specialBeginEnd is mainly mathmode focus, although
# there's no restrictions
specialBeginEnd:
    displayMath:
        begin: '\\\['
        end: '\\\]'
        lookForThis: 1
    inlineMath:
        begin: '(?<!\$)(?<!\\)\$(?!\$)'
        end: '(?<!\\)\$(?!\$)'
        lookForThis: 1
    displayMathTeX:
        begin: '\$\$'
        end: '\$\$'
        lookForThis: 1
    specialBeforeCommand: 0

# if you want to add indentation after
# a heading, such as \part, \chapter, etc
# then populate it in here - you can add 
# an indent rule to indentRules if you would 
# like something other than defaultIndent
#
# you can also change the level if you like, 
# or add your own title command
indentAfterHeadings:
    part:
       indentAfterThisHeading: 0
       level: 1
    chapter: 
       indentAfterThisHeading: 0
       level: 2
    section:
       indentAfterThisHeading: 0
       level: 3
    subsection:
       indentAfterThisHeading: 0
       level: 4
    subsection*:
       indentAfterThisHeading: 0
       level: 4
    subsubsection:
       indentAfterThisHeading: 0
       level: 5
    paragraph:
       indentAfterThisHeading: 0
       level: 6
    subparagraph:
       indentAfterThisHeading: 0
       level: 7

# maximum indentation, off by default
maximumIndentation: -1

# if you don't want to have additional indentation 
# in an environment put it in this hash table; note that
# environments in this field will inherit 
# the *current* level of indentation they just won't
# get any *additional*.
noAdditionalIndent:
    myexample: 1
    mydefinition: 1
    problem: 1
    exercises: 1
    mysolution: 1
    foreach: 0
    widepage: 1
    comment: 1
    document: 1
    frame: 0

# if you have indent rules for particular environments
# or commands, put them in here; for example, you might just want 
# to use a space " " or maybe a double tab "\t\t"
indentRules:
   myenvironment: "\t\t"
   anotherenvironment: "\t\t\t\t"
   chapter: " "
   section: " "
   item: "      "
   myitem: "        "

# set noAdditionalIndent globally for codeblocks
noAdditionalIndentGlobal:
    environments: 0
    commands: 1
    optionalArguments: 0
    mandatoryArguments: 0
    ifElseFi: 0
    items: 0
    keyEqualsValuesBracesBrackets: 0
    namedGroupingBracesBrackets: 0
    UnNamedGroupingBracesBrackets: 0
    specialBeginEnd: 0
    afterHeading: 0
    filecontents: 0

# set indentRules globally for codeblocks; these need 
# to be horizontal spaces, if they are to be used
indentRulesGlobal:
    environments: 0
    commands: 0
    optionalArguments: 0
    mandatoryArguments: 0
    ifElseFi: 0
    items: 0
    keyEqualsValuesBracesBrackets: 0
    namedGroupingBracesBrackets: 0
    UnNamedGroupingBracesBrackets: 0
    specialBeginEnd: 0
    afterHeading: 0
    filecontents: 0

# command code block details
commandCodeBlocks:
    roundParenthesesAllowed: 1
    stringsAllowedBetweenArguments:
      - 
        amalgamate: 1
      - 'node'
      - 'at'
      - 'to'
      - 'decoration'
      - '\+\+'
      - '\-\-'
    commandNameSpecial:
      - 
        amalgamate: 1
      - '@ifnextchar\['

# modifyLineBreaks will only be searched if the -m 
# switch is active
#    BeginStartsOnOwnLine: 1
#       if a begin statement is not already on its own line,
#       then, with -m active, it will be moved to its own line.
#
#       when set to 1, e.g 
#               some text some text \begin{myenvironment}
#           will be changed to
#               some text some text 
#               \begin{myenvironment}
#       when set to -1, e.g 
#               some text some text 
#               \begin{myenvironment}
#           will be changed to
#               some text some text \begin{myenvironment}
#       when set to 0, the switch is ignored
#
#    BodyStartsOnOwnLine: 1
#       if body does not already start on its own line, then with 
#       -m active, it will be moved to its own line.
#
#       when set to 1, e.g 
#               \begin{myenv}body text body text
#           will be changed to
#               \begin{myenv}
#                   body text body text
#       when set to -1, e.g 
#               \begin{myenv}
#                   body text body text
#           will be changed to
#               \begin{myenv}body text body text
#       when set to 0, the switch is ignored
#
#    EndStartsOnOwnLine: 1
#       if an end statement is not already on its own line,
#       then, with -m active, it will be moved to its own line.
#
#       when set to 1, e.g 
#               some text some text \end{myenvironment}
#           will be changed to
#               some text some text 
#               \end{myenvironment}
#       when set to -1, e.g 
#               some text some text 
#               \end{myenvironment}
#           will be changed to
#               some text some text \end{myenvironment}
#       when set to 0, the switch is ignored
#
#    EndFinishesWithLineBreak: 1
#       this switch adjusts line breaks immmediately 
#       after an end statement (with -m active)
#       
#       when set to 1, e.g 
#               \end{myenvironment}some text some text 
#           will be changed to
#                   \end{myenvironment}
#                   some text some text 
#       when set to -1, e.g 
#               \end{myenvironment}
#               some text some text 
#           will be changed to
#                   \end{myenvironment}some text some text 
#       when set to 0, the switch is ignored
#
# Naturally, you can specify settings for individual environments,
# commands, headings, etc, populate as you wish.
modifyLineBreaks:
    preserveBlankLines: 1
    condenseMultipleBlankLinesInto: 1
    oneSentencePerLine:
        manipulateSentences: 0     
        removeSentenceLineBreaks: 1
        textWrapSentences: 0
        sentenceIndent: ""
        sentencesFollow:
            par: 1
            blankLine: 1
            fullStop: 1
            exclamationMark: 1
            questionMark: 1
            rightBrace: 1
            commentOnPreviousLine: 1
            other: 0
        sentencesBeginWith:
            A-Z: 1
            a-z: 0
            other: 0
        sentencesEndWith:
            basicFullStop: 0
            betterFullStop: 1
            exclamationMark: 1
            questionMark: 1
            other: 0
    textWrapOptions:
        columns: 0
        separator: ""
        perCodeBlockBasis: 0
        all: 0
        alignAtAmpersandTakesPriority: 1
        environments: 
            quotation: 0
        ifElseFi: 0
        optionalArguments: 0
        mandatoryArguments: 0
        items: 0
        specialBeginEnd: 0
        afterHeading: 0
        preamble: 0
        filecontents: 0
        masterDocument: 0
    removeParagraphLineBreaks:
        all: 0
        beforeTextWrap: 0
        alignAtAmpersandTakesPriority: 1
        environments: 
            quotation: 0
        ifElseFi: 0
        optionalArguments: 0
        mandatoryArguments: 0
        items: 0
        specialBeginEnd: 0
        afterHeading: 0
        preamble: 0
        filecontents: 0
        masterDocument: 0
        paragraphsStopAt:
            environments: 1
            verbatim: 1
            commands: 0
            ifElseFi: 0
            items: 0
            specialBeginEnd: 0
            heading: 0
            filecontents: 0
            comments: 0
    environments:
        BeginStartsOnOwnLine: 0
        BodyStartsOnOwnLine: 0
        EndStartsOnOwnLine: 0
        EndFinishesWithLineBreak: 0
        equation*:
            BeginStartsOnOwnLine: 0
            BodyStartsOnOwnLine: 0
            EndStartsOnOwnLine: 0
            EndFinishesWithLineBreak: 0
    ifElseFi:
        IfStartsOnOwnLine: 0
        BodyStartsOnOwnLine: 0
        OrStartsOnOwnLine: 0
        OrFinishesWithLineBreak: 0
        ElseStartsOnOwnLine: 0
        ElseFinishesWithLineBreak: 0
        FiStartsOnOwnLine: 0
        FiFinishesWithLineBreak: 0
        ifnum:
            IfStartsOnOwnLine: 0
            BodyStartsOnOwnLine: 0
            OrStartsOnOwnLine: 0
            OrFinishesWithLineBreak: 0
            ElseStartsOnOwnLine: 0
            ElseFinishesWithLineBreak: 0
            FiStartsOnOwnLine: 0
            FiFinishesWithLineBreak: 0
    commands:
        CommandStartsOnOwnLine: 0
        CommandNameFinishesWithLineBreak: 0
    optionalArguments:
        LSqBStartsOnOwnLine: 0
        OptArgBodyStartsOnOwnLine: 0
        RSqBStartsOnOwnLine: 0
        RSqBFinishesWithLineBreak: 0
    mandatoryArguments:
        LCuBStartsOnOwnLine: 0
        MandArgBodyStartsOnOwnLine: 0
        RCuBStartsOnOwnLine: 0
        RCuBFinishesWithLineBreak: 0
    keyEqualsValuesBracesBrackets:
        KeyStartsOnOwnLine: 0
        EqualsStartsOnOwnLine: 0
        EqualsFinishesWithLineBreak: 0
    items:
        ItemStartsOnOwnLine: 0
        ItemFinishesWithLineBreak: 0
    namedGroupingBracesBrackets:
        NameStartsOnOwnLine: 0
        NameFinishesWithLineBreak: 0
    specialBeginEnd:
        SpecialBeginStartsOnOwnLine: 0
        SpecialBodyStartsOnOwnLine: 0
        SpecialEndStartsOnOwnLine: 0
        SpecialEndFinishesWithLineBreak: 0
    verbatim:
        VerbatimBeginStartsOnOwnLine: 0
        VerbatimEndFinishesWithLineBreak: 0