public class LatexProcessor extends AbstractLatexProcessor
create() which is executed by the ant task
and by the maven plugin given by CfgLatexMojo.
Also important are clearAll() which is executed by
the maven plugin given by ClearMojo.
also processGraphics() which is executed by
the maven plugin given by GraphicsMojo
which is helpful for information development.
This class delegates preprocessing of the graphic files,
selection of the latex main files and deleting their targets
to LatexPreProcessor.
Processing of the latex main files is done in create()
according to the target(s) given by the parameters.
The elements of the enumeration Target use methods
processLatex2rtf(File), processLatex2dvi(File),
processLatex2pdf(File),
processLatex2html(File), processLatex2odt(File),
processLatex2docx(File) and processLatex2txt(File).
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
LatexProcessor.LatexMainDesc
Container which comprises, besides the latex main file
also several files creation of which shall be done once for ever.
|
| Modifier and Type | Field and Description |
|---|---|
private static int |
GRP_IDENT_IDX
Index of the group in
IDX_EXPL
containing the identifier of the index. |
private static String |
IDX_EXPL
The shape of the entries of an index file
with explicit identifier of the index.
|
private static String |
IMPL_IDENT_IDX
The implicit default identifier of an index
hardcoded into the package
splitidx
and into the program splitindex. |
private ParameterAdapter |
paramAdapt |
(package private) static String |
PATTERN_NEED_BIBTEX_RUN |
(package private) static String |
PATTERN_OUFULL_HVBOX |
private LatexPreProcessor |
preProc |
private static String |
SEP_IDENT_IDX
Separator
- of the index identifier
used in files xxx-yy.idx, xxx-yy.ind
and xxx-yy.ilg. |
(package private) static String |
SUFFIX_AUX |
(package private) static String |
SUFFIX_BBL |
(package private) static String |
SUFFIX_BLG |
private static String |
SUFFIX_CLG |
(package private) static String |
SUFFIX_DVI |
(package private) static String |
SUFFIX_GLG |
(package private) static String |
SUFFIX_GLO |
(package private) static String |
SUFFIX_GLS |
(package private) static String |
SUFFIX_HTML |
(package private) static String |
SUFFIX_IDX |
(package private) static String |
SUFFIX_ILG |
(package private) static String |
SUFFIX_IND |
(package private) static String |
SUFFIX_LOF |
(package private) static String |
SUFFIX_LOT |
private static String |
SUFFIX_ODT |
private static String |
SUFFIX_RTF |
(package private) static String |
SUFFIX_TOC |
private static String |
SUFFIX_TXT |
executor, fileUtils, log, settings, SUFFIX_FLS, SUFFIX_LOG, SUFFIX_PDF, SUFFIX_VOID| Constructor and Description |
|---|
LatexProcessor(Settings settings,
CommandExecutor executor,
LogWrapper log,
TexFileUtils fileUtils,
ParameterAdapter paramAdapt) |
LatexProcessor(Settings settings,
LogWrapper log,
ParameterAdapter paramAdapt)
Creates a LatexProcessor with parameters given by
settings
which logs onto log and used by paramAdapt. |
| Modifier and Type | Method and Description |
|---|---|
protected static String[] |
buildChkTexArguments(String options,
File texFile,
File clgFile)
Returns an array of strings,
each entry with a single option given by
options
except the last three which represent -o clgFile texFile. |
protected static String[] |
buildHtlatexArguments(Settings settings,
File texFile) |
protected static String[] |
buildLatexArguments(Settings settings,
LatexDev dev,
File texFile) |
void |
checkAll()
Defines check goal of the maven plugin in
ChkMojo. |
void |
clearAll()
Defines clearing ant-task defined in
LatexClrTask
and the according goal in ClearMojo of the maven plugin. |
void |
create()
Defines creational ant-task defined in
LatexCfgTask
and the according goals in CfgLatexMojo
and subclasses of the maven plugin. |
private File[] |
files(String filePrefix,
Collection<String> variant,
String suffix)
Combines an array of files from a file prefix
filePrefix,
a collection of intermediate strings variant
and of the suffix suffix. |
private LatexProcessor.LatexMainDesc |
getLatexMainDesc(File texFile) |
private void |
logErrs(File logFile,
String command)
Logs errors detected in the according log file:
The log file is by replacing the ending of
texFile
by log. |
private void |
logWarns(File logFile,
String command)
Logs warnings detected in the according log-file
logFile:
Before logging warnings,
errors are logged via logErrs(File, String). |
private boolean |
needRun(boolean another,
String application,
File logFile,
String pattern)
Returns whether a(n other) run (see
another)
of the application application is necessary
based on a pattern pattern
matching in the log file logFile. |
private int |
preProcessLatex2dev(LatexProcessor.LatexMainDesc desc,
LatexDev dev)
Runs LaTeX on on the latex main file
texFile
described by desc once,
runs BibTeX, MakeIndex and MakeGlossaries by need
and returns whether a second LaTeX run is required. |
void |
processGraphics()
Defines graphics goal of the maven plugin in
GraphicsMojo. |
private void |
processLatex2dev(LatexProcessor.LatexMainDesc desc,
LatexDev dev)
Runs LaTeX, BibTeX, MakeIndex and MakeGlossaries
on the latex main file
texFile
described by desc
repeatedly as described for
processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev)
and issue a warning if the last LaTeX run issued a warning. |
private void |
processLatex2devCore(LatexProcessor.LatexMainDesc desc,
LatexDev dev)
Runs LaTeX on the latex main file
texFile
described by desc once,
runs BibTeX, MakeIndex and MakeGlossaries by need
according to preProcessLatex2dev(LatexMainDesc, LatexDev)
and reruns MakeIndex, MakeGlossaries and LaTeX
as often as needed to get all links satisfied
or as threshold Settings.maxNumReRunsLatex specifies. |
(package private) void |
processLatex2docx(File texFile)
Runs conversion of
texFile
to docx or other MS word formats
after processing latex to set up the references,
bibliography, index and that like. |
(package private) void |
processLatex2dvi(File texFile) |
(package private) void |
processLatex2html(File texFile)
Runs conversion of
texFile to html or xhtml
after processing latex to set up the references,
bibliography, index and that like. |
(package private) void |
processLatex2odt(File texFile)
Runs conversion of
texFile
to odt or other open office formats
after processing latex to set up the references,
bibliography, index and that like. |
(package private) void |
processLatex2pdf(File texFile) |
(package private) void |
processLatex2rtf(File texFile)
Runs direct conversion of
texFile to rtf format. |
(package private) void |
processLatex2txt(File texFile)
Runs conversion of
texFile to txt format via pdf. |
private boolean |
runBibtexByNeed(File texFile)
Runs the BibTeX command given by
Settings.getBibtexCommand()
on the aux-file corresponding with texFile
in the directory containing texFile
provided an according pattern in the aux-file indicates
that a bibliography shall be created. |
private void |
runCheck(File texFile)
Runs the check command given by
Settings.getChkTexCommand()
on the latex main file texFile
in the directory containing texFile
creating a log file with ending SUFFIX_CLG
in that directory. |
private void |
runDvi2pdf(LatexProcessor.LatexMainDesc desc)
Runs conversion from dvi to pdf-file
executing
Settings.getDvi2pdfCommand()
on a dvi-file covered by desc with arguments
given by buildLatexArguments(Settings, LatexDev, File). |
private void |
runLatex2dev(LatexProcessor.LatexMainDesc desc,
LatexDev dev)
Runs the LaTeX command given by
Settings.getLatex2pdfCommand()
on the latex main file texFile
described by desc
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File). |
private void |
runLatex2html(LatexProcessor.LatexMainDesc desc)
Runs the tex4ht command given by
Settings.getTex4htCommand()
on texFile described by desc
in the directory containing texFile
with arguments given by buildHtlatexArguments(Settings, File). |
private void |
runLatex2odt(LatexProcessor.LatexMainDesc desc)
Runs conversion from latex to odt
executing
Settings.getTex4htCommand()
on texFile
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File). |
private void |
runLatex2rtf(File texFile)
Runs the latex2rtf command
given by
Settings.getLatex2rtfCommand()
on texFile
in the directory containing texFile
with arguments given by AbstractLatexProcessor.buildArguments(String, File). |
private boolean |
runMakeGlossaryByNeed(LatexProcessor.LatexMainDesc desc)
Runs the MakeGlossaries command
given by
Settings.getMakeGlossariesCommand()
on the aux-file corresponding with texFile
in the directory containing texFile
provided that the existence of an glo-file indicates
that a glossary shall be created. |
private void |
runMakeIndex(LatexProcessor.LatexMainDesc desc)
Runs the MakeIndex command
given by
Settings.getMakeIndexCommand(). |
private boolean |
runMakeIndexByNeed(LatexProcessor.LatexMainDesc desc)
Runs the MakeIndex command
given by
Settings.getMakeIndexCommand()
on the idx-file corresponding with texFile
in the directory containing texFile
provided that the existence of an idx-file indicates
that an index shall be created. |
private void |
runOdt2doc(File texFile)
Runs conversion from odt to doc or docx-file
executing
Settings.getOdt2docCommand()
on an odt-file created from texFile
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File). |
private void |
runPdf2txt(File texFile)
Runs conversion from pdf to txt-file
executing
Settings.getPdf2txtCommand()
on a pdf-file created from texFile
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File). |
private void |
runSplitIndex(LatexProcessor.LatexMainDesc desc,
Collection<String> explIdxIdent)
Runs the SplitIndex command
given by
Settings.getSplitIndexCommand(). |
buildArguments, hasErrsWarns, logErrs, logWarn, logWarns, updatestatic final String PATTERN_NEED_BIBTEX_RUN
static final String PATTERN_OUFULL_HVBOX
static final String SUFFIX_TOC
static final String SUFFIX_LOF
static final String SUFFIX_LOT
static final String SUFFIX_AUX
static final String SUFFIX_DVI
static final String SUFFIX_BLG
static final String SUFFIX_BBL
static final String SUFFIX_IDX
static final String SUFFIX_IND
static final String SUFFIX_ILG
static final String SUFFIX_GLO
static final String SUFFIX_GLS
static final String SUFFIX_GLG
private static final String SUFFIX_RTF
private static final String SUFFIX_ODT
static final String SUFFIX_HTML
private static final String SUFFIX_TXT
private static final String SUFFIX_CLG
private static final String IDX_EXPL
idx.
Note that this regular expression has three groups
as in the specification of splitindex.private static final int GRP_IDENT_IDX
IDX_EXPL
containing the identifier of the index.private static final String IMPL_IDENT_IDX
splitidx
and into the program splitindex.private static final String SEP_IDENT_IDX
- of the index identifier
used in files xxx-yy.idx, xxx-yy.ind
and xxx-yy.ilg.
This is hardcoded by the package splitidx
when reading xxx-yy.ind files
but is configurable as an option in the program splitindex.private final ParameterAdapter paramAdapt
private final LatexPreProcessor preProc
LatexProcessor(Settings settings, CommandExecutor executor, LogWrapper log, TexFileUtils fileUtils, ParameterAdapter paramAdapt)
public LatexProcessor(Settings settings, LogWrapper log, ParameterAdapter paramAdapt)
settings
which logs onto log and used by paramAdapt.settings - the settings controlling latex processinglog - the logger to write on events while processingparamAdapt - the parameter adapter, refers to maven-plugin or ant-task.public void create()
throws BuildFailureException
LatexCfgTask
and the according goals in CfgLatexMojo
and subclasses of the maven plugin.
This consists in reading the parameters
via ParameterAdapter.initialize()
processing graphic-files
via LatexPreProcessor.processGraphicsSelectMain(File, DirNode)
and processing the tex main files
via Target.processSource(LatexProcessor, File).
The resulting files are identified by its suffixes
via Target.getPatternOutputFiles(Settings)
and copied to the target folder.
Finally, by default a cleanup is performed
invoking TexFileUtils.cleanUp(DirNode, File).
Logging:
BuildFailureException - TexFileUtils.copyOutputToTargetFolder(File, FileFilter, File)
public void checkAll()
throws BuildFailureException
ChkMojo.
This includes also creation of graphic files.BuildFailureException - public void processGraphics()
throws BuildFailureException
GraphicsMojo.
Logging:
BuildFailureException - public void clearAll()
throws BuildFailureException
LatexClrTask
and the according goal in ClearMojo of the maven plugin.
Consists in clearing created graphic files
and created files derived from latex main file.
The parameters this method depends on are (currently):
Settings.getTexSrcProcDirectoryFile()
Settings.getPatternLatexMainFile()
Settings.getPatternCreatedFromLatexMain()
Logging:
BuildFailureException - TSS02 if the tex source processing directory does either not exist
or is not a directory.private LatexProcessor.LatexMainDesc getLatexMainDesc(File texFile)
private int preProcessLatex2dev(LatexProcessor.LatexMainDesc desc, LatexDev dev) throws BuildFailureException
texFile
described by desc once,
runs BibTeX, MakeIndex and MakeGlossaries by need
and returns whether a second LaTeX run is required.
The latter also holds, if a table of contents, a list of figures
or a list of tables is specified.
The output format of the LaTeX run is given by dev,
to be more precise by LatexDev.getLatexOutputFormat().
A warning is logged if the LaTeX, a BibTeX run a MakeIndex
or a MakeGlossaries run fails
or if a BibTeX run or a MakeIndex or a MakeGlossary run issues a warning
in the according methods
runLatex2dev(LatexProcessor.LatexMainDesc, LatexDev),
runBibtexByNeed(File),
runMakeIndexByNeed(LatexMainDesc) and
runMakeGlossaryByNeed(LatexMainDesc).
Logging:
command failed. For details...
command failed. No log file
logFile is not readable.
desc - the description of a latex main file texFile
to be processed.dev - the device describing the output format which is either pdf or dvi.
See LatexDev.getLatexOutputFormat().BuildFailureException - TEX01 if invocation one of the following commands fails: the
Settings.getLatex2pdfCommand()
Settings.getBibtexCommand()
Settings.getMakeIndexCommand()
Settings.getMakeGlossariesCommand()
processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev),
processLatex2html(File),
processLatex2odt(File),
processLatex2docx(File)private void processLatex2devCore(LatexProcessor.LatexMainDesc desc, LatexDev dev) throws BuildFailureException
texFile
described by desc once,
runs BibTeX, MakeIndex and MakeGlossaries by need
according to preProcessLatex2dev(LatexMainDesc, LatexDev)
and reruns MakeIndex, MakeGlossaries and LaTeX
as often as needed to get all links satisfied
or as threshold Settings.maxNumReRunsLatex specifies.
Note that still no logging of warnings from a latex run is done.
This is done
in processLatex2dev(LatexProcessor.LatexMainDesc, LatexDev).
The exclusion of logging of warnings is indicated by the name part
'Core'.
Processing without logging of warnings
is required by processLatex2txt(File).
The output format of the LaTeX run is given by dev,
to be more precise by LatexDev.getLatexOutputFormat().
Logging:
WLP01: if another rerun is required but the maximum number of runs
Settings.getMaxNumReRunsLatex() is reached.
Further logging is inherited by invoked methods:
command failed. For details...
command failed. No log file
logFile is not readable.
preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
maybe caused by subsequent runs.
desc - the description of a latex main file texFile
to be processed.dev - the device describing the output format which is either pdf or dvi.
See LatexDev.getLatexOutputFormat().BuildFailureException - TEX01 as for
preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
maybe caused by subsequent runs.processLatex2dvi(File),
processLatex2txt(File)private boolean needRun(boolean another,
String application,
File logFile,
String pattern)
another)
of the application application is necessary
based on a pattern pattern
matching in the log file logFile.
Note that only logFile and pattern
are required unless a warning needs to be issued.
Logging:
another - whether it is requested whether another run (a 'rerun') is required.
If false, just a run is requiredapplication - Determines the application to be rerun.
This may be LaTeX, MakeIndex
but also BibTeX.logFile - the log file which determines
whether to rerun application.pattern - the pattern in the logFile
which determines whether to rerun .application needs to be rerun
based on a pattern pattern
matching in the log file logFile.TexFileUtils.matchInFile(File, String)private void processLatex2dev(LatexProcessor.LatexMainDesc desc, LatexDev dev) throws BuildFailureException
texFile
described by desc
repeatedly as described for
processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev)
and issue a warning if the last LaTeX run issued a warning.
Logging:
logFile is not readable.
command created bad boxes
command emitted warnings
processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev)
if running an exernal command fails.
desc - the description of a latex main file texFile
to be processed.dev - the device describing the output format which is either pdf or dvi.
See LatexDev.getLatexOutputFormat().BuildFailureException - TEX01 as for
processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev).needRun(boolean, String, File, String),
Target.pdfvoid processLatex2dvi(File texFile) throws BuildFailureException
BuildFailureExceptionvoid processLatex2pdf(File texFile) throws BuildFailureException
BuildFailureExceptionprivate void logErrs(File logFile, String command)
texFile
by log.
If the log file exists, a warning is logged
if the error pattern given by Settings.getPatternErrLatex()
occurs in the log file.
If the log file does not exist, an error is logged.
In both cases, the message logged refers to the command
which failed.
Logging:
command failed. For details...
command failed. No log file
logFile is not readable.
private void logWarns(File logFile, String command)
logFile:
Before logging warnings,
errors are logged via logErrs(File, String).
So, if the log-file does not exist,
an error was already shown and so nothing is to be done here.
If the log-file exists, a warning is logged if
Settings.maxNumReRunsLatex,
Settings.getDebugBadBoxes().
Settings.getDebugWarnings().
PATTERN_OUFULL_HVBOX for bad boxes is fixed,
whereas Settings.getPatternWarnLatex() is configurable.
The message logged refers to the command which failed.
Logging:
logFile is not readable.
command created bad boxes
command emitted warnings
logFile - the log-file to detect warnings in.command - the command which created logFile
and which maybe created warnings.void processLatex2html(File texFile) throws BuildFailureException
texFile to html or xhtml
after processing latex to set up the references,
bibliography, index and that like.
Logging: FIXME: incomplete
command failed. For details...
command failed. No log file
logFile is not readable.
texFile - the tex file to be processed.BuildFailureException - TEX01 as for
preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
but also as for runLatex2html(LatexProcessor.LatexMainDesc).preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev),
runLatex2html(LatexProcessor.LatexMainDesc),
Target.htmlvoid processLatex2odt(File texFile) throws BuildFailureException
texFile
to odt or other open office formats
after processing latex to set up the references,
bibliography, index and that like.
Logging: FIXME: incomplete
command failed. For details...
command failed. No log file
logFile is not readable.
texFile - the tex file to be processed.BuildFailureException - TEX01 as for
preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
but also as for runLatex2odt(LatexProcessor.LatexMainDesc).preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev),
runLatex2odt(LatexProcessor.LatexMainDesc),
Target.odtvoid processLatex2docx(File texFile) throws BuildFailureException
texFile
to docx or other MS word formats
after processing latex to set up the references,
bibliography, index and that like.
Logging: FIXME: incomplete
command failed. For details...
command failed. No log file
logFile is not readable.
texFile - the latex main file to be processed.BuildFailureException - TEX01 as for
preProcessLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
but also as for runLatex2odt(LatexProcessor.LatexMainDesc)
and for runOdt2doc(File).preProcessLatex2dev(LatexMainDesc, LatexDev),
runLatex2odt(LatexProcessor.LatexMainDesc),
runOdt2doc(File),
Target.docxvoid processLatex2rtf(File texFile) throws BuildFailureException
texFile to rtf format.
FIXME: Maybe prior invocation of LaTeX MakeIndex and BibTeX after set up the references, bibliography, index and that like would be better.
Logging: FIXME: incomplete
texFile - the tex file to be processed.BuildFailureException - TEX01 if running the latex2rtf command
returned by Settings.getLatex2rtfCommand() failed.runLatex2rtf(File),
Target.rtfvoid processLatex2txt(File texFile) throws BuildFailureException
texFile to txt format via pdf.
Logging: FIXME: incomplete
texFile - the tex file to be processed.BuildFailureException - TEX01 as for
processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev)
and for runPdf2txt(File).processLatex2devCore(LatexProcessor.LatexMainDesc, LatexDev),
runPdf2txt(File),
Target.txtprivate boolean runBibtexByNeed(File texFile) throws BuildFailureException
Settings.getBibtexCommand()
on the aux-file corresponding with texFile
in the directory containing texFile
provided an according pattern in the aux-file indicates
that a bibliography shall be created.
Logging:
bibtex failed. For details...
bibtex failed. No log file
bibtex emitted warnings.
logFile is not readable.
texFile - the latex main file BibTeX is to be processed for.BuildFailureException - TEX01 if invocation of the BibTeX command
returned by Settings.getBibtexCommand() failed.private boolean runMakeIndexByNeed(LatexProcessor.LatexMainDesc desc) throws BuildFailureException
Settings.getMakeIndexCommand()
on the idx-file corresponding with texFile
in the directory containing texFile
provided that the existence of an idx-file indicates
that an index shall be created.
Note that Settings.getMakeIndexCommand()
is invoked either directly, or, in case of a multiple index,
via Settings.getSplitIndexCommand().
Logging:
makeindex failed. For details...
makeindex failed. No log file
makeindex emitted warnings.
desc - the description of a latex main file dviFile
including the idx-file MakeIndex is to be run on.BuildFailureException - TEX01 if invocation of the makeindex command
returned by Settings.getMakeIndexCommand() failed.private void runMakeIndex(LatexProcessor.LatexMainDesc desc) throws BuildFailureException
Settings.getMakeIndexCommand().
Logging:
makeindex failed. For details...
makeindex failed. No log file
makeindex emitted warnings.
desc - the description of a latex main file texFile
including the idx-file MakeIndex is to be run on.BuildFailureException - TEX01 if invocation of the MakeIndex command
returned by Settings.getMakeIndexCommand() failed.private File[] files(String filePrefix, Collection<String> variant, String suffix)
filePrefix,
a collection of intermediate strings variant
and of the suffix suffix.filePrefix - prefix of file name; in practice of index file without suffixvariant - collection of strings; in practice set of identifiers of indicessuffix - the suffix of a file; in practice SUFFIX_IDX.<filePrefix><ident><suffix>,
where ident runs in variant.private void runSplitIndex(LatexProcessor.LatexMainDesc desc, Collection<String> explIdxIdent) throws BuildFailureException
Settings.getSplitIndexCommand().
Logging:
Note that splitindex neither writes a log file
nor may it fail in itself but invoking makeindex
or whatever program it uses.
splitindex failed. For details...
splitindex failed. No log file
splitindex emitted warnings.
desc - the description of a latex main file texFile
including the idx-file SplitIndex is to be run on.explIdxIdent - the set of identifiers of indices,
whether explicitly given or not in the idx file.BuildFailureException - TEX01 if invocation of the SplitIndex command
returned by Settings.getSplitIndexCommand() failed.private boolean runMakeGlossaryByNeed(LatexProcessor.LatexMainDesc desc) throws BuildFailureException
Settings.getMakeGlossariesCommand()
on the aux-file corresponding with texFile
in the directory containing texFile
provided that the existence of an glo-file indicates
that a glossary shall be created.
The MakeGlossaries command is just a wrapper
arround the programs makeindex and xindy.
Logging:
makeglossaries failed. For details...
makeglossaries failed. No log file
makeglossaries emitted warnings.
desc - the description of a latex main file texFile
including the idx-file MakeGlossaries is to be run on.BuildFailureException - TEX01 if invocation of the makeglossaries command
returned by Settings.getMakeGlossariesCommand() failed.private void runLatex2dev(LatexProcessor.LatexMainDesc desc, LatexDev dev) throws BuildFailureException
Settings.getLatex2pdfCommand()
on the latex main file texFile
described by desc
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File).
The output format of the LaTeX run is given by dev,
to be more precise by LatexDev.getLatexOutputFormat().
Logs a warning or an error if the latex run failed
invoking logErrs(File, String)
but not if bad boxes occurred or if warnings occurred.
This is done in
processLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
after the last LaTeX run only.
Logging:
latex2pdf failed. For details...
latex2pdf failed. No log file
desc - the description of a latex main file texFile
to be processed.dev - the device describing the output format which is either pdf or dvi.
See LatexDev.getLatexOutputFormat().BuildFailureException - TEX01 if invocation of the latex2pdf command
returned by Settings.getLatex2pdfCommand() failed.protected static String[] buildLatexArguments(Settings settings, LatexDev dev, File texFile)
private void runDvi2pdf(LatexProcessor.LatexMainDesc desc) throws BuildFailureException
Settings.getDvi2pdfCommand()
on a dvi-file covered by desc with arguments
given by buildLatexArguments(Settings, LatexDev, File).
Logging:
desc - the description of a latex main file dviFile
including the dvi-file dvi2pdf is to be run on.BuildFailureException - TEX01 if invocation of the dvi2pdf command
returned by Settings.getDvi2pdfCommand() failed.private void runLatex2html(LatexProcessor.LatexMainDesc desc) throws BuildFailureException
Settings.getTex4htCommand()
on texFile described by desc
in the directory containing texFile
with arguments given by buildHtlatexArguments(Settings, File).
Logging:
htlatex failed. For details...
htlatex failed. No log file
htlatex created bad boxes
htlatex emitted warnings
desc - the description of a latex main file texFile
to be processed.BuildFailureException - TEX01 if invocation of the tex4ht command
returned by Settings.getTex4htCommand() failed.protected static String[] buildHtlatexArguments(Settings settings, File texFile)
private void runLatex2rtf(File texFile) throws BuildFailureException
Settings.getLatex2rtfCommand()
on texFile
in the directory containing texFile
with arguments given by AbstractLatexProcessor.buildArguments(String, File).
Logging:
texFile - the latex file to be processed.BuildFailureException - TEX01 if invocation of the latex2rtf command
returned by Settings.getLatex2rtfCommand() failed.private void runLatex2odt(LatexProcessor.LatexMainDesc desc) throws BuildFailureException
Settings.getTex4htCommand()
on texFile
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File).
Logs a warning or an error if the latex run failed
invoking logErrs(File, String)
but not if bad boxes ocurred or if warnings occurred.
This is done in
processLatex2dev(LatexProcessor.LatexMainDesc, LatexDev)
after the last LaTeX run only.
Logging:
htlatex failed. For details...
htlatex failed. No log file
htlatex created bad boxes
htlatex emitted warnings
desc - the descriptor of the latex main file to be processed.BuildFailureException - TEX01 if invocation of the tex4ht command
returned by Settings.getTex4htCommand() failed.private void runOdt2doc(File texFile) throws BuildFailureException
Settings.getOdt2docCommand()
on an odt-file created from texFile
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File).
Logging:
texFile - the latex file to be processed.BuildFailureException - TEX01 if invocation of the odt2doc command
returned by Settings.getOdt2docCommand() failed.private void runPdf2txt(File texFile) throws BuildFailureException
Settings.getPdf2txtCommand()
on a pdf-file created from texFile
in the directory containing texFile with arguments
given by buildLatexArguments(Settings, LatexDev, File).
Logging:
texFile - the latex-file to be processed.BuildFailureException - TEX01 if invocation of the pdf2txt command
returned by Settings.getPdf2txtCommand() failed.private void runCheck(File texFile) throws BuildFailureException
Settings.getChkTexCommand()
on the latex main file texFile
in the directory containing texFile
creating a log file with ending SUFFIX_CLG
in that directory.
Logging:
texFile - the latex main file to be checked for.BuildFailureException - TEX01 if invocation of the check command
returned by Settings.getChkTexCommand() failed.protected static String[] buildChkTexArguments(String options, File texFile, File clgFile)
options
except the last three which represent -o clgFile texFile.options - the options string. The individual options
are expected to be separated by a single blank.texFile - the latex main file to be checked.clgFile - the log-file with the result of the check of texFile.options is not empty,
the first entries are the options in options.
The last three entries are
-o, clgFile and texFile.Copyright © 2016–2018 Simuline Organization (l2r). All rights reserved.