github cmhughes/latexindent.pl V3.13

latest releases: V4.0, V3.24.7, V3.24.6...
4 years ago

This release implements an upgrade to the verbatim blocks, and friends. Thank you to @XuehaiPan for this contribution.
See #288 for discussion and history.

Summary

  1. Anything specified within noIndentBlock, verbatimEnvironments and verbatimCommands can now be specified in the form
verbatimEnvironments:
       nameAsRegex:
         name: '\w+code\*?' 
         lookForThis: 1
  1. the lookForThis field is optional, and if not present, will assumed to be 1 (this is consistent with other settings in the script)
  2. we have used nameAsRegex but it could be named as anything, for example, it could be named mintedalias
verbatimEnvironments:
       mintedalias:
         name: '\w+code\*?' 
         lookForThis: 1
  1. if the users code only contains \begin{pythoncode}...\end{pythoncode} then the above YAML settings is equivalent to
verbatimEnvironments:
       pythoncode: 1
  1. For noIndentBlock users can specify begin and end (both) or only name:
noIndentBlock:
  beginend:
    begin: regex_begin
    end: regex_end
    body: regex_body  # optional

  nameonly:
    name: regex_name
    body: regex_body  # optional

  # the above is equivalent to the follows when `regex_name` does not contain `'*'` and body is omitted
  regex_name: 1
  1. The following settings are examples of incomplete/conflicted settings, which will be ignored:
  # the followings are ignored
  none:  # incomplete settings, ignored
    lookForThis: 1

  beginonly:  # incomplete settings, ignored
    begin: regex_begin

  endonly:  # incomplete settings, ignored
    end: regex_end

  namebeginend:  # conflict settings, ignored
    begin: regex_begin
    end: regex_end
    name: regex_name

  namebegin:  # conflict settings, ignored
    begin: regex_begin
    name: regex_name

  nameend:  # conflict settings, ignored
    end: regex_end
    name: regex_name

Don't miss a new latexindent.pl release

NewReleases is sending notifications on new releases.