static enum LatexPreProcessor.SuffixHandler extends Enum<LatexPreProcessor.SuffixHandler>
LatexPreProcessor.SUFFIX_TEX is required
to detect the latex main files
and LatexPreProcessor.SUFFIX_TEX and LatexPreProcessor.SUFFIX_BIB
are needed for proper cleaning of the tex souce directory.| Enum Constant and Description |
|---|
bib
Handler for .bib-files
representing the BibTeX format for bibliographies.
|
fig
Handler for .fig-files representing the native xfig format.
|
gp
Handler for .gp-files representing the native gnuplot format.
|
jpg
Handler for .jpg-files representing a format
definde by the Joint Photographic Experts Group (jp(e)g).
|
mp
Handler for .mp-files representing the metapost format.
|
png
Handler for .png-files
representing the Portable Network Graphics format.
|
svg
Handler for .svg-files representing scaleable vector graphics.
|
tex
Handler for .tex-files
representing the TeX format, to be more precise the LaTeX format.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract void |
clearTarget(File file,
LatexPreProcessor proc)
Deletes the files potentially
created from the source file
file
using proc. |
(package private) void |
clearTarget(File file,
LatexPreProcessor proc,
Map<File,LatexPreProcessor.SuffixHandler> file2handler)
Typically, .i.e. for
fig-, gp-, mp-
and svg-files just associates file
with this handler in file2handler
to schedule according targets for deletion except for
tex-files for which the target is cleared immediately
if it is a latex main file, otherwise ignoring
by invoking LatexPreProcessor.clearTargetTexIfLatexMain(File). |
(package private) abstract String |
getSuffix()
Returns the suffix of the file type
of the file type, this is the handler for.
|
(package private) abstract void |
procSrc(File file,
LatexPreProcessor proc)
|
(package private) void |
scheduleProcSrc(File file,
Map<File,LatexPreProcessor.SuffixHandler> file2handler,
LatexPreProcessor proc,
Collection<File> latexMainFiles) |
static LatexPreProcessor.SuffixHandler |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LatexPreProcessor.SuffixHandler[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LatexPreProcessor.SuffixHandler fig
public static final LatexPreProcessor.SuffixHandler gp
public static final LatexPreProcessor.SuffixHandler mp
public static final LatexPreProcessor.SuffixHandler svg
public static final LatexPreProcessor.SuffixHandler jpg
public static final LatexPreProcessor.SuffixHandler png
public static final LatexPreProcessor.SuffixHandler tex
public static final LatexPreProcessor.SuffixHandler bib
public static LatexPreProcessor.SuffixHandler[] values()
for (LatexPreProcessor.SuffixHandler c : LatexPreProcessor.SuffixHandler.values()) System.out.println(c);
public static LatexPreProcessor.SuffixHandler valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullvoid scheduleProcSrc(File file, Map<File,LatexPreProcessor.SuffixHandler> file2handler, LatexPreProcessor proc, Collection<File> latexMainFiles)
abstract void procSrc(File file, LatexPreProcessor proc) throws BuildFailureException
fig-, gp-, mp-
and associates file
Does the transformation of the file file
using proc immediately, except for
svg-files for which an info message is logged,
that transformation is done by need in the course of a LaTeX run.
What occurs are files .pdf and .pdf_tex
even if Settings.pdfViaDvi indicates creation of dvi files.
tex-files which are only scheduled for later translation
just by adding them to latexMainFiles
if they are latex main files, and ignored otherwise
(see LatexPreProcessor.addIfLatexMain(File, Collection)).
bib-files for which just an info message
that a bib file was found is logged.
Logging:
file - a file with ending given by getSuffix().proc - a latex pre-processor.BuildFailureException - TEX01 only for fig, gp and mp
because these invoke external programs.void clearTarget(File file, LatexPreProcessor proc, Map<File,LatexPreProcessor.SuffixHandler> file2handler)
fig-, gp-, mp-
and svg-files just associates file
with this handler in file2handler
to schedule according targets for deletion except for
tex-files for which the target is cleared immediately
if it is a latex main file, otherwise ignoring
by invoking LatexPreProcessor.clearTargetTexIfLatexMain(File).
bib-files
(maybe appropriate also for jpg-files and for png-files)
for which there are no targets
and so the association is not added to file2handler.
Logging:
file - a file with ending given by getSuffix(),
i.e. a file which can be handled by this handler.proc - a latex pre-processor.file2handler - maps file to its handler.
In general, this method adds
file to file2handler
together with its handler which is just this.clearTarget(File, LatexPreProcessor)abstract void clearTarget(File file, LatexPreProcessor proc)
file
using proc.
Logging:
file - a file with ending given by getSuffix().proc - a latex pre-processor.IllegalStateException - file has no targets to be deleted
as for jpg-files, png-files and bib-files.
file should have been cleared already
by clearTarget(File, LatexPreProcessor, Map)
as for tex-files.
clearTarget(File, LatexPreProcessor, Map)abstract String getSuffix()
Copyright © 2016–2018 Simuline Organization (l2r). All rights reserved.