2 #------------------------------------------------------------------------------
3 # $File: tex,v 1.18 2011/02/08 13:45:15 christos Exp $
4 # tex: file(1) magic for TeX files
6 # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
8 # From <conklin@talisman.kaleida.com>
10 # Although we may know the offset of certain text fields in TeX DVI
11 # and font files, we can't use them reliably because they are not
12 # zero terminated. [but we do anyway, christos]
13 0 string \367\002 TeX DVI file
14 !:mime application/x-dvi
16 0 string \367\203 TeX generic font data
17 0 string \367\131 TeX packed font data
19 0 string \367\312 TeX virtual font data
20 0 search/1 This\ is\ TeX, TeX transcript text
21 0 search/1 This\ is\ METAFONT, METAFONT transcript text
23 # There is no way to detect TeX Font Metric (*.tfm) files without
24 # breaking them apart and reading the data. The following patterns
25 # match most *.tfm files generated by METAFONT or afm2tfm.
26 2 string \000\021 TeX font metric data
27 !:mime application/x-tex-tfm
29 2 string \000\022 TeX font metric data
30 !:mime application/x-tex-tfm
33 # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
34 0 search/1 \\input\ texinfo Texinfo source text
36 0 search/1 This\ is\ Info\ file GNU Info text
39 # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
40 0 search/4096 \\input TeX document text
43 0 search/4096 \\section LaTeX document text
46 0 search/4096 \\setlength LaTeX document text
49 0 search/4096 \\documentstyle LaTeX document text
52 0 search/4096 \\chapter LaTeX document text
55 0 search/4096 \\documentclass LaTeX 2e document text
58 0 search/4096 \\relax LaTeX auxiliary file
61 0 search/4096 \\contentsline LaTeX table of contents
64 0 search/4096 %\ -*-latex-*- LaTeX document text
67 # Tex document, from Hendrik Scholz <hendrik@scholz.net>
68 0 search/1 \\ifx TeX document text
70 # Index and glossary files
71 0 search/4096 \\indexentry LaTeX raw index file
72 0 search/4096 \\begin{theindex} LaTeX sorted index
73 0 search/4096 \\glossaryentry LaTeX raw glossary
74 0 search/4096 \\begin{theglossary} LaTeX sorted glossary
75 0 search/4096 This\ is\ makeindex Makeindex log file
79 #------------------------------------------------------------------------------
80 # file(1) magic for BibTex text files
81 # From Hendrik Scholz <hendrik@scholz.net>
83 0 search/1/c @article{ BibTeX text file
84 0 search/1/c @book{ BibTeX text file
85 0 search/1/c @inbook{ BibTeX text file
86 0 search/1/c @incollection{ BibTeX text file
87 0 search/1/c @inproceedings{ BibTeX text file
88 0 search/1/c @manual{ BibTeX text file
89 0 search/1/c @misc{ BibTeX text file
90 0 search/1/c @preamble{ BibTeX text file
91 0 search/1/c @phdthesis{ BibTeX text file
92 0 search/1/c @techreport{ BibTeX text file
93 0 search/1/c @unpublished{ BibTeX text file
95 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
97 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
99 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
101 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
103 0 search/1 @c\ @mapfile{ TeX font aliases text file
105 0 string #LyX LyX document text