github cmhughes/latexindent.pl V4.0

one month ago

A major release that overhauls the way latexindent.pl finds code blocks.

Some user settings have changed or are now obsolete; full details below.

enhancements:

  • all users should notice better performance, more natural interaction of poly-switches, and less scaffolding needed
  • fineTuning specifies defaults for lookForAlignDelims, see issue-583
  • double back slash regex allows . between [...], see issue-564
  • switchesViaYaml, see issue-574

bug fixes

V4.0 verbose details
itemNames: 
  item: 1  
  myitem: 1
fineTuning:
  items:
    itemRegEx: \\(?:item|myitem)
specialBeginEnd:
 inlineMath:
    begin: (?
  
specialBeginEnd:
  - name: inlineMath                                     
    begin: (?
  
old formatting (unordered) will be read, but recommend moving to new format (ordered); `body` no longer does anything
specialBeginEnd:
  specialBeforeCommand: 0
  
none obsolete
commandCodeBlocks:              
  roundParenthesesAllowed: 1   
fineTuning:
  arguments:
    between: |-                               
      (?x)                                    
      (?:                                     
        [_^*#0-9(),+-]                        
        |                                     
        (?:node|at|to|decoration)             
        |                                     
        (?:\([^)]*\))                         
      )                                       
behaviour should be unchanged, controlled by fineTuning
commandCodeBlocks:   
  commandNameSpecial:
    - amalgamate: 1  
    - '@ifnextchar\['
specialBeginEnd:
  - name: ifnextchar
    begin: \@ifnextchar
    end: \[
    lookForThis: verbatim
add this to your YAML when appropriate
noAdditionalIndent:
  document: 1
  myexample: 1     #  removed
  mydefinition:1   #  removed
  problem: 1       #  removed
  exercises: 1     #  removed
  mysolution: 1    #  removed
  foreach: 0       #  removed
  widepage: 1      #  removed
  comment: 1       #  removed
  frame: 0         #  removed
noAdditionalIndent:
  document: 1
feel free to add these back in to your own settings
preambleCommandsBeforeEnvironments: 0
none obsolete
indentAfterHeadings:
  part:
    indentAfterThisHeading: 0
indentAfterHeadings:
  part:
    lookForThis: 0
old syntax still supported, with warning
noAdditionalIndentGlobal:
  filecontents: 0
none obsolete
indentRulesGlobal:
  filecontents: 0
none obsolete
modifyLineBreaks:
  textWrapOptions:
    blocksFollow:
      filecontents: 1
    blocksEndBefore:
      filecontents: 1
none obsolete
modifyLineBreaks:
  commands:
    CommandNameFinishesWithLineBreak: 0
none this poly-switch NO LONGER DOES ANYTHING, control goes to argument poly-switch instead
modifyLineBreaks:
  namedGroupingBracesBrackets:
    NameFinishesWithLineBreak: 0
none this poly-switch NO LONGER DOES ANYTHING, control goes to argument poly-switch instead
fineTuning:
  items:
    canBeFollowedBy: 
  keyEqualsValuesBracesBrackets:
    follow: 
  namedGroupingBracesBrackets:
    follow: 
  UnNamedGroupingBracesBrackets:
    follow: 
  arguments:
    before: 
none obsolete
partnering poly-switch behaviour sequential in order of appearance natural behaviour: poly-switches are obeyed in the natural order in which the code block is encountered

Don't miss a new latexindent.pl release

NewReleases is sending notifications on new releases.