texlive[51646] trunk: arara (15jul19)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 15 22:48:56 CEST 2019


Revision: 51646
          http://tug.org/svn/texlive?view=revision&revision=51646
Author:   karl
Date:     2019-07-15 22:48:56 +0200 (Mon, 15 Jul 2019)
Log Message:
-----------
arara (15jul19)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/arara/arara.sh
    trunk/Master/texmf-dist/doc/support/arara/README.md
    trunk/Master/texmf-dist/doc/support/arara/arara-manual.pdf
    trunk/Master/texmf-dist/doc/support/arara/arara.sty
    trunk/Master/texmf-dist/doc/support/arara/chapters/introduction.tex
    trunk/Master/texmf-dist/doc/support/arara/chapters/rules.tex
    trunk/Master/texmf-dist/scripts/arara/arara.jar
    trunk/Master/texmf-dist/scripts/arara/arara.sh
    trunk/Master/texmf-dist/scripts/arara/rules/indent.yaml

Added Paths:
-----------
    trunk/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml

Modified: trunk/Build/source/texk/texlive/linked_scripts/arara/arara.sh
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/arara/arara.sh	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Build/source/texk/texlive/linked_scripts/arara/arara.sh	2019-07-15 20:48:56 UTC (rev 51646)
@@ -1,9 +1,17 @@
-#!/bin/bash
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
-    jarpath=`cygpath -w $(kpsewhich --progname=arara --format=texmfscripts arara.jar)`
-else
-    jarpath=`kpsewhich --progname=arara --format=texmfscripts arara.jar`
+#!/bin/sh
+# Public domain. Originally written by Norbert Preining and Karl Berry, 2018.
+# Note from Paulo: this script provides better Cygwin support than our original
+# approach, so the team decided to use it as a proper wrapper for arara as well.
+
+scriptname=`basename "$0"`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
-java -jar "$jarpath" "$@"
+
+exec java -jar "$jarpath" "$@"

Modified: trunk/Master/texmf-dist/doc/support/arara/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/arara/README.md	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Master/texmf-dist/doc/support/arara/README.md	2019-07-15 20:48:56 UTC (rev 51646)
@@ -7,7 +7,7 @@
 ![Language: Java](https://img.shields.io/badge/language-Java-blue.svg?style=flat-square)
 ![Minimum JRE: 5.0](https://img.shields.io/badge/minimum_JRE-5.0-blue.svg?style=flat-square)
 [![License: New BSD](https://img.shields.io/badge/license-New_BSD-blue.svg?style=flat-square)](https://opensource.org/licenses/bsd-license)
-![CTAN packaging: 4.0.5](https://img.shields.io/badge/CTAN_packaging-4.0.5-blue.svg?style=flat-square)
+![CTAN packaging: 4.0.6](https://img.shields.io/badge/CTAN_packaging-4.0.6-blue.svg?style=flat-square)
 
 `arara` is a TeX automation tool based on rules and directives. It gives you a way to enhance your TeX experience. The tool is an effort to provide a concise way to automate the daily TeX workflow for users and also package writers. Users might write their own rules when the provided ones do not suffice.
 
@@ -30,7 +30,7 @@
 ![Current version: 4.0](https://img.shields.io/badge/current_version-4.0-blue.svg?style=flat-square)
 ![Development version: 5.0](https://img.shields.io/badge/development_version-5.0-red.svg?style=flat-square)
 
-The stable major version of `arara` is the 4.0 series (note that revision numbers may vary). Please refer to the development branch for more information on the upcoming 5.0 series release. The master branch always refers to the stable version (including potential revisions). The CTAN packaging for the current version is 4.0.3 (for internal use).
+The stable major version of `arara` is the 4.0 series (note that revision numbers may vary). Please refer to the development branch for more information on the upcoming 5.0 series release. The master branch always refers to the stable version (including potential revisions). The CTAN packaging for the current version is 4.0.6 (for internal use).
 
 For historical purposes, the source code for older versions of `arara` is available in the [releases](https://github.com/cereda/arara/releases) section of our repository. However, be mindful that these versions are unsupported.
 

Modified: trunk/Master/texmf-dist/doc/support/arara/arara-manual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/support/arara/arara.sty
===================================================================
--- trunk/Master/texmf-dist/doc/support/arara/arara.sty	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Master/texmf-dist/doc/support/arara/arara.sty	2019-07-15 20:48:56 UTC (rev 51646)
@@ -53,6 +53,7 @@
 \RequirePackage{amsfonts}
 \RequirePackage{kmath}
 \RequirePackage{bookman}
+\RequirePackage{comfortaa}
 \RequirePackage[regular]{sourcecodepro}
 
 \RequirePackage{adforn}
@@ -74,7 +75,7 @@
   pdfpagelabels
 ]{hyperref}
 
-\newcommand{\araratext}[1]{{\normalfont\fontfamily{fco}\selectfont\color{araracolour}\bfseries#1}}
+\newcommand{\araratext}[1]{{\normalfont\comfortaa\color{araracolour}\bfseries#1}}
 \newcommand*\arara{\araratext{ar\kern-.03emar\kern-.03ema}}
 \newcommand*\slogan{\araratext{The cool \TeX\ automation tool}}
 
@@ -430,8 +431,8 @@
 \renewcommand{\subsubsecheadstyle}{\normalsize\normalfont\em}
 \renewcommand{\paraheadstyle}{\normalsize\normalfont\em}
 \renewcommand{\subparaheadstyle}{\normalsize\normalfont\em}
-\renewcommand{\partnumfont}{\Large\fontfamily{fco}\selectfont\bfseries}
-\renewcommand{\partnamefont}{\Large\fontfamily{fco}\selectfont\bfseries}
+\renewcommand{\partnumfont}{\Large\comfortaa\bfseries}
+\renewcommand{\partnamefont}{\Large\comfortaa\bfseries}
 \renewcommand{\parttitlefont}{\Huge\normalfont\em}
 \renewcommand{\booktitlefont}{\huge\normalfont\em}
 \renewcommand{\booknamefont}{\huge\normalfont\em}
@@ -454,7 +455,7 @@
   \renewcommand*{\chapnamefont}{\normalfont}%
   \renewcommand*{\printchaptername}{%
     \centering\includegraphics[scale=.15]{logos/bird.pdf}\par}%
-  \renewcommand*{\chapnumfont}{\fontfamily{fco}\selectfont\bfseries}%
+  \renewcommand*{\chapnumfont}{\comfortaa\bfseries}%
   \renewcommand*{\printchapternum}{\centering \chapnumfont \ifanappendix
     \thechapter \else \textcolor{araracolour}{\numtoname{\c at chapter}}\fi}%
   \renewcommand*{\chaptitlefont}{\normalfont\itshape\huge\centering}%

Modified: trunk/Master/texmf-dist/doc/support/arara/chapters/introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/arara/chapters/introduction.tex	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Master/texmf-dist/doc/support/arara/chapters/introduction.tex	2019-07-15 20:48:56 UTC (rev 51646)
@@ -48,7 +48,7 @@
 That is the major difference of \arara\ when compared to other tools: \emph{it is not an automatic process and the tool does not employ any guesswork on its own}. You are in control of your documents; \arara\ will not do anything unless you \emph{teach it how to do a task and explicitly tell it to execute the task}.
 \end{messagebox}
 
-Now, how does one tell \arara\ to do a task? That is the actually the easy part, provided that you have everything up and running. We accomplish the task by adding a special comment line, hereafter known as \emph{directive}, somewhere in our \rbox{hello.tex} file (preferably in the first lines):
+Now, how does one tell \arara\ to do a task? That is actually the easy part, provided that you have everything up and running. We accomplish the task by adding a special comment line, hereafter known as \emph{directive}, somewhere in our \rbox{hello.tex} file (preferably in the first lines):
 
 \begin{ncodebox}{Source file}{teal}{\icnote}{white}{hello.tex}
 % arara: pdflatex
@@ -127,7 +127,7 @@
 Once \arara\ finds a directive, it will look for the associated \emph{rule}. In our example, it will look for a rule named \rbox{pdflatex} which will evidently run the \rbox{pdflatex} command line application. Rules are \gls{YAML} files named according to their identifiers followed by the \rbox{yaml} extension and follow a strict structure. This concept is covered in Section~\ref{sec:rule}, on page~\pageref{sec:rule}.
 
 \begin{messagebox}{New feature in version 4.0}{araracolour}{\icattention}{white}
-\textbf{\gls{REPL} workflow} -- \arara\ now employs a \gls{REPL} workflow for rules and directives. In previous versions, directives were extracted, their corresponding rules were analized, commands were built and added to a queue before any proper execution or evaluation. I decided to change this workflow, so now \arara\ evaluates each rule on demand, i.e, there is no \emph{a priori} checking. A rule will \emph{always} reflect the current state, including potential side effects from previous executed rules.
+\textbf{\gls{REPL} workflow} -- \arara\ now employs a \gls{REPL} workflow for rules and directives. In previous versions, directives were extracted, their corresponding rules were analyzed, commands were built and added to a queue before any proper execution or evaluation. I decided to change this workflow, so now \arara\ evaluates each rule on demand, i.e, there is no \emph{a priori} checking. A rule will \emph{always} reflect the current state, including potential side effects from previous executed rules.
 \end{messagebox}
 
 Now, we have a queue of pairs $(\textit{directive}, \textit{rule})$ to process. For each pair, \arara\ will map the directive to its corresponding rule, evaluate it and run the proper command. The execution chain requires that command $i$ was successfully executed to then proceed to command $i+1$, and so forth. This is also by design: \arara\ will halt the execution if any of the commands in the queue had raised an error. How does one know if a command was successfully executed? \arara\ checks the corresponding \emph{exit status} available after a command execution. In general, a successful execution yields 0 as its exit status.

Modified: trunk/Master/texmf-dist/doc/support/arara/chapters/rules.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/arara/chapters/rules.tex	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Master/texmf-dist/doc/support/arara/chapters/rules.tex	2019-07-15 20:48:56 UTC (rev 51646)
@@ -290,6 +290,16 @@
 % arara: dvipspdf: { output: article }
 \end{codebox}
 
+\item[\rulebox{dvisvgm}{samcarter}] This rule runs \rbox{dvisvgm} in order to obtain a corresponding \rbox{svg} file, a vector graphics format based on XML, from the initial \rbox{dvi} reference. It is important to observe that the base name is acquired from the \mtbox{currentFile} reference (i.e, the name without the associated extension) and used to construct the resulting file.
+
+\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: dvisvgm
+\end{codebox}
+
 \item[\rulebox{etex}{Marco Daniel, Paulo Cereda, Nicola Talbot}] This rule runs the \rbox{etex} extended (plain) \TeX\ engine on the provided \mtbox{currentFile} reference, generating a corresponding file in a device independent format.
 
 \begin{description}
@@ -393,7 +403,17 @@
 \end{description}
 
 \item[\abox{where}] This option, as the name indicates, sets the file location containing the indentation settings according to the provided value. This option can only be used if, and only if, \rbox[cyan]{local} is set as the value for the \abox{settings} option, otherwise the rule will throw an error.
+
+\item[\abox{replacement}] This option, as the name indicates, implements the replacement mode switches. Three possible values are available:
+
+\begin{description}
+\item[\povalue{full}] This value, as the name indicates, performs indentation and replacements, not respecting verbatim code blocks.
+
+\item[\povalue{noverb}] This value, as the name indicates, performs indentation and replacements, and will respect verbatim code blocks.
+
+\item[\povalue{noindent}] This value, as the name implies, will not perform indentation, and will perform replacements not respecting verbatim code blocks.
 \end{description}
+\end{description}
 
 \begin{codebox}{Example}{teal}{\icnote}{white}
 % arara: indent: { overwrite: yes }

Modified: trunk/Master/texmf-dist/scripts/arara/arara.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/arara/arara.sh
===================================================================
--- trunk/Master/texmf-dist/scripts/arara/arara.sh	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Master/texmf-dist/scripts/arara/arara.sh	2019-07-15 20:48:56 UTC (rev 51646)
@@ -1,9 +1,17 @@
-#!/bin/bash
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
-    jarpath=`cygpath -w $(kpsewhich --progname=arara --format=texmfscripts arara.jar)`
-else
-    jarpath=`kpsewhich --progname=arara --format=texmfscripts arara.jar`
+#!/bin/sh
+# Public domain. Originally written by Norbert Preining and Karl Berry, 2018.
+# Note from Paulo: this script provides better Cygwin support than our original
+# approach, so the team decided to use it as a proper wrapper for arara as well.
+
+scriptname=`basename "$0"`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
-java -jar "$jarpath" "$@"
+
+exec java -jar "$jarpath" "$@"

Added: trunk/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml	                        (rev 0)
+++ trunk/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml	2019-07-15 20:48:56 UTC (rev 51646)
@@ -0,0 +1,28 @@
+!config
+# Arara, the cool TeX automation tool
+# Copyright (c) 2018, Paulo Roberto Massa Cereda 
+# All rights reserved.
+#
+# This rule is part of arara.
+identifier: dvisvgm
+name: DVISVGM
+authors:
+- samcarter
+commands:
+- name: The dvisvgm program
+  command: >
+    @{
+        base = getBasename(file).concat('.dvi');
+        return getCommand('dvisvgm', base, options);
+    }
+arguments:
+- identifier: options
+  flag: >
+    @{
+        if (isList(parameters.options)) {
+            return parameters.options;
+        }
+        else {
+            throwError('I was expecting a list of options.');
+        }
+    }

Modified: trunk/Master/texmf-dist/scripts/arara/rules/indent.yaml
===================================================================
--- trunk/Master/texmf-dist/scripts/arara/rules/indent.yaml	2019-07-15 20:48:30 UTC (rev 51645)
+++ trunk/Master/texmf-dist/scripts/arara/rules/indent.yaml	2019-07-15 20:48:56 UTC (rev 51646)
@@ -15,7 +15,7 @@
     @{
         return getCommand('latexindent', silent, trace, screenlog,
                settings, cruft, overwrite, output, file, modifylinebreaks,
-               options, logfile);
+               replacement, options, logfile);
     }
 arguments:
 - identifier: silent
@@ -85,6 +85,18 @@
           throwError('This key requires a local setting.');
       }
     }
+- identifier: replacement
+  flag: >
+    @{
+      opts = [ 'full' : '-r', 'noverb' : '-rv', 'noindent' : '-rr' ];
+      if (opts.keySet().contains(parameters.replacement)) {
+          return opts[parameters.replacement];
+      }
+      else {
+          throwError('You provided an invalid value for replacement.');
+      }
+    }
+
 - identifier: options
   flag: >
     @{



More information about the tex-live-commits mailing list