This section describes the parameters of both the ant-task and the maven-plugin. There are also general aspects, treated in Section 6.1. As this software mainly acts by invoking other converter and checker, most parameters refer to commands and options for invocations, but there are also parameters which cannot be associated to an individual invocation. Parameters referring to the conversion process or to checking as a whole are collected in Section 6.2. A special case is Section 6.3 which collects the parameters for goals vrs and inj. All the other sections refer to one or more converters.
The parameters are listed in Tables 6.1 through 6.13 with names, default values and short explanations. Note that neither of the parameters is mandatory, as there are always valid default values.
Each of the tables is described in a separate section, only the tables 6.8 and 6.9 for pythontex and for depythontex, respectively, are collected in the single Section 5.5.
Table 6.1 shows parameters controlling the general conversion process described in detail in Section 6.2. These are directories with names xxxDirectory and further parameters not following a naming convention. The other tables show parameters after a certain naming scheme: Command names have the form xxxCommand and the parameter with the according options have the form xxxOptions. Here xxx represents a certain converter. This is one of
The converter of fig-files into mixed latex- and PDF-files.
The converter of gnuplot-files into mixed latex- and PDF-files.
The converter of MetaPost-files into mixed latex- and PDF-files.
The converter of latex-files into PDF-files.
The creator of a bibliography from an aux-file.
The makeindex utility creating an index.
The makeglossaries utility creating a glossary.
The utility to invoke python and other languages from within LaTeX and to replace the code by its results dynamically.
The utility to replace code finally after a run of pythontex.
The converter of latex into HTML and also into ODT, depending on the parameters.
The converter of latex-files into RTF-files.
The converter of ODT-files into doc(x)-files.
The converter of PDF-files into TXT-files.
A code-checker converting in a sense a LaTeX main file into a log-file containing errors, warnings and further messages.
A diff tool comparing the PDF file created with an expected PDF file. This is relevant only if a PDF file has been created and if the comparison is activated, which is not true by default.
It is a little more complicated with the parameters in Section 6.10.
The command name and the list of options describes the invocation of the command. This LaTeX builder supervises also the return value frequently and the log file is supervised.
There are some parameters of the form patternXxxYyy, referring to a pattern in the log-file of the converter Xxx indicating an event Yyy which is one of the following:
indicates that Xxx needs to be rerun.
indicates that Xxx had an error.
indicates that Xxx had a warning.
Besides the abovementioned patterns, describing events in log files, there are further patterns. The maybe the most prominent one, patternLatexMainFile, is devoted a separate section, Section 6.2.1. All patterns, i.e. all parameters of the form patternZZZ are interpreted as regular expressions in a variant slightly generalizing the default implementation for java. We owe description and implementation to Florian Ingerl.
Essentially, there are two kinds of parameters: Most are just passed to the converters invoked by this software. The parameters of this software are so that the choice of the converter, i.e. the name of the application can be configured, and also each converter can be almost freely configured.
Parameters not passed to an application, are either really crucial or are included to allow also development of latex files.
As pointed out in the introduction of this chapter, this software acts mainly by invoking various converters. The converters are grouped in so-called categories. The converters of a category have the same (file-)interface, means read and write the same files and, mostly but not strictly necessarily, have the same options. For each category there is an option xxxCommand, where xxx is the name of the category in lowercase letters1 . The value of the option is the command to invoke the converter of the category. Also, there is a default converter in each category, and sometimes there is just a single converter possible. For example, lualatex is the default converter in the category latex.
This software knows about converters and registers the ones approved for this software. Among the advantages are, that it is ensured that the converter is really in that category and that this software checks whether a converter used is in the right category, and it checks whether it is installed in an approved version. On the other hand, there are cases, where the user needs to invoke a custom converter. In this case, the command name shall be given in the form
<categoryCommand>commandName:category</categoryCommand>
to make sure, that the user is really aware that the converter (s)he uses is in the correct category, i.e. has the required interface. Since neither of the registered converters has a : in its name, This form is identified by the occurrence of a colon. Since the categories neither have colons in their names, separation of command name and category is by the last colon occurring. That way, command names may contain colons also.
For most categories of converters, in fact at the time of this writing with a single exception, one can specify command line options, specified in the form
<categoryOptions></categoryOptions>
In fact, only for diffPdfCommand there is no option at all, and for some converters with more complex options, the options are split over more than one setting, e.g. for converter category fig2dev converting fig-files, there are general settings given by fig2devGenOptions and settings specific for the output language: LaTeX (fig2devPtxOptions) and eps (fig2devPdfEpsOptions. In any case, options are trimmed, i.e. leading and trailing white spaces are removed before being processed. There are cases, where the options as given are not directly passed to the converter but is further processed. In this case, the processing is documented.
This section describes the general parameters given in Table 6.1.
Parameter | Default |
Explanation
| |
texSrcDirectory | src/site/tex |
The latex source directory as a string relative to $baseDirectory, containing
$texSrcProcDirectory. This directory determines also the subdirectory of
$outputDirectory to lay down the generated artifacts. The default value is
“src/site/tex” on Unix systems. | |
texSrcProcDirectory | . |
The latex source processing directory as a string relative to $texSrcDirectory
containing all tex main documents and the graphic files to be processed and
also to be cleaned. Whether this is done recursively in sub-folders is specified
by $readTexSrcProcDirRec. The default value is “.”. | |
readTexSrcProcDirRec | true |
Whether the tex source directory $texSrcProcDirectory shall be read
recursively for creation of graphic files, i.e. including the sub-directories
recursively. This is set to false only during development of documentation. | |
outputDirectory | . |
The generated artifacts will be copied to outputDirectory relative to
$targetSiteDirectory which is by default ’$targetDirectory/site’ on
Unix systems. | |
targets | chk, pdf, html |
A comma separated list of targets without blanks to be stored in $targetSet.
Allowed values are chk, dvi, pdf, html, odt, docx, rtf and txt.
The targets are mostly related to output formats. One exception is chk which represents a check, i.e. linting of the source. While in general target dvi represents creation of output in DVI format, if $latex2pdfCommand is set to xelatex, the target dvi yields an output in extended DVI format, i.e. in XDV. Also target html may represent creation of HTML files and of XHMTL files. Analogously docx corresponds with DOCX format by default, but can also be configured to mean DOC. Independent of the order given, the given targets are created in an internal ordering. CAUTION: These targets are the default targets for any LaTeX main file, but depending on the document class, there may be further restrictions given by setting ’$docClassesToTargets’. Currently, only the class beamer used for presentations has restrictions. Moreover, these targets may be overwritten for individual LaTeX main files using magic comments as described in Section 3.1.1.0. | |
convertersExcluded | empty |
A comma separated list of excluded Converters given by their command.
Excluded converters need not be installed, but their names must be known.
They don’t show up in the version check of target vrs and of course they are
not allowed to be used. | |
patternLatexMainFile | see Section 6.2.1 |
The pattern to be applied to the beginning of the contents of TEX-files which
identifies a LaTeX main file, i.e. a file to be compiled. If the file is really a
LaTeX main file, the pattern contributes to finding the targets for compilation.
This may be done either directly via a magic comment or via the document
class.
The default value for the pattern is chosen to match quite exactly the start of the LaTeX main files. Here we assume that the LaTeX main file should contain the declaration “\documentclass” or the old-fashioned “\documentstyle” preceded by a few constructs and followed by the document class. Among the few constructs are also comments and in particular magic comments. Strictly speaking, a tight match is not necessary, only separation of LaTeX main files from other files is and so is extraction of the document class. For a more thorough discussion, and for an alternative approach, consult the manual. Since the pattern is chosen according to documentation collected from the internet, one can never be sure whether the pattern is perfect. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. In any case, matching of the group named class must be retained so that the document class is matched. | |
docClassesToTargets | see description below |
Assigns to document classes their allowed ‘targets’. The map expression is a
list of chunks separated by a single blank. Each chunk is divided by a single
colon in a comma separated list of document classes, and a comma separated
list of targets.
A chunk means that all given document classes are compiled for the given targets. Thus, the set of document classes may not be empty, i.e. the colon may not be at the first place of its chunk. In contrast, a colon at the last place of a chunk indicates an empty target set, meaning that documents of the given class are not processed at all. The document classes of the chunks may not overlap. A document of a class is compiled for a target if this is specified so by a chunk. As a side effect, compilation of document classes cause warnings if not registered here. The default value consists of two chunks:
CAUTION: Due to a bug in maven, setting this to the empty string is ignored. CAUTION: This setting is ignored, if targets are specified for individual LaTeX main files using magic comments as described in Section 3.1.1.0. | |
mainFilesIncluded | empty string |
The list of names of LaTeX main files without extension .tex separated by
whitespace which shall be included for creating targets, except if this is empty
in which cases all are included. It is assumed that the names of the LaTeX main
files do not contain whitespace. Note that leading and trailing whitespace are
trimmed. Currently, names of LaTeX main files should better have pairwise
different names, even if in different directories. The empty string is the default,
i.e. including all. See parameter mainFilesExcluded. | |
mainFilesExcluded | empty string |
The list of names of LaTeX main files without extension .tex separated
by whitespace which shall be excluded for creating targets. It is assumed
that the names of the LaTeX main files do not contain whitespace. Note
that leading and trailing whitespace are trimmed. Currently, names of LaTeX
main files should better have pairwise different names, even if in different
directories. Together with mainFilesExcluded, this is used for document
development to build the PDF-files of a subset of documents and e.g. because
for a site one needs all documents, but with the software only the manual is
shipped. The empty string is the default, i.e. excluding no file. See parameter
mainFilesIncluded. | |
latexmkUsage | NotAtAll |
The extent to which latexmk or to be more precise, the command given by
latexmkCommand is used to build. The following values for build strategy are
allowed:
This setting can be overwritten for individual LaTeX main files by the magic comment latexmkMagic described in Section 6.2.1. For a more detailed description of usage of latexmk see Section 5.9. | |
texPath | empty string |
Path to the TeX scripts or null. In the latter case, the scripts must
be on the system path. Note that in the pom, <texPath/> and even
<texPath> </texPath> represent the null-File. The default value is null. | |
cleanUp | true |
Clean up the working directory in the end? May be used for debugging when
setting false. | |
patternCreatedFromLatexMain | see Section 6.2.2 |
This pattern is applied to file names and matching shall accept all the files
which were created from a LaTeX main file ‘xxx.tex’. It is neither applied to
directories nor to ‘xxx.tex’ itself. It shall comprise neither graphic files to be
processed nor files created from those graphic files.
This pattern is applied in the course of processing graphic files to decide which graphic files should be processed (those rejected by this pattern) and to log warnings if there is a risk, that graphic files to be processed are skipped or that processing a LaTeX main file overwrites the result of graphic preprocessing. When clearing the LaTeX source processing directory $texSrcProcDirectory, i.e. all generated files should be removed, first those created from LaTeX main files. As an approximation, those are removed which match this pattern. The sequence ‘T$T’ is replaced by the prefix ‘xxx’. The sequence ‘T$T’ must always be replaced: The symbol ‘$’ occurs as end-sign as ‘)$’ or as literal symbol as ‘$’. Thus, ‘T$T’ is no regular occurrence and must always be replaced with ‘xxx’. Spaces and newlines are removed from that pattern before matching. This pattern may never be ensured to be complete, because any package may create files with names matching its own patterns and so any new package may break completeness. Nevertheless, the default value aims completeness while be tight enough not to match names of files not created. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. | |
Before reading the details given in this section, the user is advised to at least skim through Section 3.1.1 and 3.2 for intuitive understanding.
The regular expression pattern patternLatexMainFile matches exactly the files to be compiled, the so called LaTeX main files, and for LaTeX main files it extracts the following pieces of information, all by named capturing groups which have the form (!<name>pattern) but in the pom < and > must be escaped and so capturing groups take the form (!<name>pattern). The capturing group named docClass extracts the document class from the command \documentclass. If patternLatexMainFile matches, also the capturing group docClass matches, so that for LaTeX main files the document class is always known. All other capturing groups are defined though magic comments. As the document class, they are directives specific to the given file on how to compile it. They override the general settings given in the pom. A magic comment may not match, which means that there is no according specific directive and so the general setting holds.
Whether a capturing group must match or not, the regular expression pattern patternLatexMainFile must contain each of the following named capturing groups, because the software asks for it. Distinguish between the pattern and the matching strings: Whereas in the pattern all groups must be mentioned, a string may match without matching the group. Whereas docClass is mandatory, i.e. the according group matches, the magic comments are all optional, i.e. they need not match any part of the string.
the document class given by the command \documentclass.
the LaTeX engine to be used specifically for the according document. This is intended to be specified only if the required engine for the given document deviates from what is specified globally as setting latex2pdfCommand described in Table 6.4 on page 262.
the targets to be built. This is intended to be specified only if the targets for the given document deviate from what is specified globally as setting targets and docClassesToTargets, both given in Table 6.1 on page 246.
whether for creating PDF files latexmk shall be used. This is intended to run the build process with latexmk although the global setting latexmkUsage given in Table 6.1 on page 246 may specify direct compilation without latexmk.
The magic comment can take the form % !LMP latexmkMagic=<bool> or % !LMP latexmkMagic which is just short for % !LMP latexmkMagic=true.
whether the created PDF file shall be checked against an original ensuring that it is correctly reproduced. This is intended to control a check specific for this file overwriting the general setting chkDiff given in Table 6.13 on page 286.
The magic comment can take the form % !LMP chkDiff=<bool> or % !LMP chkDiff which is just short for % !LMP chkDiff=true.
The default pattern for identifying LaTeX main files and to extract the above pieces of information is given by Listing 6.1.
1\A 2(%\s*!\s*T[eE]X (TXS|spellcheck|encoding|root).*\R)* 3(%\s*!\s*T[eE]X program\s*=\s*(?<programMagic>[^} ]+)\R)? 4(%\s*!\s*T[eE]X .*\R)* 5(%\s*!\s*LMP (?<chkDiffMagic>chkDiff)(=(?<chkDiffMagicVal>true|false))?\R)? 6(%\s*!\s*LMP (?<latexmkMagic>latexmk)(=(?<latexmkMagicVal>true|false))?\R)? 7(%\s*!\s*LMP targets=(?<targetsMagic>(\p{Lower}|,)+)\R)? 8(\s*( 9\\RequirePackage\s*(\[(\s|\w|[,=])*\])?\s*\{(\w|-)+\}\s*(\[(\d|[-./])+\])?| 10\\PassOptionsToPackage\s*\{(\s|\w|[,=])*\}\s*\{(\w|-)+\}| 11\\newbool\s*\{\w+\}| 12\\setbool\s*\{\w+\}\{(true|false)\}| 13\\DocumentMetadata(?<brace>\{(?:[^{}]|(?'brace'))*\})| 14\\input\s*\{[^{}]*\} 15)?\s*(%.*)?\R)* 16\\(documentstyle|documentclass)\s*(\[[^]]*\])?\s*\{(?<docClass>[^} ]+)\}
Let us trace through line by line:
The \A indicates the start of the file.
These lines match magic comments % !TEX, which are used by other build tools also. Line 3 extracts programMagic from the first magic comment of the form % !TEX program=…. This is the behavior of the other tools also. The other lines are to skip information from magic comments % !TEX which are not needed.
These lines match magic comments of the form % !LMP… which are specific for this software. Like the above magic comments they are all optional, but their ordering is fixed:
to activate diffing to check reproduction, or in conjunction with chkDiffMagicVal to switch reproduction check.
to delegate build to latexmk.
allows to specify a list of targets. This is the sole of these magic comments not only applying to creating PDF files.
This defines material which may precede the command \documentclass, except for magic comments and is the only one without magic comments. Besides lines with specific commands, it matches empty lines and comment lines. Also, a line may start with whitespace and may contain a comand and end in a comment. The commands specified there may occur in arbitrary multiplicity and order. This section is likely to be modified by the user.
Matches the command \documentclass and extracts docClass.
Between magic comments and \documentclass or \documentstyle only the following material is allowed:
the command \RequirePackage specifying packages to be loaded before \documentclass, in contrast to \usepackage which is used after,
the command \PassOptionsToPackage allowing to pass one or more options to a package, although including with \usepackage is without options,
\newbool and \setbool to define and set a boolean value defining variants (preceeded by \RequirePackage{etoolbox}),
the command \DocumentMetadata allowing arbitrarily nested braces,
the command \input, and
whitespace, empty lines, comment lines even magic comments, although for this tool they are ignored.
This may be too restrictive and here is the point, where the use has freedom to change the pattern. On the other hand, \input offers a quick workaround to add material if a user is not familiar with regular expressions.
In the long run it must be thought of weakening the pattern: It is not necessary, that exactly the correct files are parsed, because incorrect files are detected by the LaTeX engine anyway. Instead, among the correct files the LaTeX main files shall be detected.
As a workaround for very special LaTeX main files, it is a good idea to let it indicate in a magic comment. Then the pattern as a whole must match, even not matching a \documentclass. From the point of view of this software, it makes sense to specify the document type in the magic comment then. Thinking one step further, also specifying the target or the LaTeX engine in a magic comment indicates already a LaTeX main file. Whereas the target set makes the document class superfluous, this is not the case for the magic comment specifying the LaTeX engine.
The LaTeX extension LaTeX workshop for VS Code offers two similar alternatives to identify LaTeX main files: Occurrence of \documentclass without checking preceding material and absence of first line % !TEX root= declaring a TEX file as depending on a LaTeX main file which must be given explicitly. The first alternative risks that a TEX file is recognized as main file, just because it deals with document classes, whereas the second alternative is inconvenient and does not work if a file has two potential LaTeX main files as is suggested for beamer presentations in Section 3.1 and realized in [Rei23a]. Although presence of % !TEX root= indicates that the according file is no LaTeX main file, this software ignores this magic comment.
Emacs with package AUCTeX, uses an alternative to the current technique to determine the LaTeX main files: LaTeX main files are marked with an end section as this file:
%%% Local Variables: %%% mode: latex %%% TeX-command-extra-options: "-recorder -shell-escape" %%% TeX-master: t %%% End:
The vital line in this context is %%% TeX-master: t. In contrast to this, a non-master file either has no end-section at all or has an end section declaring the according master file (if it is unique) explicitly as the following one from header.tex:
%%% Local Variables: %%% mode: latex %%% TeX-master: "manualLMP" %%% End:
Unlike the document class to be extracted from \documentclass and unlike other magic comments to be taken into account, those of AUCTeX are at the end of the file.
Although the author considers this approach charming, this software ignores AUCTeX-style magic comments, since otherwise the whole file is to be parsed. Sticking to regular expressions, the parsing engine must then keep the whole file in memory. All this would push down performance.
The files created from a LaTeX main file depend strongly on the compiler options and on packages used in the LaTeX main file and in the TEX-files inputted. The default value ‘^T$T\.[^.]*’ is appropriate for most parameters and packages: Most packages create files with names only which coincide with the name of the LaTeX main file, except the suffix. This is all sufficient even for programs doing post-processing such as bibtex, makeindex, xindy and makeglossaries.
The program splitindex requires in addition ‘^T$T-.+\.(idx|ind|ilg)’.
The utility pythontex requires ‘^T$Tḋepytx(\.tex)?’ and creates a bunch of further files all in a folder of the form ‘pythontex-files-T$T’ which must also be added to the regular expression.
Whereas typically latexmk creates only ‘^T$Tḟdb_latexmk’ which is included in the very first expression, during its run it creates ‘^(pdf|xe|lua)?latex\d+\.fls’, where the digits represent the process number. If interrupting latexmk, these files may remain, so it is appropriate to add them to the regular expression.
Package ‘srcltx’ or also synctex requires in addition ‘^T$T\.synctex(\.gz)?’ depending on the setting synctex=1 or synctex=-1. For long files the synctex may create a busy file ‘^T$T\.synctex\(busy\)?’. Even if the LaTeX process is interrupted regularly, at the end the busy file is erased, but still if interrupted from outside it may remain, so we add also the busy variant to the regular expression. Strictly speaking, ‘^T$T\.synctex(\(busy\))?(\.gz)?’ is not precisely what may occur, but is a good approximation.
The class beamer creates a lot of additional files but finally in addition to what we already have, it needs an additional ^T$T\.run\.xml and at times ^T$T\.\d+\.vrb.
Finally, package ‘tex4ht’ is for all the rest of the cases, created by packages.
The pattern is designed to match quite exactly the created files, not much more and at any case not less. In particular, it has to comprise the files matching pattern $patternT4htOutputFiles. Nevertheless, since any new package may break the pattern, and not every package is well documented, this pattern cannot be guaranteed to be final.
If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency.
The default value for this pattern is currently:
^( T$T (\.([^.]*| synctex(\(busy\))?(\.gz)?| out\.ps|run\.xml|\d+\.vrb| depytx(\.tex)?)| (-|ch|se|su|ap|li)?\d+\.x?html?| \d+x\.x?bb| \d+x?\.png| -\d+\.svg| -.+\.(idx|ind|ilg))| pythontex-files-T$T| zzT$T\.e?ps| (cmsy)\d+(-c)?-\d+c?\.png| (pdf|xe|lua)?latex\d+\.fls)$
This section describes the parameters for the goals vrs and inj given in Table 6.2. As illustrated in Listing 2.4 of the part of the pom referring to this plugin, in general parameters are configured in a settings element contained in a general configuration element. In contrast to this, the parameters for the goals vrs and inj are given in configurations within executions specific for these goals.
Parameter | Default |
Explanation
| |
versionsWarnOnly | false |
Indicates whether the goal vrs displays warnings only or also creates pieces of
info. Info refers to the version of this plugin and also on its git commit, but
also on the versions of the converters found and lists the converters excluded,
i.e. those not used and thus not tested on version.
Warnings are emitted e.g. if the version of a converter does not fit the expectations, the version of a converter could not be retrieved, e.g. because it is not installed or if the converter specified is unknown altogether. This defaults to false displaying also info. The latter is appropriate for using in command line mvn latex:vrs, whereas in builds by default the pom overwrites this to have output only in case something goes wrong. | |
injections | latexmkrc,chktexrc |
Indicates the files injected by the goal inj. This is a comma separated list of
injections without blanks. For further description see Section 3.5. | |
This section describes the parameters for graphical preprocessing given in Table 6.3.
TODO: do this.
Parameter | Default |
Explanation
| |
fig2devCommand | fig2dev |
The fig2dev command for conversion of fig-files into various formats. Currently,
only PDF combined with ptx is supported. | |
fig2devGenOptions | empty |
The options for the command $fig2devCommand common to both output
languages. For the options specific for the two output languages ‘pdftex’ and
‘pdftex_t’, see the explanation of the parameters $fig2devPtxOptions and
$fig2devPdfEpsOptions, respectively. | |
fig2devPtxOptions | empty |
The options for the command $fig2devCommand specific for the output
language ‘pdftex_t’. Note that in addition to these options, the option ‘-L
pdftex_t’ specifies the language, $fig2devGenOptions specifies the options
common for the two output languages ‘pdftex’ and ‘pdftex_t’ and ‘-p
xxx.pdf’ specifies the PDF-file to be included. | |
fig2devPdfEpsOptions | empty |
The options for the command $fig2devCommand specific for the output
language ‘pdftex’. Note that in addition to these option1s, the option ‘-L
pdftex’ specifies the language and $fig2devGenOptions specifies the options
common for the two output languages ‘pdftex’ and ‘pdftex_t’. | |
gnuplotCommand | gnuplot |
The command for conversion of gnuplot-files into various formats. Currently,
only pdf (graphics) combined with pdf_t (latex-texts) is supported. | |
gnuplotOptions | empty |
The options specific for $gnuplotCommand’s output terminal “cairolatex”, used
for mixed latex/pdf-creation. Note that the option ‘pdf|eps’ of the terminal
‘cairolatex’ is not available, because it is set internally. | |
metapostCommand | mpost |
The command for conversion of gnuplot-files into metapost’s postscript. | |
metapostOptions | see Section 6.4.1 |
The options for the command $metapostCommand. Leading and trailing blanks
are ignored. A sequence of at least one blank separate the proper options. | |
patternErrMPost | (^! ) |
The pattern is applied line by line to the log-file of $metapostCommand and
matching indicates an error emitted by the command $metapostCommand.
The default value is chosen to match quite exactly the latex errors in the log file, no more no less. Since no official documentation was found, The default pattern may be incomplete. In fact, it presupposes, that $metapostOptions does not contain ‘-file-line-error-style’. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. | |
patternWarnMPost | ^([Ww]arning: ) |
The pattern is applied line by line to the log-file of $metapostCommand and
matching indicates a warning emitted by the command $metapostCommand.
This pattern may never be ensured to be complete, because any library may indicate a warning with its own pattern any new package may break completeness. Nevertheless, the default value aims completeness while be restrictive enough not to indicate a warning where none was emitted. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. The default value is given below. | |
svg2devCommand | inkscape |
The command for conversion of SVG-files into a mixed format. | |
svg2devOptions | –export-area-drawing –export-latex |
The options for the command $svg2devCommand for exporting SVG-figures
into latex compatible files. For more details see Section 6.4.2. | |
createBoundingBoxes | false |
Whether for pixel formats like JPG and PNG command $ebbCommand is
invoked to determine the bounding box. This is relevant, if at all, only in
dvi-mode. Note that the package bmpsize is an alternative to invoking ebb,
which seems not to work for xelatex. Moreover, all seems to work fine
with neither of these techniques. The $dvi2pdfCommand given by the default,
dvipdfmx, seems the only which yields the picture sizes as in PDF mode which
fit well. Note also that MiKTeX offers neither package bmpsize nor ebb. This
alone requires to switch off invocation of ebb by default. So the default value
is false. | |
ebbCommand | ebb |
The command to create bounding box information from JPG-files and from
PNG-files. This is run twice: once with parameter ‘-m’ to create ‘.bb’-files for
driver ‘dvipdfm’ and once with parameter ‘-x’ to create ‘.xbb’-files for driver
‘dvipdfmx’. | |
ebbOptions | -v |
The options for the command $ebbCommand except ‘-m’ and ‘-x’ which are
added automatically. | |
The options of the (sole standalone) metapost compiler are given in the metapost manual [Hob24], Appendix B.2.1. The current default option line for this software is as follows:
-interaction=nonstopmode -recorder -s prologues=2 -s outputtemplate="%j.mps"
The details are as follows:
To avoid user interaction in case of an error This seems mandatory.
Strictly speaking not necessary at the current stage, but for later versions of this software, to allow dependencies tracking.
In general the -s assigns an internal key a value. Here it is the kind of the prologue. The value 2 is a compromise between safe quality of output and length of artifact. As described in detail in [Hob24], Section 8.2, a value of 0 is sufficient for PDF output. Also, if no LaTeX is used to typeset labels, the prologue value is irrelevant. The value 1 is deprecated, 2 yields a prologue only slightly longer than with 0, whereas the safest setting 3 yields a huge prologue. So the compromise is 2 and if 3 is needed in individual cases, this setting can be overwritten in the MP file.
determines the name of the output file. The default given here uses the “jobname” and the canonical ending. Unlike the default value of mpost, no number of the figure within the metapost file is given. This comes from the fact that we assume a single figure only and ignore the number of the figure.
The following options are mandatory:
Export the drawing (not the page).
Export into PDF/PS/EPS format without text. Besides the PDF/PS/EPS files, a LaTeX-file latexfile.tex is exported, putting the text on top of the PDF/PS/EPS file, i.e. including the according pure graphic file. Include the result in LaTeX as: \input{latexfile.tex}.
Note that the latter option is necessary, to create the expected files. It is also conceivable to export text as pdf/eps
The following options are prohibited, because they are automatically added by the software or interfers with:
Export document to a file with type given by the extension. This is used both to export into PDF and into EPS format. The extension is always given explicitly.
Overwrites the type given by –export-filename. If no extension is given, this is to determine the export type.
This section describes the parameters of the LaTeX engine which are given in Table 6.4.
TODO: do this.
Parameter | Default |
Explanation
| |
latex2pdfCommand | lualatex |
The LaTeX command to create above all a PDF-file with, i.e. the LaTeX
engine. Further formats are DVI and XDV and also other formats based on
these. Expected values are lualatex, xelatex and pdflatex. CAUTION:
This setting may be overwritten for individual LaTeX main files using magic
comments as described in Section 3.1.1.0.
Note that for xelatex dvi mode (creating xdv-files instead of DVI-files) is not supported, even not creating PDF or other formats via XDV. See also the according options $latex2pdfOptions and $pdfViaDvi. In particular, this maven plugin does not allow goal dvi and related for xelatex. Consequently, ’$targets’ may not contain any of these goals. | |
latex2pdfOptions | see Section 6.5.1 |
The options for the command $latex2pdfCommand. Leading and trailing
blanks are ignored. A sequence of at least one blank separate the proper
options. | |
patternErrLatex | (^! ) |
The pattern is applied line-wise to the log-file and matching indicating an error
emitted by the command $latex2pdfCommand.
The default value is chosen to match quite exactly the latex errors in the log file, no more no less. Since no official documentation was found, the default pattern may be incomplete. In fact, it presupposes, that $latex2pdfOptions does not contain “-file-line-error-style”. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. | |
patternWarnLatex | see Section 6.5.2 |
The pattern is applied line-wise to the log-file and matching indicates a warning
emitted by the command $latex2pdfCommand, disregarding warnings on bad
boxes provided $debugWarnings is set.
This pattern may never be ensured to be complete, because any package may indicate a warning with its own pattern any new package may break completeness. Nevertheless, the default value aims completeness while be restrictive enough not to indicate a warning where none was emitted. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. | |
debugBadBoxes | true |
Whether debugging of overfull/underfull hboxes/vboxes is on: If so, a bad box
occurs in the last LaTeX run, a warning is displayed. For details, set $cleanUp
to false, rerun LaTeX and have a look at the log-file. | |
debugWarnings | true |
Whether debugging of warnings is on: If so, a warning in the last LaTeX run
is displayed. For details, set $cleanUp to false, rerun LaTeX and have a look
at the log-file. | |
pdfViaDvi | false |
Whether creation of PDF-files from LaTeX-files goes via dvi-files.
If $pdfViaDvi is set and the latex processor needs repetitions, these are all done creating dvi and then pdf is created in a final step invoking the command $dvi2pdfCommand. If $pdfViaDvi is not set, latex is directly converted into pdf. Currently, not only conversion of LaTeX-files is affected, but also conversion of graphic files into graphic formats which allow inclusion in the tex-file. If it goes via latex, then the formats are more based on (encapsulated) postscript; else on pdf. In the dvi-file for jpg, png and svg only some space is visible and only in the final step performed by $dvi2pdfCommand, the pictures are included using the bounding boxes given by the .bb or the .xbb-file. These are both created by $ebbCommand. Of course, the target dvi is not affected: This uses always the dvi-format. What is also affected are the tasks creating HTML, ODT or docs: Although these are based on htlatex which is always dvi-based, the preprocessing is done in dvi or in pdf. Also the task TXT is affected. As indicated in $latex2pdfCommand, the processor xelatex does not create dvi but xdv files. In a sense, the xdv format is an extension of dvi but as for he xdv format there is no viewer, no way htlatex or other applications (except the xelatex-internal xdvidpfmx) and also no according mime type, we refrained from subsumming this under “kind of dvi”. Thus, with xelatex the flag $pdfViaDvi may not be set. | |
dvi2pdfCommand | dvipdfmx |
The driver to convert dvi into PDF-files. Note that this must fit the options of
the packages ‘xcolor’, ‘graphicx’ and, provided no autodetection, hyperref.
Sensible values are ‘dvipdfm’, ‘dvipdfmx’ and ‘dvipdft’, which are all the
same in my implementation and ‘dvipdft’ (which is roughly a wrapper around
‘dvipdfm’ with option -t using ‘gs’). Note that ‘dvipdf’ is just a script around
‘dvips’ using ‘gs’, but does not provide proper options; so not allowed. | |
dvi2pdfOptions | the empty string |
The options for the command $dvi2pdfCommand. The default value is
’-V1.7’ specifying the PDF version to be created. The default version for
PDF format for $dvi2pdfCommand is version 1.5. The reason for using
version 1.7 is $fig2dev which creates PDF figures in version 1.7 and forces
$latex2pdfCommand in DVI mode to include PDF version 1.7 and finally
$dvi2pdfCommand to use that also to avoid warnings.
Using $latex2pdfCommand if used to create PDF directly, by default also PDF version 1.5 is created. For sake of uniformity, it is advisable to create PDF version 1.7 also. In future this will be done uniformly through \DocumentMetadata command. | |
patternReRunLatex | see Section 6.5.3 |
The pattern is applied line-wise to the log file and matching triggers rerunning
$latex2pdfCommand if $maxNumReRunsLatex is not yet reached to ensure
termination.
This pattern may never be ensured to be complete, because any package may indicate the need to rerun $latex2pdfCommand with its own pattern and so any new package may break completeness. Nevertheless, the default value aims completeness while be tight enough not to trigger a superfluous rerun. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. | |
maxNumRerunsLatex | 5 |
The maximal allowed number of reruns of the LaTeX process. This is to avoid
endless repetitions. This shall be non-negative or -1 which signifies that there
is no threshold. | |
An overview over the options supported by the usual latex engines in distribution TeX Live is given in [Rei23b], Section 2. In particular, there is a table with the options occurring in any LaTeX engine and columns indicating for each option for which engines it is valid. Note that unlike the other engines, lualatex defines options starting with --, it works on according options starting with single dash also. To support all engines with the same parameters, the default options are among the ones common to all supported engines. Currently, default option line is as follows:
-interaction=nonstopmode -synctex=1 -recorder -shell-escape
The details are as follows:
To avoid user interaction in case of an error This seems mandatory.
to create .synctex.gz files needed for interaction between editor and viewer.
Strictly speaking not necessary at the current stage, but for later versions of this software, to allows tracking dependencies.
allows the TEX engine to access the shell to execute. This is needed for some reason for driver dvipdfmx which seems to be the sole one supporting PDF-pictures in DVI-mode and PDF-pictures in PDF-mode.
An alternative would be -shell-restricted. CAUTION: In MiKTeX this is –enable-write18 instead.
Note that part of the default values is mandatory, in particular nonstopmode, but there are also options which are not allowed. In most of the cases, the problem is that the latex engine does not create an output or does not create it in the expected location or in the expected form. This may apply to the main artifact, i.e. PDF or DVI or XDV, but it may also apply to log files and other files.
The following list of prohibited options is illustrative but not complete:
switch on draft mode (generates no output PDF which causes an error)
to specify the output directory
to specify the auxiliary output directory
effectively changes the output file name
makes the log quiet and so circumvents error and warning detection
use FMTNAME instead of program name or a %& line
run a lua file, then exit
use FORMAT for job output; FORMAT is ‘dvi’ or ‘pdf’ pdf is the only allowed …. This is not supported by xelatex.
generate XDV (extended DVI) output rather than PDF. This is specific for xelatex.
set program (and fmt) name to STRING only names also without -progname are possible
display this help and exit
output version information and exit
Note that the default value of $patternErrLatex excludes option -file-line-error-style and its synonym –file-line-error-style. Nevertheless, these options can be used if the pattern $patternErrLatex is adapted.
Also option -halt-on-error is not strictly forbidden, but not recommended, because it prevents operation as intended for this software.
Two options deserve particular notification, both specifying the output format:
which is specific to xelatex, makes xelatex create XDV files which currently cannot be further processed by this software. As soon as this software supports XDV files, this option is set by this software, not by the user.
, which this software uses to set the output format, either to dvi or to pdf. Strictly speaking, this option is supported by all engines, except for xelatex. For xelatex, this software only supports pdf, which xelatex creates because -no-pdf is not given. The option -output-format=pdf does no harm, because it is ignored. As soon as this software supports XDV creation, it will no longer pass -output-format to xelatex.
In general, there are two forms of options, one starting with double dash, --, and the other form with single dash. In TeX Live, pdflatex and xelatex use single dash, whereas lualatex uses double dash according to the help text. But using the single dash always is ok, because lualatex understands single dash also.
In MiKTeX, all options of all engines are double dash. It must be clarified, whether they understand single dash. If not one has to clarify whether in TeX Live all engines understand double dash. If so all must be changed into double dash.
The patterns given below are just by (unwritten) convention. As a consequence, the pattern has a comprehensive default value covering all warnings known to the author, while not detecting a warning, where there is none. To that end, the pattern requires that the warning text starts with the line of the log file. Still the pattern has to be configurable to allow the user to overwrite the default value not being forced to wait for the developer to change it.
For the current default value, we distinguish
LaTeX-warnings emitted directly by LaTeX starting with LaTeX Warning: ,
LaTeX-font-warnings related with fonts/font selection starting with LaTeX Font Warning: ,
Package warnings emitted by a package. By convention, a package emitting a warning identifies itself by its name <name> emitting a warning starting with Package <name> Warning: ,
Class warnings emitted by a package. By convention, a class emitting a warning identifies itself by its name <name> emitting a warning starting with Class <name> Warning: ,
pdfTeX-warning starting with pdfTeX warning and being specific for the compiler pdflatex,
Warnings on inclusion of a PDF file, e.g. inclusion of PDF files with incompatible version, starting with warning (file <filename>) (pdf inclusion),
Font specification warnings starting with * fontspec warning2 ,
Further warnings not identifying themselves as warnings as the word “warning” does not occur. Still they are treated as warning because they all indicate some imperfection in the output.
The resulting default pattern is
^(LaTeX Warning: | LaTeX Font Warning: | (Package|Class) .+ Warning: | pdfTeX warning( \((\d|\w)+\))?: | \* fontspec warning: | Non-PDF special ignored!| Missing character: There is no .* in font .*!$| A space is missing\. (No warning)\.)
TODO: rework based on comments in class Settings.
For the package rerunfilecheck an analysis of the code is possible, and the warnings emitted by this package indicating the need for rerun are taken into account for the pattern.
Besides this package, also other packages may require rerun, but these are not analyzes systematically. A first step would be to analyze those given in header.tex created by injection.
As a consequence, the pattern has a comprehensive default value covering all warnings known to the author, while not detecting a warning, where there is none. To that end, the pattern requires that the warning text starts with the line of the log file. Still the pattern has to be configurable to allow the user to overwrite the default value not being forced to wait for the developer to change it.
The resulting default pattern is
^(LaTeX Warning: Label\(s\) may have changed\. Rerun to get cross-references right\.$| Package \w+ Warning: .*Rerun( .*|\.)$| Package rerunfilecheck Info: Checksums for | Package \w+ Warning: .*$^\(\w+\) .*Rerun( .*|\.)$| LaTeX Warning: Etaremune labels have changed\.$| \(rerunfilecheck\) Rerun to get outlines right$| \(rerunfilecheck\) Rerun LaTeX)
There is one Info message in there, also indicating the need for rerun. This is inserted because another rerun warning may fail to apply because it contains the file name and if this is too long, then the required sequence “Rerun.” is cut off and is not on the current line.
Still what is good, if such a warning is not recognized as a pattern indicating the need for rerun, it occurs in the final LOG file and is recognized as a warning. So it is merely impossible to get a result with not enough reruns and without warning.
FIXME: There is a bug in this pattern. See Section 9.
This section describes the parameters or creation of the bibliography which are given in Table 6.5.
TODO: do this.
Parameter | Default |
Explanation
| |
bibtexCommand | bibtex |
The BibTeX command to create a bbl-file from an aux-file and a bib-file (using
a bst-style file). | |
bibtexOptions | empty |
The options for the command $bibtexCommand. | |
patternErrBibtex | error message |
The pattern is applied line-wise to the blg-file and matching indicates that
$bibtexCommand failed. The default value is chosen according to the ‘bibtex’
documentation. | |
patternWarnBibtex | ^Warning-- |
The pattern is applied line-wise to the blg-file and matching indicates a
warning $bibtexCommand emitted. The default value is chosen according to
the ‘bibtex’ documentation. | |
This section describes the parameters or creation of the indices which are given in Table 6.6.
TODO: do this.
Parameter | Default |
Explanation
| |
makeIndexCommand | makeindex |
The MakeIndex command to create an ind-file from an idx-file logging on an
ilg-file. | |
makeIndexOptions | the empty string |
The options for the MakeIndex command. | |
patternErrMakeIndex | (!! Input index error ) |
The pattern is applied line-wise to the ilg-file and matching indicates that
$makeIndexCommand failed. The default value is chosen according to the
‘makeindex’ documentation. | |
patternWarnMakeIndex | (## Warning ) |
The pattern is applied line-wise to the ilg-file and matching indicates a warning
$makeIndexCommand emitted. The default value is chosen according to the
‘makeindex’ documentation. | |
patternReRunMakeIndex | |
This parameter is deprecated since version 2.1. Rerun check of auxiliary
programs do not read the LOG file. Details of the present algorithm are
described in Section 5.6.
The pattern is applied line-wise to the log-file and matching triggers rerunning $makeIndexCommand followed by $latex2pdfCommand. This pattern only matches a warning emitted by the package ‘rerunfilecheck’ e.g. used with option ‘index’. The default value is chosen according to the package documentation. | |
splitIndexCommand | splitindex |
The SplitIndex command to create ind-files from an idx-file logging on ilg-files.
This command invokes $makeIndexCommand. | |
splitIndexOptions | -V |
The options for $splitIndexCommand. Here, one has to distinguish between
the options processed by $splitIndexCommand and those passed to
$makeIndexCommand. The second category cannot be specified here, it is
already given by $makeIndexOptions. In the first category is the option ‘-m’
to specify the $makeIndexCommand. This is used automatically and cannot
be specified here. Since $splitIndexCommand is used in conjunction with
package ‘splitidx’, which hardcodes various parameters which are the default
values for $splitIndexCommand and because the option may not alter certain
interfaces, the only option which may be given explicitly is ‘-V’, the short cut
for ‘–verbose’. Do not use ‘–verbose’ either for sake of portability. | |
This section describes the parameters or creation of the glossary which are given in Table 6.7.
TODO: do this.
Parameter | Default |
Explanation
| |
makeGlossariesCommand | makeglossaries |
The MakeGlossaries command to create a gls-file from a glo-file (invoked
without file ending) also taking ist-file or xdy-file into account logging on a
glg-file. | |
makeGlossariesOptions | the empty string |
The options for the $makeGlossariesCommand. These are the options for
‘makeindex’ (not for $makeIndexCommand) and for ‘xindy’ (also hardcoded).
The aux-file decides on whether program is executed and consequently which
options are used.
The default value is the empty option string. Nevertheless, ‘xindy’ is invoked as ‘xindy -L english -I xindy -M…’. With option ‘-L german’, this is added. Options ‘-M<’ for ‘xindy’ ‘-s’ for ‘makeindex’ and ‘-t’ and ‘-o’ for both, ‘xindy’ and ‘makeindex’. | |
patternErrMakeGlossaries | (^\*\*\* unable to execute: ) |
The pattern is applied line-wise to the ‘glg’-file and matching indicates
that $makeGlossariesCommand failed. The default value ‘( unable to
execute: )’ is chosen according to the makeindex documentation. If the
default value is not appropriate, please modify and notify the developer of this
plugin. | |
patternErrXindy | (^ERROR: ) |
The pattern in the glg-file which indicates an error when running ‘xindy’
via $makeGlossariesCommand. If the default value is not appropriate, please
modify and notify the developer of this plugin. | |
patternWarnXindy | (^WARNING: ) |
The pattern is applied line-wise to the ‘glg’-file and matching indicates a
warning when running ‘xindy’ via $makeGlossariesCommand.
The default value ‘(^WARNING: )’ (note the space and the brackets) is chosen according to the ’xindy’ documentation. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the deficiency. | |
patternReRunMakeGlossaries | |
This parameter is deprecated since version 2.1. Rerun check of auxiliary
programs do not read the LOG file. Details of the present algorithm are
described in Section 5.6.
The pattern is applied line-wise to the log file and matching triggers rerunning $makeGlossariesCommand followed by $latex2pdfCommand. This pattern only matches a warning emitted by the package ‘rerunfilecheck’ e.g. used with option ‘glossary’. The default value is chosen according to the package documentation. | |
This section describes the parameters for invoking pythontex and parameters for invoking depythontex which are given in Table 6.8 and in Table 6.9, respectively.
Parameter | Default |
Explanation
| |
pythontexCommand | pythontex |
The PythonTeX command which creates a folder pythontex-files-xxx with
various files inside from a pytxcode-file (invoked without file ending) and
logging in a plg-file. The default value is pythontex but as long as this
does not write a log file this software really needs, we have to configure it
with pythontexW which is a simple wrapper of pythontex writing a log file.
CAUTION: Since pythontexW is not registered with this software, one has to
specify it with its category as pythontexW:pythontex. | |
pythontexOptions | –rerun=always |
The options for the command $pythontexCommand.
For the possibilities see the manual of the pythontex package or the help dialog of pythontex. CAUTION: --rerun and --runall cannot be specified both in one invocation. In the context of this software, the option --interactive is not appropriate. CAUTION: For many options of the command line tool, there is an according package option and the latter overrides the former. CAUTION: This software overwrites settings --rerun and --runall anyway, and forces setting --rerun=always. The default value is --rerun=always. | |
patternErrPyTex | see Section 6.9 |
The pattern in the plg-file indicating that running pythontex, resp.
pythontexW via $pythontexCommand failed. The pattern would fit into a single
line but because of a bug in pythontex, it is a bit more complicated. If this is
not appropriate, please modify and notify the developer of this plugin. | |
patternWarnPyTex | see Section 6.9 |
The pattern in the plg-file indicating a warning when running pythontex,
resp. pythontexW via $mpythontexCommand. If this is not appropriate, please
modify and notify the developer of this plugin. | |
prefixPytexOutFolder | pythontex-files- |
The prefix of the name of the folder written by $pythontexCommand. The full
name of that folder is this prefix followed by the jobname of the LaTeX main
file, i.e. the filename without ending.
CAUTION: This is readonly, because in both, the pythontex tool and the according LaTeX package this prefix is hardcoded at time of this writing. | |
Parameter | Default |
Explanation
| |
depythontexCommand | depythontex |
The Depythontex command invoked with no file ending to create a file
xxx.depytx.tex filefrom a tex-file, a depytx-file taking the output of
pythontex into account and logging on a dplg-file. The default value is
depythontex but as long as this does not write a log file this software
really needs, we have to configure it with depythontexW which is a simple
wrapper of depythontex writing a log file. CAUTION: Since depythontexW
is not registered with this software, one has to specify it with its category as
depythontexW:depythontex. | |
depythontexOptions | the empty string |
The pattern patternErrPyTex is by default
\*_PythonTeX_error|...
substituting the dots by
(PythonTeX:__.+_-|____-_Current:_)_[1-9][0-9]*_error\(s\),_[0-9]+_warning\(s\)
Accordingly, the pattern textttpatternWarnPyTex is by default
(PythonTeX:__.+_-|____-_Current:_)_[0-9]+_error\\(s\),_[1-9][0-9]*_warning\(s\)
This section describes the parameters of the LaTeX-to-html converter which are given in Table 6.10.
Parameter | Default |
Explanation
| |
tex4htCommand | htlatex |
tex4htStyOptions | xhtml,uni-html4,2,svg,pic-tabular |
tex4htOptions | ’ -cunihtf -utf8’ |
t4htOptions | the empty string |
The options for ‘t4ht’ which converts idv-file and lg-file into css-files, tmp-file
and, by need and if configured accordingly into png-files. The value ‘-p’
prevents creation of png-pictures. | |
patternT4htOutputFiles | see Section 6.10.1 |
The pattern is applied to file names and matching shall accept exactly the
target files of goal ‘html’ for a given LaTeX main file ‘xxx.tex’. Matching
triggers copying those files to $outputDirectory.
The patterns for the other targets are hardcoded and take the form ‘^T$T\.yyy$’, where ‘yyy’ may be an ending or an alternative of endings. This pattern is neither applied to directories nor to ‘xxx.tex’ itself. For an explanation of the pattern ‘T$T’ see $patternCreatedFromLatexMain. Spaces and newlines are removed from that pattern before processing. The pattern is designed to match quite exactly the files to be copied to $targetSiteDirectory, for the goal ‘html’, not much more and at any case not less. Since $tex2htCommand is not well documented, and still subject to development, this pattern cannot be guaranteed to be final. If the current default value is not appropriate, please overwrite it in the configuration and notify the developer of this plugin of the bug. | |
The default value has the following components:
‘^T$T\.x?html?$’ is the main output file.
‘^T$Tli\d+\.x?html?$’ are lists: toc, lof, lot, indices, glossaries, NOT the bibliography.
’^T$T(ch|se|su|ap)\d+\.x?html?$’ are chapters, sections and subsections or below and appendices.
‘^T$T\d+\.x?html?$’ are footnotes.
‘^T$T\.css$’ are cascaded stylesheets.
‘^T$T-\d+\.svg$’ and ‘^T$T\d+x\.png$’ are svg/png-files representing figures.
‘^T$T\d+x\.x?bb’ are the bounding boxes (suffix .bb for dvipdfm and suffix .xbb for dvipdfmx).
‘^(cmsy)\d+(-c)?-\d+c?\.png$’ represents special symbols.
Note that the patterns for the html-files can be summarized as
^T$T((ch|se|su|ap|li)?\d+)?\.x?html?\$
This altogether constitutes the default value for this pattern:
^(T$T(((ch|se|su|ap|li)?\d+)?\.x?html?| \.css| \d+x\.x?bb| \d+x\.png| -\d+\.svg)| (cmsy)\d+(-c)?-\d+c?\.png)$
The pattern is designed to match quite exactly the files to be copied to $targetSiteDirectory, for the goal “html”, not much more and at any case not less. since $tex2htCommand is not well documented, and still subject to development, this pattern cannot be guaranteed to be final.
This section describes the parameters of the converter from and to further formats which are given in Table 6.11.
These converters convert latex into RTF directly, they convert ODT into doc-like documents and pdf into pure text. A special case is the code-checker in a sense converting latex into a log-file. For each of them, the name of the command can be specified and also the options. Since neither of them, except the code checker, write a log-file, there are no further parameters necessary.
Parameter | Default |
Explanation
| |
latex2rtfCommand | latex2rtf |
The latex2rtf command to create RTF from latex directly. | |
latex2rtfOptions | the empty string |
The options of the command $latex2rtfCommand. | |
odt2docCommand | odt2doc |
The odt2doc command to create MS word-formats from otd-files. | |
odt2docOptions | -fdocx |
The options of the command $odt2docCommand. Above all specification
of output format via the option ’-f’. Invocation is ’odt2doc -f<format>
<file>.odt’. All output formats are shown by ‘odt2doc –show’ but the
formats interesting in this context are the following: doc, doc6, doc95,
docbook, docx, docx7, ooxml and rtf. Interesting also the verbosity options
‘-v’, ‘-vv’, ‘-vvv’ the timeout ‘-T=secs’ and ‘–preserve’ to keep permissions
and timestamp of the original document. | |
pdf2txtCommand | pdftotext |
The pdf2txt-command for converting PDF-files into plain text files. | |
pdf2txtOptions | the empty string |
The options of the command $pdf2txtCommand. | |
FIXME: Note that pdftotext -h prints a usage message. This is a way to obtain not the specified output. It shows that pdftotext -q does not print any messages or errors. This indicates that pdftotext normally does display error messages on the standard output. These may be led to a log file to indicate errors and warnings. Here, further research is required.
The option -htmlmeta seems not approprate. The option resolution -r seems sensible only in conjunction with the crop area defined by -x and -y which does not make sense in our context. The same holds for specification of the first and the last page via -f and -l. What does make sense is specifying the encoding via -enc with possible values given by pdftotext -listenc. What makes sense most is UTF-8.
Among the applications used by this software, the codechecker plays a special role: it is not really a converter, unless we interprete the log file as artifact. Like for the most converters also for the codechecker we can specify the command ant its options, both given in Table 6.12.
Parameter | Default |
Explanation
| |
chkTexCommand | chktex |
The chktex-command for checking LaTeX main files. | |
chkTexOptions | -q -b0 |
The options of the command $chkTexCommand, except “-o output-file”
specifying the output file which is added automatically. For further details see
the options below. | |
The options of chktex are described in detail in [Thi22], Section 6.1.2.
Here is a list of options useful in this context. The first group of these are muting options:
’-w’, ’-e’, ’-m’, Make the message number passed as parameter a warning/an error/a message and turns it on. Messages are not counted.
’-n’ Turns the warning/error number passed as a parameter off.
’-L’ Turns off suppression of messages on a per line basis.
The next group of interesting options are for output control:
Shuts up about copyright information.
Specifies the output file. This is added automatically and shall thus not be specified by the user.
If you use the -o switch, and the named output-file exists, it will be renamed to ‘filename.bak’ for option -b1 and not for -b0.
Specifies the format of the output via a format similar to “printf()’. For details consult the manual [Thi22], Section 6.1.2. The codes are listed below.
Verbosity level followed by a number ‘d’ specifying the format of the output according to the listing below. The verbosity number is resolved as a pattern as if given by the option ‘-f format’. Thus the option ‘-v’ is ignored if the option ‘-f format’ is specified.
The default value -q -b0 avoids verbose output and backing up the output log-file.
Code
String to print between fields (from -s option).
Column position of error.
Length of error (digit).
Current file-name.
Turn on inverse printing mode.
Turn off inverse printing mode.
kind of error (warning, error, message).
line number of error.
Warning message.
Warning number.
An underlining line (like the one which appears when using ’-v1’).
Part of line in front of error (’S’-1).
Part of line which contains error (string).
Part of line after error (’S’+1).
FIXME: to be inserted. See [Thi22], Section 6.1.6. From chktexrc:
OutFormat { # -v0; silent mode %f%b%l%b%c%b%n%b%m!n # -v1; normal mode "%k %n in %f line %l: %m!n%r%s%t!n%u!n" # -v2; fancy mode "%k %n in %f line %l: %m!n%r%i%s%I%t!n!n" # -v3; lacheck mode "!"%f!", line %l: %m!n" # -v4; verbose lacheck mode "!"%f!", line %l: %m!n%r%s%t!n%u!n" # -v5; no line number, ease auto-test "%k %n in %f: %m!n%r%s%t!n%u!n" # -v6; emacs compilation mode "!"%f!", line %l.%c:(#%n) %m!n" }
Note that “!” is to escape quotes and newline. More than these can be added to chktexrc.
This document is checked with options deviating from the default value:
-q -b0 -v1 -g0 -l ${basedir}/src/site/tex/chktexrc
The default is -q -b0, option -g0 means that the global chktexrc is not used and option
-l ${basedir}/src/site/tex/chktexrc
specifies a record file tailored to the needs of this project. In particular, the pattern for -v1 is slightly modified: It is
# -v1; normal mode "%k %n in %f line %l: %m!n %r%s%t!n %u!n"
which adds a blank to all lines but the headlines. That way, the kind of issue (%k) is easily parsed. This could be used for emitting an error instead of a warning when processing goal check.
Although the return code of chktex is not documented, a bit of reverse engineering shows the following distinction:
Successful execution and found neither an error nor a warning.
Execution as such did not succeed, e.g. because of an invalid option like -exx.
An error occurred and in particular execution as such suceeded.
A warning occurred but no error and in particular execution as such suceeded.
On this behavior this software bases its failure messages.
The options of chktex are described in detail in [Thi22], Section 6.1.2.
For a general description of the reproducibility check see Section 5.8. Here we go into the details and identify the parameters controlling the check and specified in great detail in Table 6.13. As already mentioned in Section 5.8, currently, checks are performed for artifacts in pdf format only; more formally, if the target (which is in parameter target described in Table 6.1) is pdf.
But if so, the parameter chkDiff decides whether a check is performed at all. Note that checking is off by default. Then a diffing tool given by diffPdfCommand expects the blueprints in the directory diffDirectory. In contrast, the actual artifacts to be checked are in outputDirectory, whereas the sources are in texSrcDirectory.
The location of a source tex file relative to texSrcDirectory is the location of the artifact relative to outputDirectory. This path relative to diffDirectory is the location of the blueprint. With the actual artifact in outputDirectory and the blueprint in diffDirectory the diff-tool determines whether the both are equivalent. If so, equivalence is logged as an info, else an exception described in Table 7.7 is thrown.
Note that the choiced of the diff tool diffPdfCommand determines the notion of equivalence of the pdf artifacts, ranging from byte equivalence to some kind of visual equivalence.
Parameter | Default |
Explanation
| |
diffDirectory | src/main/resources/docsCmp |
Diff directory relative to $baseDirectory used for diffing actually created
artifact against prescribed one inthis directory. This is relevant only if
$chkDiff is set. | |
chkDiff | false |
Indicates whether after creating artifacts and copying them to the output
directory $outputDirectory the artifacts are checked by diffing them against
preexisting artifacts in $diffDirectory using the diff command given by
$diffPdfCommand. If this is set, the system time is set to 0 indicating
1970–01–01. Note that currently, only pdf files are checked.
This setting can be overwritten for individual LaTeX main files by the magic comment chkDiffMagic described in Section 6.2.1. This is false by default and is set to true only in the context of tests. | |
diffPdfCommand | diff |
The diff-command for diffing PDF-files strictly or just visually to check that
the created pdf files are equivalent with prescribed ones. CAUTION: There
are two philsophies: Either the latex source files are created in a way that
they reproduce strictly. Then a strict diff command like diff is appropriate.
Else another diff command is required which checks for a kind of visual
equality. The default value is a mere diff. Alternatives are diff-pdf and
diff-pdf-visually both implementing a visual diff. Note that unlike for
other tools, no options can be passed in this case explicitly. | |
pdfMetainfoCommand | pdfinfo |
Command to retrieve metainfo from PDF files. Essentially, there are two
possibilities, exiftool or pdfinfo but currently this software is restricted to
the latter. At time of this writing, only creation time is considered. Note that
meta info CreationTime is not identical with creation time in a file system. | |
pdfMetainfoOptions | -isodates |
The options for the command $pdfMetainfoCommand which is currently always
pdfinfo. At time of this writing, only creation time is considered. This
software has little flexibility in treating various time formats, so it must
be decided. Format offered by pdfinfo most commonly known and easily
converted to the required epoch time, is really according to ISO 8601. This
motivates -isodates to be a mandatory option. Further options do not make
sense, as currently only creation time is used. So -isodates is more than a
mere default value. | |
As described in Section 5.9, based on the parameter $latexmkUsage described in Table 6.1 on page 246, the build process can be delegated gradually to latexmk or an equivalent tool. Table 6.14 lists the parameters controlling invocation. Note that besides the options, which shall be used with care, also the config file .latexmkrc goes into. The details concerning the config file are described in [Col23], Section “CONFIGURATION/INITIALIZATION (RC) FILES”. On the other hand, as indicated in [Col23], Section “DEALING WITH ERRORS, PROBLEMS, ETC”, latexmk does not write its own log file and so there is no parameter in Table 6.14 for a pattern of warnings or errors.
Parameter | Default |
Explanation
| |
latexmkCommand | latexmk |
The latexmk command to create a pdf-file from a latex file and other
files. Instead of the default value latexmk a wrapper is conceivable, a
reimplementation seems quite unlikely *smile*. | |
latexmkOptions | empty |
The options for the command $latexmkCommand. Since this command is
controlled to a wide extend by the config file .latexmkrc, the options are
of minor importance. On the other hand, there are options not allowed
for this software because they change behavior in a way not taken into
account. So add options with care. The allowed options and their defaults are
given in [Col23], Section “LATEXMK OPTIONS AND ARGUMENTS ON
COMMAND LINE”. | |