Simeon Warner > arXiv-1.01 > arXiv::FileGuess

Download:
arXiv-1.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

arXiv::FileGuess - Central file type determination for arXiv

SYNOPSIS ^

Central file type identification for arXiv.org.

Much of this should probably be replaced with the file program with externally maintained magic information. However, we need here to support a number of cases special to arXiv and to make some rather fine-grained determinations of TeX related file formats, along with determination of the order in which they should be processed.

INTERNAL VARIABLES

%TEX_types

A hash of type names which represent TeX types (i.e. should be processed with AutoTeX). Accessed via function is_tex_type().

%NAME

A display name indexed by type. Accessed via function type_name().

SUBROUTINES

guess_file_type($filename)

Guess the file type $filename. Returns ($type, $tex_format, $error), all of which are strings. The $type may be supplied to is_tex_type($type) or type_name($type) for additional information related to the file type.

For most files $tex_format and $error will be undefined. $tex_format will be defined for some TeX file formats where there is additional information about the type of TeX.

is_tex_type($type)

Returns true (1) if the type name supplied is a TeX type, false ('') otherwise.

type_name($type)

Returns display string for the type $type. Or 'unknown' if $type is not recognized.

syntax highlighting: