Add latex config .indentsettings.yaml
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
# defaultSettings.yaml for latexindent.pl, version 3.8.1, 2020-05-05
|
||||
# defaultSettings.yaml for latexindent.pl, version 3.19.1, 2022-12-04
|
||||
# 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
|
||||
@ -19,8 +20,8 @@
|
||||
# Chris Hughes, 2017
|
||||
#
|
||||
# For all communication, please visit: https://github.com/cmhughes/latexindent.pl
|
||||
|
||||
|
||||
#
|
||||
#---------------------------------------------------------------------------------------
|
||||
# You should feel encouraged to change anything you like in these settings, but
|
||||
# it would probably be better to have your own user settings
|
||||
# files somewhere else - remember that this file may be overwritten
|
||||
@ -31,6 +32,8 @@
|
||||
# for details of how to create and configure your own settings files.
|
||||
#
|
||||
# Please read the manual (linked from above) first to understand what each switch does.
|
||||
#
|
||||
#---------------------------------------------------------------------------------------
|
||||
|
||||
# latexindent can be called to act on a file without using the file's extension,
|
||||
# e.g, simply
|
||||
@ -89,10 +92,14 @@ logFilePreferences:
|
||||
showDecorationFinishCodeBlockTrace: 0
|
||||
endLogFileWith: '--------------'
|
||||
showGitHubInfoFooter: 1
|
||||
PatternLayout:
|
||||
default: "%A%n"
|
||||
trace: "%A%n"
|
||||
ttrace: "%A%n"
|
||||
Dumper:
|
||||
Terse: 1
|
||||
Indent: 1
|
||||
Useqq: 1
|
||||
Deparse: 1
|
||||
Quotekeys: 0
|
||||
Sortkeys: 1
|
||||
Pair: " => "
|
||||
|
||||
# verbatim environments specified
|
||||
# in this field will not be changed at all!
|
||||
@ -100,6 +107,7 @@ verbatimEnvironments:
|
||||
verbatim: 1
|
||||
lstlisting: 1
|
||||
minted: 1
|
||||
codeblock: 1 # BSuSP Thesis Listing
|
||||
|
||||
# verbatim commands such as \verb! body !, \lstinline$something else$
|
||||
verbatimCommands:
|
||||
@ -113,11 +121,6 @@ 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:
|
||||
@ -142,8 +145,12 @@ lookForPreamble:
|
||||
preambleCommandsBeforeEnvironments: 0
|
||||
|
||||
# default value of indentation
|
||||
# defaultIndent: "\t"
|
||||
defaultIndent: " "
|
||||
defaultIndent: " " # Changed from \t to double space
|
||||
|
||||
# remove trailing whitespace from all lines
|
||||
removeTrailingWhitespace:
|
||||
beforeProcessing: 0
|
||||
afterProcessing: 1
|
||||
|
||||
# name of code blocks that should have their body aligned at ampersand delimiters
|
||||
lookForAlignDelims:
|
||||
@ -160,25 +167,61 @@ lookForAlignDelims:
|
||||
dontMeasure: 0
|
||||
delimiterRegEx: '(?<!\\)(&)'
|
||||
delimiterJustification: left
|
||||
lookForChildCodeBlocks: 1
|
||||
tabularx:
|
||||
delims: 1
|
||||
longtable: 1
|
||||
tabu: 1
|
||||
array: 1
|
||||
matrix: 1
|
||||
bmatrix: 1
|
||||
Bmatrix: 1
|
||||
pmatrix: 1
|
||||
vmatrix: 1
|
||||
Vmatrix: 1
|
||||
listabla: 1
|
||||
# amsmath
|
||||
align: 1
|
||||
align*: 1
|
||||
alignat: 1
|
||||
alignat*: 1
|
||||
aligned: 1
|
||||
bmatrix: 1
|
||||
Bmatrix: 1
|
||||
cases: 1
|
||||
flalign: 1
|
||||
flalign*: 1
|
||||
pmatrix: 1
|
||||
vmatrix: 1
|
||||
Vmatrix: 1
|
||||
# mathtools
|
||||
cases*: 1
|
||||
dcases: 1
|
||||
listabla: 1
|
||||
dcases*: 1
|
||||
rcases: 1
|
||||
rcases*: 1
|
||||
drcases: 1
|
||||
drcases*: 1
|
||||
# nicematrix
|
||||
NiceTabular: 1
|
||||
NiceMatrix: 1
|
||||
pNiceMatrix: 1
|
||||
bNiceMatrix: 1
|
||||
BNiceMatrix: 1
|
||||
vNiceMatrix: 1
|
||||
VNiceMatrix: 1
|
||||
NiceArray: 1
|
||||
pNiceArrayC: 1
|
||||
bNiceArrayC: 1
|
||||
BNiceArrayC: 1
|
||||
vNiceArrayC: 1
|
||||
VNiceArrayC: 1
|
||||
NiceArrayCwithDelims: 1
|
||||
pNiceArrayRC: 1
|
||||
bNiceArrayRC: 1
|
||||
BNiceArrayRC: 1
|
||||
vNiceArrayRC: 1
|
||||
VNiceArrayRC: 1
|
||||
NiceArrayRCwithDelims: 1
|
||||
# tabularray
|
||||
tblr: 1
|
||||
longtblr: 1
|
||||
talltblr: 1
|
||||
|
||||
# if you want the script to look for \item commands
|
||||
# and format it, as follows (for example),
|
||||
@ -191,8 +234,11 @@ lookForAlignDelims:
|
||||
# then populate indentAfterItems. See also itemNames
|
||||
indentAfterItems:
|
||||
itemize: 1
|
||||
itemize*: 1
|
||||
enumerate: 1
|
||||
enumerate*: 1
|
||||
description: 1
|
||||
description*: 1
|
||||
list: 1
|
||||
|
||||
# if you want to use other names for your items (for example, \part)
|
||||
@ -328,11 +374,15 @@ commandCodeBlocks:
|
||||
- 'decoration'
|
||||
- '\+\+'
|
||||
- '\-\-'
|
||||
- '\#\#\d'
|
||||
commandNameSpecial:
|
||||
-
|
||||
amalgamate: 1
|
||||
- '@ifnextchar\['
|
||||
|
||||
# change dos line breaks into unix
|
||||
dos2unixlinebreaks: 0
|
||||
|
||||
# modifyLineBreaks will only be searched if the -m
|
||||
# switch is active
|
||||
#
|
||||
@ -447,9 +497,10 @@ modifyLineBreaks:
|
||||
preserveBlankLines: 1
|
||||
condenseMultipleBlankLinesInto: 1
|
||||
oneSentencePerLine:
|
||||
manipulateSentences: 0
|
||||
manipulateSentences: 0 # enable oneSentencePerLine
|
||||
removeSentenceLineBreaks: 1
|
||||
textWrapSentences: 0
|
||||
multipleSpacesToSingle: 1
|
||||
textWrapSentences: 0 # setting to 1 disables main textWrap routine
|
||||
sentenceIndent: ""
|
||||
sentencesFollow:
|
||||
par: 1
|
||||
@ -471,47 +522,30 @@ modifyLineBreaks:
|
||||
questionMark: 1
|
||||
other: 0
|
||||
textWrapOptions:
|
||||
columns: 100
|
||||
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
|
||||
columns: 100 # Changed from 0, requires -m option
|
||||
multipleSpacesToSingle: 1
|
||||
removeBlockLineBreaks: 1
|
||||
blocksFollow:
|
||||
headings: 1
|
||||
commentOnPreviousLine: 1
|
||||
par: 1
|
||||
blankLine: 1
|
||||
verbatim: 1
|
||||
commands: 0
|
||||
ifElseFi: 0
|
||||
items: 0
|
||||
specialBeginEnd: 0
|
||||
heading: 0
|
||||
filecontents: 0
|
||||
comments: 0
|
||||
filecontents: 1
|
||||
other: '\\\]|\\item(?:\h|\[)' # regex
|
||||
blocksBeginWith:
|
||||
A-Z: 1
|
||||
a-z: 1
|
||||
0-9: 0
|
||||
other: '\\textbf' # regex
|
||||
blocksEndBefore:
|
||||
commentOnOwnLine: 1
|
||||
verbatim: 1
|
||||
filecontents: 1
|
||||
other: '\\begin\{|\\\[|\\end\{' # regex
|
||||
huge: overflow # forbid mid-word line breaks
|
||||
separator: ""
|
||||
# poly-switches below here
|
||||
environments:
|
||||
BeginStartsOnOwnLine: 0
|
||||
BodyStartsOnOwnLine: 0
|
||||
@ -579,7 +613,7 @@ replacements:
|
||||
-
|
||||
this: 'latexindent.pl'
|
||||
that: 'pl.latexindent'
|
||||
lookForThis: 1
|
||||
lookForThis: 0
|
||||
when: before
|
||||
|
||||
# fineTuning allows you to tweak the internal pattern matching that
|
||||
@ -588,13 +622,15 @@ fineTuning:
|
||||
environments:
|
||||
name: '[a-zA-Z@\*0-9_\\]+'
|
||||
ifElseFi:
|
||||
name: '@?if[a-zA-Z@]*?'
|
||||
name: '(?!@?if[a-zA-Z@]*?\{)@?if[a-zA-Z@]*?'
|
||||
commands:
|
||||
name: '[+a-zA-Z@\*0-9_\:]+?'
|
||||
items:
|
||||
canBeFollowedBy: '(?:\[[^]]*?\])|(?:<[^>]*?>)'
|
||||
keyEqualsValuesBracesBrackets:
|
||||
name: '[a-zA-Z@\*0-9_\/.\h\{\}:\#-]+?'
|
||||
name: '[a-zA-Z@\*0-9_\/.:\#-]+[a-zA-Z@\*0-9_\/.\h\{\}:\#-]*?'
|
||||
follow: '(?:(?<!\\)\{)|,|(?:(?<!\\)\[)'
|
||||
NamedGroupingBracesBrackets:
|
||||
namedGroupingBracesBrackets:
|
||||
name: '[0-9\.a-zA-Z@\*><]+?'
|
||||
follow: '\h|\R|\{|\[|\$|\)|\('
|
||||
UnNamedGroupingBracesBrackets:
|
||||
@ -602,7 +638,36 @@ fineTuning:
|
||||
arguments:
|
||||
before: '(?:#\d\h*;?,?\/?)+|\<.*?\>'
|
||||
between: '_|\^|\*'
|
||||
trailingComments:
|
||||
notPreceededBy: '(?<!\\)'
|
||||
modifyLineBreaks:
|
||||
betterFullStop: '(?:\.\)(?!\h*[a-z]))|(?:(?<!(?:(?:e\.g)|(?:i\.e)|(?:etc))))\.(?!(?:[a-z]|[A-Z]|\-|~|\,|[0-9]))'
|
||||
doubleBackSlash: '\\\\(?:\h*\[\h*\d+\h*[a-zA-Z]+\h*\])?'
|
||||
comma: ','
|
||||
betterFullStop: |-
|
||||
(?x) # ignore spaces in the below
|
||||
(?: #
|
||||
\.\) # .)
|
||||
(?!\h*[a-z]) # not *followed by* a-z
|
||||
) #
|
||||
| # OR
|
||||
(?: #
|
||||
(?<! # not *preceeded by*
|
||||
(?: #
|
||||
(?:[eE]\.[gG]) # e.g OR E.g OR e.G OR E.G
|
||||
| #
|
||||
(?:[iI]\.[eE]) # i.e OR I.e OR i.E OR I.E
|
||||
| #
|
||||
(?:etc) # etc
|
||||
) #
|
||||
) #
|
||||
) #
|
||||
\. # .
|
||||
(?! # not *followed by*
|
||||
(?: #
|
||||
[a-zA-Z0-9-~,] #
|
||||
| #
|
||||
\), # ),
|
||||
| #
|
||||
\)\. # ).
|
||||
) #
|
||||
) #
|
||||
|
Reference in New Issue
Block a user