tex 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #------------------------------------------------------------------------------
  2. # $File: tex,v 1.20 2014/03/16 02:53:03 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 \\begin LaTeX document text
  39. !:mime text/x-tex
  40. !:strength + 15
  41. 0 search/4096 \\section LaTeX document text
  42. !:mime text/x-tex
  43. !:strength + 18
  44. 0 search/4096 \\setlength LaTeX document text
  45. !:mime text/x-tex
  46. !:strength + 15
  47. 0 search/4096 \\documentstyle LaTeX document text
  48. !:mime text/x-tex
  49. !:strength + 18
  50. 0 search/4096 \\chapter LaTeX document text
  51. !:mime text/x-tex
  52. !:strength + 18
  53. 0 search/4096 \\documentclass LaTeX 2e document text
  54. !:mime text/x-tex
  55. !:strength + 15
  56. 0 search/4096 \\relax LaTeX auxiliary file
  57. !:mime text/x-tex
  58. !:strength + 15
  59. 0 search/4096 \\contentsline LaTeX table of contents
  60. !:mime text/x-tex
  61. !:strength + 15
  62. 0 search/4096 %\ -*-latex-*- LaTeX document text
  63. !:mime text/x-tex
  64. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  65. 0 search/1 \\ifx TeX document text
  66. # Index and glossary files
  67. 0 search/4096 \\indexentry LaTeX raw index file
  68. 0 search/4096 \\begin{theindex} LaTeX sorted index
  69. 0 search/4096 \\glossaryentry LaTeX raw glossary
  70. 0 search/4096 \\begin{theglossary} LaTeX sorted glossary
  71. 0 search/4096 This\ is\ makeindex Makeindex log file
  72. # End of TeX
  73. #------------------------------------------------------------------------------
  74. # file(1) magic for BibTex text files
  75. # From Hendrik Scholz <hendrik@scholz.net>
  76. 0 search/1/c @article{ BibTeX text file
  77. 0 search/1/c @book{ BibTeX text file
  78. 0 search/1/c @inbook{ BibTeX text file
  79. 0 search/1/c @incollection{ BibTeX text file
  80. 0 search/1/c @inproceedings{ BibTeX text file
  81. 0 search/1/c @manual{ BibTeX text file
  82. 0 search/1/c @misc{ BibTeX text file
  83. 0 search/1/c @preamble{ BibTeX text file
  84. 0 search/1/c @phdthesis{ BibTeX text file
  85. 0 search/1/c @techreport{ BibTeX text file
  86. 0 search/1/c @unpublished{ BibTeX text file
  87. 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
  88. 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
  89. 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
  90. 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
  91. 0 search/1 @c\ @mapfile{ TeX font aliases text file
  92. 0 string #LyX LyX document text
  93. # ConTeXt documents
  94. # http://wiki.contextgarden.net/
  95. 0 search/4096 \\setupcolors[ ConTeXt document text
  96. !:strength + 15
  97. 0 search/4096 \\definecolor[ ConTeXt document text
  98. !:strength + 15
  99. 0 search/4096 \\setupinteraction[ ConTeXt document text
  100. !:strength + 15
  101. 0 search/4096 \\useURL[ ConTeXt document text
  102. !:strength + 15
  103. 0 search/4096 \\setuppapersize[ ConTeXt document text
  104. !:strength + 15
  105. 0 search/4096 \\setuplayout[ ConTeXt document text
  106. !:strength + 15
  107. 0 search/4096 \\setupfooter[ ConTeXt document text
  108. !:strength + 15
  109. 0 search/4096 \\setupfootertexts[ ConTeXt document text
  110. !:strength + 15
  111. 0 search/4096 \\setuppagenumbering[ ConTeXt document text
  112. !:strength + 15
  113. 0 search/4096 \\setupbodyfont[ ConTeXt document text
  114. !:strength + 15
  115. 0 search/4096 \\setuphead[ ConTeXt document text
  116. !:strength + 15
  117. 0 search/4096 \\setupitemize[ ConTeXt document text
  118. !:strength + 15
  119. 0 search/4096 \\setupwhitespace[ ConTeXt document text
  120. !:strength + 15
  121. 0 search/4096 \\setupindenting[ ConTeXt document text
  122. !:strength + 15