tex 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #------------------------------------------------------------------------------
  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. # Although we may know the offset of certain text fields in TeX DVI
  8. # and font files, we can't use them reliably because they are not
  9. # zero terminated. [but we do anyway, christos]
  10. 0 string \367\002 TeX DVI file
  11. !:mime application/x-dvi
  12. >16 string >\0 (%s)
  13. 0 string \367\203 TeX generic font data
  14. 0 string \367\131 TeX packed font data
  15. >3 string >\0 (%s)
  16. 0 string \367\312 TeX virtual font data
  17. 0 search/1 This\ is\ TeX, TeX transcript text
  18. 0 search/1 This\ is\ METAFONT, METAFONT transcript text
  19. # There is no way to detect TeX Font Metric (*.tfm) files without
  20. # breaking them apart and reading the data. The following patterns
  21. # match most *.tfm files generated by METAFONT or afm2tfm.
  22. 2 string \000\021 TeX font metric data
  23. !:mime application/x-tex-tfm
  24. >33 string >\0 (%s)
  25. 2 string \000\022 TeX font metric data
  26. !:mime application/x-tex-tfm
  27. >33 string >\0 (%s)
  28. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  29. 0 search/1 \\input\ texinfo Texinfo source text
  30. !:mime text/x-texinfo
  31. 0 search/1 This\ is\ Info\ file GNU Info text
  32. !:mime text/x-info
  33. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  34. 0 search/400 \\input TeX document text
  35. !:mime text/x-tex
  36. 0 search/400 \\section LaTeX document text
  37. !:mime text/x-tex
  38. 0 search/400 \\setlength LaTeX document text
  39. !:mime text/x-tex
  40. 0 search/400 \\documentstyle LaTeX document text
  41. !:mime text/x-tex
  42. 0 search/400 \\chapter LaTeX document text
  43. !:mime text/x-tex
  44. 0 search/400 \\documentclass LaTeX 2e document text
  45. !:mime text/x-tex
  46. 0 search/400 \\relax LaTeX auxiliary file
  47. !:mime text/x-tex
  48. 0 search/400 \\contentsline LaTeX table of contents
  49. !:mime text/x-tex
  50. 0 search/400 %\ -*-latex-*- LaTeX document text
  51. !:mime text/x-tex
  52. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  53. 0 search/1 \\ifx TeX document text
  54. # Index and glossary files
  55. 0 search/400 \\indexentry LaTeX raw index file
  56. 0 search/400 \\begin{theindex} LaTeX sorted index
  57. 0 search/400 \\glossaryentry LaTeX raw glossary
  58. 0 search/400 \\begin{theglossary} LaTeX sorted glossary
  59. 0 search/400 This\ is\ makeindex Makeindex log file
  60. # End of TeX
  61. #------------------------------------------------------------------------------
  62. # file(1) magic for BibTex text files
  63. # From Hendrik Scholz <hendrik@scholz.net>
  64. 0 search/1/c @article{ BibTeX text file
  65. 0 search/1/c @book{ BibTeX text file
  66. 0 search/1/c @inbook{ BibTeX text file
  67. 0 search/1/c @incollection{ BibTeX text file
  68. 0 search/1/c @inproceedings{ BibTeX text file
  69. 0 search/1/c @manual{ BibTeX text file
  70. 0 search/1/c @misc{ BibTeX text file
  71. 0 search/1/c @preamble{ BibTeX text file
  72. 0 search/1/c @phdthesis{ BibTeX text file
  73. 0 search/1/c @techreport{ BibTeX text file
  74. 0 search/1/c @unpublished{ BibTeX text file
  75. 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
  76. 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
  77. 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
  78. 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
  79. 0 search/1 @c\ @mapfile{ TeX font aliases text file