tex 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #------------------------------------------------------------------------------
  2. # $File: tex,v 1.18 2011/02/08 13:45:15 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/4096 \\input TeX document text
  36. !:mime text/x-tex
  37. !:strength + 15
  38. 0 search/4096 \\section LaTeX document text
  39. !:mime text/x-tex
  40. !:strength + 18
  41. 0 search/4096 \\setlength LaTeX document text
  42. !:mime text/x-tex
  43. !:strength + 15
  44. 0 search/4096 \\documentstyle LaTeX document text
  45. !:mime text/x-tex
  46. !:strength + 18
  47. 0 search/4096 \\chapter LaTeX document text
  48. !:mime text/x-tex
  49. !:strength + 18
  50. 0 search/4096 \\documentclass LaTeX 2e document text
  51. !:mime text/x-tex
  52. !:strength + 15
  53. 0 search/4096 \\relax LaTeX auxiliary file
  54. !:mime text/x-tex
  55. !:strength + 15
  56. 0 search/4096 \\contentsline LaTeX table of contents
  57. !:mime text/x-tex
  58. !:strength + 15
  59. 0 search/4096 %\ -*-latex-*- LaTeX document text
  60. !:mime text/x-tex
  61. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  62. 0 search/1 \\ifx TeX document text
  63. # Index and glossary files
  64. 0 search/4096 \\indexentry LaTeX raw index file
  65. 0 search/4096 \\begin{theindex} LaTeX sorted index
  66. 0 search/4096 \\glossaryentry LaTeX raw glossary
  67. 0 search/4096 \\begin{theglossary} LaTeX sorted glossary
  68. 0 search/4096 This\ is\ makeindex Makeindex log file
  69. # End of TeX
  70. #------------------------------------------------------------------------------
  71. # file(1) magic for BibTex text files
  72. # From Hendrik Scholz <hendrik@scholz.net>
  73. 0 search/1/c @article{ BibTeX text file
  74. 0 search/1/c @book{ BibTeX text file
  75. 0 search/1/c @inbook{ BibTeX text file
  76. 0 search/1/c @incollection{ BibTeX text file
  77. 0 search/1/c @inproceedings{ BibTeX text file
  78. 0 search/1/c @manual{ BibTeX text file
  79. 0 search/1/c @misc{ BibTeX text file
  80. 0 search/1/c @preamble{ BibTeX text file
  81. 0 search/1/c @phdthesis{ BibTeX text file
  82. 0 search/1/c @techreport{ BibTeX text file
  83. 0 search/1/c @unpublished{ BibTeX text file
  84. 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
  85. 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
  86. 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
  87. 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
  88. 0 search/1 @c\ @mapfile{ TeX font aliases text file
  89. 0 string #LyX LyX document text