]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/file/magic/Magdir/tex
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / file / magic / Magdir / tex
1
2 #------------------------------------------------------------------------------
3 # $File: tex,v 1.20 2014/03/16 02:53:03 christos Exp $
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]
13 0       string          \367\002        TeX DVI file
14 !:mime  application/x-dvi
15 >16     string          >\0             (%s)
16 0       string          \367\203        TeX generic font data
17 0       string          \367\131        TeX packed font data
18 >3      string          >\0             (%s)
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
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.
26 2       string          \000\021        TeX font metric data
27 !:mime  application/x-tex-tfm
28 >33     string          >\0             (%s)
29 2       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)
34 0       search/1        \\input\ texinfo        Texinfo source text
35 !:mime  text/x-texinfo
36 0       search/1        This\ is\ Info\ file    GNU Info text
37 !:mime  text/x-info
38
39 # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
40 0       search/4096     \\input         TeX document text
41 !:mime  text/x-tex
42 !:strength + 15
43 0       search/4096     \\begin         LaTeX document text
44 !:mime  text/x-tex
45 !:strength + 15
46 0       search/4096     \\section       LaTeX document text
47 !:mime  text/x-tex
48 !:strength + 18
49 0       search/4096     \\setlength     LaTeX document text
50 !:mime  text/x-tex
51 !:strength + 15
52 0       search/4096     \\documentstyle LaTeX document text
53 !:mime  text/x-tex
54 !:strength + 18
55 0       search/4096     \\chapter       LaTeX document text
56 !:mime  text/x-tex
57 !:strength + 18
58 0       search/4096     \\documentclass LaTeX 2e document text
59 !:mime  text/x-tex
60 !:strength + 15
61 0       search/4096     \\relax         LaTeX auxiliary file
62 !:mime  text/x-tex
63 !:strength + 15
64 0       search/4096     \\contentsline  LaTeX table of contents
65 !:mime  text/x-tex
66 !:strength + 15
67 0       search/4096     %\ -*-latex-*-  LaTeX document text
68 !:mime  text/x-tex
69
70 # Tex document, from Hendrik Scholz <hendrik@scholz.net>
71 0       search/1        \\ifx           TeX document text
72
73 # Index and glossary files
74 0       search/4096     \\indexentry    LaTeX raw index file
75 0       search/4096     \\begin{theindex}       LaTeX sorted index
76 0       search/4096     \\glossaryentry LaTeX raw glossary
77 0       search/4096     \\begin{theglossary}    LaTeX sorted glossary
78 0       search/4096     This\ is\ makeindex     Makeindex log file
79
80 # End of TeX
81
82 #------------------------------------------------------------------------------
83 # file(1) magic for BibTex text files
84 # From Hendrik Scholz <hendrik@scholz.net>
85
86 0       search/1/c      @article{       BibTeX text file
87 0       search/1/c      @book{          BibTeX text file
88 0       search/1/c      @inbook{        BibTeX text file
89 0       search/1/c      @incollection{  BibTeX text file
90 0       search/1/c      @inproceedings{ BibTeX text file
91 0       search/1/c      @manual{        BibTeX text file
92 0       search/1/c      @misc{          BibTeX text file
93 0       search/1/c      @preamble{      BibTeX text file
94 0       search/1/c      @phdthesis{     BibTeX text file
95 0       search/1/c      @techreport{    BibTeX text file
96 0       search/1/c      @unpublished{   BibTeX text file
97
98 73      search/1        %%%\ \          BibTeX-file{ BibTex text file (with full header)
99
100 73      search/1        %%%\ \ @BibTeX-style-file{   BibTeX style text file (with full header)
101
102 0       search/1        %\ BibTeX\ standard\ bibliography\      BibTeX standard bibliography style text file
103
104 0       search/1        %\ BibTeX\ `    BibTeX custom bibliography style text file
105
106 0       search/1        @c\ @mapfile{   TeX font aliases text file
107
108 0       string          #LyX            LyX document text
109
110 # ConTeXt documents
111 #       http://wiki.contextgarden.net/
112 0       search/4096     \\setupcolors[          ConTeXt document text
113 !:strength + 15
114 0       search/4096     \\definecolor[          ConTeXt document text
115 !:strength + 15
116 0       search/4096     \\setupinteraction[     ConTeXt document text
117 !:strength + 15
118 0       search/4096     \\useURL[               ConTeXt document text
119 !:strength + 15
120 0       search/4096     \\setuppapersize[       ConTeXt document text
121 !:strength + 15
122 0       search/4096     \\setuplayout[          ConTeXt document text
123 !:strength + 15
124 0       search/4096     \\setupfooter[          ConTeXt document text
125 !:strength + 15
126 0       search/4096     \\setupfootertexts[     ConTeXt document text
127 !:strength + 15
128 0       search/4096     \\setuppagenumbering[   ConTeXt document text
129 !:strength + 15
130 0       search/4096     \\setupbodyfont[        ConTeXt document text
131 !:strength + 15
132 0       search/4096     \\setuphead[            ConTeXt document text
133 !:strength + 15
134 0       search/4096     \\setupitemize[         ConTeXt document text
135 !:strength + 15
136 0       search/4096     \\setupwhitespace[      ConTeXt document text
137 !:strength + 15
138 0       search/4096     \\setupindenting[       ConTeXt document text
139 !:strength + 15