tex revision 186690
1238730Sdelphij#------------------------------------------------------------------------------ 2294286Sdelphij# tex: file(1) magic for TeX files 3238730Sdelphij# 4238730Sdelphij# XXX - needs byte-endian stuff (big-endian and little-endian DVI?) 5238730Sdelphij# 6238730Sdelphij# From <conklin@talisman.kaleida.com> 7238730Sdelphij 8238730Sdelphij# Although we may know the offset of certain text fields in TeX DVI 9195902Sdelphij# and font files, we can't use them reliably because they are not 10237613Sdelphij# zero terminated. [but we do anyway, christos] 11237613Sdelphij0 string \367\002 TeX DVI file 12237613Sdelphij!:mime application/x-dvi 13237613Sdelphij>16 string >\0 (%s) 14237613Sdelphij0 string \367\203 TeX generic font data 15237613Sdelphij0 string \367\131 TeX packed font data 16237613Sdelphij>3 string >\0 (%s) 17195902Sdelphij0 string \367\312 TeX virtual font data 18195902Sdelphij0 search/1 This\ is\ TeX, TeX transcript text 19195902Sdelphij0 search/1 This\ is\ METAFONT, METAFONT transcript text 20195941Sdelphij 21195941Sdelphij# There is no way to detect TeX Font Metric (*.tfm) files without 22195902Sdelphij# breaking them apart and reading the data. The following patterns 23195902Sdelphij# match most *.tfm files generated by METAFONT or afm2tfm. 24195902Sdelphij2 string \000\021 TeX font metric data 25195902Sdelphij!:mime application/x-tex-tfm 26195902Sdelphij>33 string >\0 (%s) 27195902Sdelphij2 string \000\022 TeX font metric data 28195902Sdelphij!:mime application/x-tex-tfm 29195902Sdelphij>33 string >\0 (%s) 30195902Sdelphij 31195902Sdelphij# Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com) 32195902Sdelphij0 search/1 \\input\ texinfo Texinfo source text 33195902Sdelphij!:mime text/x-texinfo 34195902Sdelphij0 search/1 This\ is\ Info\ file GNU Info text 35195902Sdelphij!:mime text/x-info 36195902Sdelphij 37195902Sdelphij# TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com) 38195902Sdelphij0 search/400 \\input TeX document text 39195902Sdelphij!:mime text/x-tex 40195902Sdelphij0 search/400 \\section LaTeX document text 41195902Sdelphij!:mime text/x-tex 42195902Sdelphij0 search/400 \\setlength LaTeX document text 43195902Sdelphij!:mime text/x-tex 44195902Sdelphij0 search/400 \\documentstyle LaTeX document text 45195902Sdelphij!:mime text/x-tex 46195902Sdelphij0 search/400 \\chapter LaTeX document text 47195902Sdelphij!:mime text/x-tex 48195902Sdelphij0 search/400 \\documentclass LaTeX 2e document text 49195902Sdelphij!:mime text/x-tex 50195902Sdelphij0 search/400 \\relax LaTeX auxiliary file 51195902Sdelphij!:mime text/x-tex 52294286Sdelphij0 search/400 \\contentsline LaTeX table of contents 53195902Sdelphij!:mime text/x-tex 54195902Sdelphij0 search/400 %\ -*-latex-*- LaTeX document text 55195902Sdelphij!:mime text/x-tex 56195902Sdelphij 57237613Sdelphij# Tex document, from Hendrik Scholz <hendrik@scholz.net> 58237613Sdelphij0 search/1 \\ifx TeX document text 59237613Sdelphij 60237613Sdelphij# 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 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 94