tex 3.3 KB

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