View Javadoc
1   package eu.simuline.m2latex.core;
2   
3   /**
4    * Enumerates the names of the parameters of a latex main file. 
5    * All these must occur as names 
6    * of named capturing groups in {@link Settings#patternLatexMainFile}. 
7    * Currently, only one, {@link #docClass} must be matched by the pattern. 
8    * Part of the names match parameters in a magic comment. 
9    * These have the ending <code>Magic</code>. 
10   * Currently, {@link #chkDiffMagic} and {@link #latexmkMagic} 
11   * are special as they do not require values: 
12   * The boolean values {@link #chkDiffMagicVal} and {@link #latexmkMagicVal} 
13   * are optional and default to <code>true</code>. 
14   */
15  public enum LatexMainParameterNames {
16  
17    /**
18     * The name of the capturing group 
19     * indicating whether after creating the artifact 
20     * and copying it to the output directory {@link Settings#outputDirectoryFile} 
21     * the artifact is checked by diffing against a preexisting artifact 
22     * as described for {@link Settings#chkDiff}. 
23     * Essentially, this overwrites the settings in the pom 
24     * for individual latex main files. 
25     * This magic comment can be given in conjunction with a Boolean value 
26     * which is captured by group {@link #chkDiffMagicVal}, 
27     * or without an explicit value in which case it defaults to <code>true</code>. 
28     */
29    chkDiffMagic,
30  
31    /**
32     * The name of the capturing group capturing the boolean value 
33     * for check described for {@link #chkDiffMagic}. 
34     * Note that the value is optional and defaults to <code>true</code>. 
35     */
36    chkDiffMagicVal,
37  
38    /**
39     * The name of the capturing group 
40     * indicating whether <code>latexmk</code> or 
41     * to be more precise the latexmk like-tool 
42     * given by {@link Settings#getLatexmkCommand()} shall be used 
43     * bypassing the direct invocation of more basic tools. 
44     * Essentially, this overwrites {@link Settings#getLatexmkUsage()} 
45     * but this has influence on when graphic files are created: 
46     * In case of {@link LatexmkUsage#Fully}, these are not preprocessed. 
47     */
48    latexmkMagic,
49  
50    /**
51     * The name of the capturing group capturing the boolean value 
52     * for check described for {@link #latexmkMagic}. 
53     * Note that the value is optional and defaults to <code>true</code>. 
54     */
55    latexmkMagicVal,
56  
57    /**
58     * The name of the capturing group 
59     * representing the document class specified by the commands 
60     * <code>documentclass</code> or <code>documentstyle</code>. 
61     */
62    docClass,
63  
64    /**
65     * The name of the capturing group 
66     * representing the target set 
67     * specified by the magic comment <code>% !LMP targets=...</code>. 
68     */
69    targetsMagic,
70  
71    /**
72     * The name of the capturing group 
73     * representing the target set 
74     * specified by the magic comment <code>% !TEX program=...</code>. 
75     */
76    programMagic,
77  
78    /**
79     * The name of the capturing group
80     * representing the argument of <code>\DocumentMetadata</code> 
81     * including the braces. 
82     * LaTeX does not strictly speaking require braces, 
83     * but LMP does. 
84     * This is a minor restriction. 
85     */
86    docMetadata;
87  }