Deleted Added
full compact
tex (186690) tex (226048)
1
1#------------------------------------------------------------------------------
2#------------------------------------------------------------------------------
3# $File: tex,v 1.18 2011/02/08 13:45:15 christos Exp $
2# tex: file(1) magic for TeX files
3#
4# XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
5#
6# From <conklin@talisman.kaleida.com>
7
8# Although we may know the offset of certain text fields in TeX DVI
9# and font files, we can't use them reliably because they are not
10# zero terminated. [but we do anyway, christos]
110 string \367\002 TeX DVI file
12!:mime application/x-dvi
13>16 string >\0 (%s)
140 string \367\203 TeX generic font data
150 string \367\131 TeX packed font data
16>3 string >\0 (%s)
170 string \367\312 TeX virtual font data
180 search/1 This\ is\ TeX, TeX transcript text
190 search/1 This\ is\ METAFONT, METAFONT transcript text
20
21# There is no way to detect TeX Font Metric (*.tfm) files without
22# breaking them apart and reading the data. The following patterns
23# match most *.tfm files generated by METAFONT or afm2tfm.
242 string \000\021 TeX font metric data
25!:mime application/x-tex-tfm
26>33 string >\0 (%s)
272 string \000\022 TeX font metric data
28!:mime application/x-tex-tfm
29>33 string >\0 (%s)
30
31# Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
320 search/1 \\input\ texinfo Texinfo source text
33!:mime text/x-texinfo
340 search/1 This\ is\ Info\ file GNU Info text
35!:mime text/x-info
36
37# TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
4# tex: file(1) magic for TeX files
5#
6# XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
7#
8# From <conklin@talisman.kaleida.com>
9
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]
130 string \367\002 TeX DVI file
14!:mime application/x-dvi
15>16 string >\0 (%s)
160 string \367\203 TeX generic font data
170 string \367\131 TeX packed font data
18>3 string >\0 (%s)
190 string \367\312 TeX virtual font data
200 search/1 This\ is\ TeX, TeX transcript text
210 search/1 This\ is\ METAFONT, METAFONT transcript text
22
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.
262 string \000\021 TeX font metric data
27!:mime application/x-tex-tfm
28>33 string >\0 (%s)
292 string \000\022 TeX font metric data
30!:mime application/x-tex-tfm
31>33 string >\0 (%s)
32
33# Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
340 search/1 \\input\ texinfo Texinfo source text
35!:mime text/x-texinfo
360 search/1 This\ is\ Info\ file GNU Info text
37!:mime text/x-info
38
39# TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
380 search/400 \\input TeX document text
400 search/4096 \\input TeX document text
39!:mime text/x-tex
41!:mime text/x-tex
400 search/400 \\section LaTeX document text
42!:strength + 15
430 search/4096 \\section LaTeX document text
41!:mime text/x-tex
44!:mime text/x-tex
420 search/400 \\setlength LaTeX document text
45!:strength + 18
460 search/4096 \\setlength LaTeX document text
43!:mime text/x-tex
47!:mime text/x-tex
440 search/400 \\documentstyle LaTeX document text
48!:strength + 15
490 search/4096 \\documentstyle LaTeX document text
45!:mime text/x-tex
50!:mime text/x-tex
460 search/400 \\chapter LaTeX document text
51!:strength + 18
520 search/4096 \\chapter LaTeX document text
47!:mime text/x-tex
53!:mime text/x-tex
480 search/400 \\documentclass LaTeX 2e document text
54!:strength + 18
550 search/4096 \\documentclass LaTeX 2e document text
49!:mime text/x-tex
56!:mime text/x-tex
500 search/400 \\relax LaTeX auxiliary file
57!:strength + 15
580 search/4096 \\relax LaTeX auxiliary file
51!:mime text/x-tex
59!:mime text/x-tex
520 search/400 \\contentsline LaTeX table of contents
60!:strength + 15
610 search/4096 \\contentsline LaTeX table of contents
53!:mime text/x-tex
62!:mime text/x-tex
540 search/400 %\ -*-latex-*- LaTeX document text
63!:strength + 15
640 search/4096 %\ -*-latex-*- LaTeX document text
55!:mime text/x-tex
56
57# Tex document, from Hendrik Scholz <hendrik@scholz.net>
580 search/1 \\ifx TeX document text
59
60# Index and glossary files
65!:mime text/x-tex
66
67# Tex document, from Hendrik Scholz <hendrik@scholz.net>
680 search/1 \\ifx TeX document text
69
70# Index and glossary files
610 search/400 \\indexentry LaTeX raw index file
620 search/400 \\begin{theindex} LaTeX sorted index
630 search/400 \\glossaryentry LaTeX raw glossary
640 search/400 \\begin{theglossary} LaTeX sorted glossary
650 search/400 This\ is\ makeindex Makeindex log file
710 search/4096 \\indexentry LaTeX raw index file
720 search/4096 \\begin{theindex} LaTeX sorted index
730 search/4096 \\glossaryentry LaTeX raw glossary
740 search/4096 \\begin{theglossary} LaTeX sorted glossary
750 search/4096 This\ is\ makeindex Makeindex log file
66
67# End of TeX
68
69#------------------------------------------------------------------------------
70# file(1) magic for BibTex text files
71# From Hendrik Scholz <hendrik@scholz.net>
72
730 search/1/c @article{ BibTeX text file
740 search/1/c @book{ BibTeX text file
750 search/1/c @inbook{ BibTeX text file
760 search/1/c @incollection{ BibTeX text file
770 search/1/c @inproceedings{ BibTeX text file
780 search/1/c @manual{ BibTeX text file
790 search/1/c @misc{ BibTeX text file
800 search/1/c @preamble{ BibTeX text file
810 search/1/c @phdthesis{ BibTeX text file
820 search/1/c @techreport{ BibTeX text file
830 search/1/c @unpublished{ BibTeX text file
84
8573 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
86
8773 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
88
890 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
90
910 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
92
930 search/1 @c\ @mapfile{ TeX font aliases text file
76
77# End of TeX
78
79#------------------------------------------------------------------------------
80# file(1) magic for BibTex text files
81# From Hendrik Scholz <hendrik@scholz.net>
82
830 search/1/c @article{ BibTeX text file
840 search/1/c @book{ BibTeX text file
850 search/1/c @inbook{ BibTeX text file
860 search/1/c @incollection{ BibTeX text file
870 search/1/c @inproceedings{ BibTeX text file
880 search/1/c @manual{ BibTeX text file
890 search/1/c @misc{ BibTeX text file
900 search/1/c @preamble{ BibTeX text file
910 search/1/c @phdthesis{ BibTeX text file
920 search/1/c @techreport{ BibTeX text file
930 search/1/c @unpublished{ BibTeX text file
94
9573 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
96
9773 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
98
990 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
100
1010 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
102
1030 search/1 @c\ @mapfile{ TeX font aliases text file
104
1050 string #LyX LyX document text