diff options
author | Karl Berry <karl@freefriends.org> | 2020-04-19 22:17:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-04-19 22:17:42 +0000 |
commit | 6135e0174268344cd165465be99f3ce77213eef7 (patch) | |
tree | 4e3ab85d7028d5dcd4fe9449ad8cf7b56812a5a1 /Master/texmf-dist | |
parent | 15eb137655e2e1056dfe40bb64f19e77520b0fcf (diff) |
arara (20apr20)
git-svn-id: svn://tug.org/texlive/trunk@54804 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/support/arara/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/arara/arara-manual.pdf | bin | 1865024 -> 1882028 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/arara/arara-manual.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/arara/chapters/rules.tex | 104 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/arara.jar | bin | 16028278 -> 16028291 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/perltex.yaml | 82 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/pythontex.yaml | 71 | ||||
-rw-r--r-- | Master/texmf-dist/source/support/arara/arara-5.1.2-src.zip (renamed from Master/texmf-dist/source/support/arara/arara-5.1.1-src.zip) | bin | 129837 -> 129813 bytes |
8 files changed, 252 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/support/arara/README.md b/Master/texmf-dist/doc/support/arara/README.md index 603096728fa..5c6b8dc2e1e 100644 --- a/Master/texmf-dist/doc/support/arara/README.md +++ b/Master/texmf-dist/doc/support/arara/README.md @@ -1,6 +1,6 @@ ![arara](https://i.stack.imgur.com/hjUsN.png) -# arara v5.1.1 +# arara v5.1.2 ![Language: Kotlin](https://img.shields.io/badge/Language-Kotlin-blue.svg?style=flat-square) ![Minimum JRE: 8.0](https://img.shields.io/badge/Minimum_JRE-8-blue.svg?style=flat-square) diff --git a/Master/texmf-dist/doc/support/arara/arara-manual.pdf b/Master/texmf-dist/doc/support/arara/arara-manual.pdf Binary files differindex 210a51de4e7..d6ce4e47feb 100644 --- a/Master/texmf-dist/doc/support/arara/arara-manual.pdf +++ b/Master/texmf-dist/doc/support/arara/arara-manual.pdf diff --git a/Master/texmf-dist/doc/support/arara/arara-manual.tex b/Master/texmf-dist/doc/support/arara/arara-manual.tex index 4b15732eec8..b93e2a10e66 100644 --- a/Master/texmf-dist/doc/support/arara/arara-manual.tex +++ b/Master/texmf-dist/doc/support/arara/arara-manual.tex @@ -42,7 +42,7 @@ \usepackage[margin=2.5cm]{geometry} \usepackage{arara} -\newcommand{\araraversion}{5.1.1} +\newcommand{\araraversion}{5.1.2} \begin{document} diff --git a/Master/texmf-dist/doc/support/arara/chapters/rules.tex b/Master/texmf-dist/doc/support/arara/chapters/rules.tex index a3f10dc2af8..ace21a6fad5 100644 --- a/Master/texmf-dist/doc/support/arara/chapters/rules.tex +++ b/Master/texmf-dist/doc/support/arara/chapters/rules.tex @@ -1039,6 +1039,70 @@ This rule runs the \rbox{pdftex} \TeX\ engine on the provided \mtbox{currentFile % arara: pdftex: { draft: yes } \end{codebox} +\item[\rulebox{pdftk}] +This rule runs \rbox{pdftk}, a command line tool for manipulating Portable Document Format documents, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{pdf} suffix. + +\begin{description} +\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value. +\end{description} + +\begin{codebox}{Example}{teal}{\icnote}{white} +% arara: pdftk: { options: [ burst ] } +\end{codebox} + +\item[\rulebox{perltex}] +This rule runs \rbox{perltex}, a wrapper that enables a symbiosis between Perl, a popular general purpose programming language, and a \TeX\ engine, on the provided \mtbox{currentFile} reference. + +\begin{description} +\item[\rpbox{engine}{latex}] This option, as the name indicates, sets the underlying \TeX\ engine to be used for the current compilation. Make sure to take a look at the manual for further details on this option. Possible values are: + +\begin{description} +\item[\povalue{latex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{latex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{pdflatex}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{pdflatex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{xelatex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{xelatex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{lualatex}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{lualatex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{tex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{tex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{pdftex}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{pdftex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{luatex}] This value, as the name suggests, sets the underlying \TeX\ engine to \rbox{luatex} for the current compilation. Note that the engine might play a major role in the generated code. + +\item[\povalue{context}] This value, as the name indicates, sets the underlying \TeX\ engine to \rbox{context} for the current compilation. Note that the engine might play a major role in the generated code. +\end{description} + +\item[\rpsbox{safe}] This option sets whether the wrapper should enable sandboxing. When explicitly disabled, the wrapper might execute any arbitrary Perl code, including that which can harm files. + +\item[\abox{permit}] This option takes a list of values in which indicate particular Perl operations to be performed, enabling finer-grained control over the wrapper sandbox. + +\item[\rpsbox{standalone}] This option generates a specific style file to make the document suitable for distribution to users who do not have the wrapper installed. Please refer to the manual for further details on this option. + +\item[\abox{interaction}] This option alters the underlying engine behaviour. If this option is omitted, \TeX\ will prompt the user for interaction in the event of an error. Possible values are, in order of increasing user interaction (courtesy of our master Enrico Gregorio): + +\begin{description} +\item[\povalue{batchmode}] In this mode, nothing is printed on the terminal, and errors are scrolled as if the \rbox{return} key is hit at every error. Missing files that \TeX\ tries to input or request from keyboard input cause the job to abort. + +\item[\povalue{nonstopmode}] In this mode, the diagnostic message will appear on the terminal, but there is no possibility of user interaction just like in batch mode, previously described. + +\item[\povalue{scrollmode}] In this mode, as the name indicates, \TeX\ will stop only for missing files to input or if proper keyboard input is necessary. \TeX\ fixes errors itself. + +\item[\povalue{errorstopmode}] In this mode, \TeX\ will stop at each error, asking for proper user intervention. This is the most user interactive mode available. +\end{description} + +\item[\rpsbox{shell}] This option sets whether the possibility of running underlying system commands from within \TeX\ is activated. + +\item[\rpsbox{synctex}] This option sets whether \rbox{synctex}, an input and output synchronization feature that allows navigation from source to typeset material and vice versa, available in most \TeX\ engines, is activated. + +\item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value. +\end{description} + +\begin{codebox}{Example}{teal}{\icnote}{white} +% arara: perltex: { safe: no, standalone: yes } +\end{codebox} + \item[\rulebox{platex}] This rule runs the \rbox{platex} \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format. @@ -1074,28 +1138,54 @@ This rule runs the \rbox{platex} \TeX\ engine on the provided \mtbox{currentFile % arara: platex: { interaction: scrollmode, shell: yes } \end{codebox} -\item[\rulebox{pdftk}] -This rule runs \rbox{pdftk}, a command line tool for manipulating Portable Document Format documents, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{pdf} suffix. +\item[\rulebox{ps2pdf}] +This rule runs \rbox{ps2pdf}, a tool that converts PostScript to Portable Document File, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{ps} suffix. \begin{description} +\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value. + \item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value. \end{description} \begin{codebox}{Example}{teal}{\icnote}{white} -% arara: pdftk: { options: [ burst ] } +% arara: ps2pdf: { output: article } \end{codebox} -\item[\rulebox{ps2pdf}] -This rule runs \rbox{ps2pdf}, a tool that converts PostScript to Portable Document File, on the corresponding base name of the \mtbox{currentFile} reference (i.e, the name without the associated extension) as a string concatenated with the \rbox{ps} suffix. +\item[\rulebox{pythontex}] +This rule runs \rbox{pythontex}, a wrapper that provides access to Python from within typical \TeX\ documents, on the provided \mtbox{currentFile} reference. Make sure to take a look at the documentation for further details. \begin{description} -\item[\abox{output}] This option, as the name indicates, sets the output name for the generated \rbox{pdf} file. There is no need to provide an extension, as the value is always normalized with \mtbox{getBasename} such that only the name without the associated extension is used. The base name of the current file reference is used as the default value. +\item[\abox{encoding}] This option sets the encoding of the underlying \TeX\ document and all related files. If an encoding is not specified, Unicode is assumed. + +\item[\rpsbox{errorcode}] This option determines whether an exit code of 1 is returned if there were errors. On by default, but can be turned off since it is undesirable when working with some editors. + +\item[\rpsbox{runall}] This option sets whether all code to be executed, regardless of modification. It is useful when code has not been modified, but a dependency such as a library or external data has changed. + +\item[\abox{rerun}] This option, as the name indicates, sets the underlying threshold for reexecuting code. By default, the wrapper will rerun code that has been modified or that produced errors on the last run. Possible values are: + +\begin{description} +\item[\povalue{never}] When this value is used, the wrapper never executes code. In this scenario, a warning is issued if there is modified code. Please refer to the documentation for further details. + +\item[\povalue{modified}] When this value is used, as the name indicates, the wrapper only executes code that has been modified or that has modified dependencies. + +\item[\povalue{errors}] When this value is used, as the name indicates, the wrapper executes code that has been modified as well as code that produced errors on the last run. + +\item[\povalue{warnings}] When this value is used, as the name indicates, the wrapper executes code that has been modified as well as code that produced errors or warnings on the last run. + +\item[\povalue{always}] When this value is used, as the name indicates, the wrapper executes all code, regardless of modification or errors and warnings. It is useful when code has not been modified, but a dependency such as a library or external data has changed. +\end{description} + +\item[\rpsbox{hashdependencies}] This option, as the name suggests, determines whether dependencies are checked for changes via their hashes or modification times. + +\item[\abox{jobs}] This option, as the name suggests, takes an integer value denoting the maximum number of concurrent processes. By default, the wrapper relies on the number of CPUs in the system. + +\item[\rpsbox{verbose}] This option sets whether the wrapper should be executed in verbose mode, providing more output information, including a list of all processes that are launched. \item[\abox{options}] This option, as the name indicates, takes a list of raw command line options and appends it to the actual system call. An error is thrown if any data structure other than a proper list is provided as the value. \end{description} \begin{codebox}{Example}{teal}{\icnote}{white} -% arara: ps2pdf: { output: article } +% arara: pythontex: { jobs: 2, verbose: yes } \end{codebox} \item[\rulebox{qpdf}] diff --git a/Master/texmf-dist/scripts/arara/arara.jar b/Master/texmf-dist/scripts/arara/arara.jar Binary files differindex 3571ec7aaf0..6422203a428 100644 --- a/Master/texmf-dist/scripts/arara/arara.jar +++ b/Master/texmf-dist/scripts/arara/arara.jar diff --git a/Master/texmf-dist/scripts/arara/rules/perltex.yaml b/Master/texmf-dist/scripts/arara/rules/perltex.yaml new file mode 100644 index 00000000000..09a838153d6 --- /dev/null +++ b/Master/texmf-dist/scripts/arara/rules/perltex.yaml @@ -0,0 +1,82 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: perltex +name: PerlTeX +authors: +- Island of TeX +commands: +- name: PerlTeX wrapper + command: > + @{ + return getCommand('perltex', engine, safe, permit, standalone, + interaction, shell, synctex, options, + reference.getName()); + } +arguments: +- identifier: engine + flag: > + @{ + if ([ 'latex', 'pdflatex' , 'xelatex', 'lualatex', 'tex', 'pdftex', + 'luatex', 'context' ].contains(parameters.engine)) { + return '--latex='.concat(parameters.engine); + } else { + throwError('The provided TeX engine is invalid.'); + } + } +- identifier: safe + flag: > + @{ + return isTrue(parameters.safe, '--safe', '--nosafe'); + } +- identifier: permit + flag: > + @{ + if (isList(parameters.permit)) { + p = []; + foreach(entry: parameters.permit) { + p.add('--permit='.concat(entry)); + } + return p; + } else { + throwError('I was expecting a list.'); + } + } +- identifier: standalone + flag: > + @{ + return isTrue(parameters.standalone, '--makesty'); + } +- identifier: interaction + flag: > + @{ + if ([ 'batchmode', 'nonstopmode', 'scrollmode', + 'errorstopmode' ].contains(parameters.interaction)) { + return '--interaction='.concat(parameters.interaction); + } + else { + throwError('The provided interaction value is not valid.'); + } + } +- identifier: shell + flag: > + @{ + isTrue(parameters.shell, '--shell-escape', '--no-shell-escape') + } +- identifier: synctex + flag: > + @{ + isTrue(parameters.synctex, '--synctex=1', '--synctex=0') + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } else { + throwError('I was expecting a list of options.'); + } + } diff --git a/Master/texmf-dist/scripts/arara/rules/pythontex.yaml b/Master/texmf-dist/scripts/arara/rules/pythontex.yaml new file mode 100644 index 00000000000..671d4abe34a --- /dev/null +++ b/Master/texmf-dist/scripts/arara/rules/pythontex.yaml @@ -0,0 +1,71 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2020, Island of TeX +# All rights reserved. +# +# This rule is part of arara. +identifier: pythontex +name: PythonTeX +authors: +- Island of TeX +commands: +- name: PythonTeX wrapper + command: > + @{ + return getCommand('pythontex', encoding, errorcode, runall, rerun, + hashdependencies, jobs, verbose, options, + reference.getName()); + } +arguments: +- identifier: encoding + flag: > + @{ + return '--encoding='.concat(parameters.encoding); + } +- identifier: errorcode + flag: > + @{ + return '--error-exit-code='.concat(isTrue(parameters.errorcode, + 'true', 'false')); + } +- identifier: runall + flag: > + @{ + return '--runall='.concat(isTrue(parameters.runall, 'true', 'false')); + } +- identifier: rerun + flag: > + @{ + if ([ 'never', 'modified', 'errors', 'warnings', + 'always' ].contains(parameters.rerun)) { + return '--rerun='.concat(parameters.rerun); + } + else { + throwError('The provided value is not valid.'); + } + } +- identifier: hashdependencies + flag: > + @{ + return '--hashdependencies='.concat(isTrue(parameters.hashdependencies, + 'true', 'false')); + } +- identifier: jobs + flag: > + @{ + return [ '--jobs', parameters.jobs ]; + } +- identifier: verbose + flag: > + @{ + return isTrue(parameters.verbose, '--verbose'); + } +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } else { + throwError('I was expecting a list of options.'); + } + } diff --git a/Master/texmf-dist/source/support/arara/arara-5.1.1-src.zip b/Master/texmf-dist/source/support/arara/arara-5.1.2-src.zip Binary files differindex a17febf320e..afa90b9ebee 100644 --- a/Master/texmf-dist/source/support/arara/arara-5.1.1-src.zip +++ b/Master/texmf-dist/source/support/arara/arara-5.1.2-src.zip |