Enum LatexPreProcessor.SuffixHandler

    • Constructor Detail

      • SuffixHandler

        private SuffixHandler()
    • Method Detail

      • values

        public static LatexPreProcessor.SuffixHandler[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LatexPreProcessor.SuffixHandler valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • procSrc

        abstract void procSrc​(File file,
                              LatexPreProcessor proc)
                       throws BuildFailureException
        Typically, .i.e. for 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:

        • WFU03: cannot close
        • WPP02: tex file may be latex main file
        • EEX01, EEX02, EEX03, WEX04, WEX05: if applications for preprocessing graphic files failed.
        • EFU06: if moving a file fails.
        Parameters:
        file - a file with ending given by getSuffix().
        proc - a latex pre-processor.
        Throws:
        BuildFailureException - TEX01 only for fig, gp and mp because these invoke external programs.
      • clearTarget

        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).
        • 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:

        • WPP02: tex file may be latex main file
        • WFU01: Cannot read directory...
        • WFU03: cannot close tex file
        • EFU05: Failed to delete file
          Parameters:
          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.
          See Also:
          clearTarget(File, LatexPreProcessor)
        • getSuffix

          abstract String getSuffix()
          Returns the suffix of the file type of the file type, this is the handler for.