tex 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #------------------------------------------------------------------------------
  2. # $File: tex,v 1.24 2026/02/01 16:17:53 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
  12. >(14.b+15) string \213
  13. >>14 pstring >\0 TeX DVI file (%s)
  14. !:mime application/x-dvi
  15. 0 string \367\203 TeX generic font data
  16. 0 string \367\131 TeX packed font data
  17. >3 string >\0 (%s)
  18. 0 string \367\312
  19. >(2.b+11) string \363 TeX virtual font data
  20. 0 search/1 This\ is\ TeX, TeX transcript text
  21. 0 search/1 This\ is\ pdfTeX, pdfTeX transcript text
  22. 0 search/1 This\ is\ XeTeX, XeTeX transcript text
  23. 0 search/1 This\ is\ LuaTeX, LuaTeX transcript text
  24. 0 search/1 This\ is\ LuaHBTeX, LuaTeX transcript text
  25. 0 search/1 This\ is\ LuajitTeX, LuaTeX transcript text
  26. 0 search/1 This\ is\ LuajitHBTeX, LuaTeX transcript text
  27. 0 search/1 This\ is\ pTeX, pTeX transcript text
  28. 0 search/1 This\ is\ e-pTeX, e-pTeX transcript text
  29. 0 search/1 This\ is\ upTeX, upTeX transcript text
  30. 0 search/1 This\ is\ e-upTeX, e-upTeX transcript text
  31. 0 search/1 This\ is\ HiTeX, HiTeX transcript text
  32. 0 search/1 This\ is\ METAFONT, METAFONT transcript text
  33. # There is no way to detect TeX Font Metric (*.tfm) files without
  34. # breaking them apart and reading the data. The following patterns
  35. # match most *.tfm files generated by METAFONT or afm2tfm.
  36. 2 string \000\021 TeX font metric data
  37. !:mime application/x-tex-tfm
  38. >33 string >\0 (%s)
  39. 2 string \000\022 TeX font metric data
  40. !:mime application/x-tex-tfm
  41. >33 string >\0 (%s)
  42. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  43. 0 search/1 \\input\ texinfo Texinfo source text
  44. !:mime text/x-texinfo
  45. 0 search/1 This\ is\ Info\ file GNU Info text
  46. !:mime text/x-info
  47. 0 string %!TEX\040root TeX Document text
  48. !:mime text/x-tex
  49. !:strength + 15
  50. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  51. 0 search/4096 \\input TeX document text
  52. !:mime text/x-tex
  53. !:strength + 15
  54. 0 search/4096 \\begin LaTeX document text
  55. !:mime text/x-tex
  56. !:strength + 15
  57. 0 search/4096 \\section LaTeX document text
  58. !:mime text/x-tex
  59. !:strength + 18
  60. 0 search/4096 \\setlength LaTeX document text
  61. !:mime text/x-tex
  62. !:strength + 15
  63. 0 search/4096 \\documentstyle LaTeX document text
  64. !:mime text/x-tex
  65. !:strength + 18
  66. 0 search/4096 \\chapter LaTeX document text
  67. !:mime text/x-tex
  68. !:strength + 18
  69. 0 search/4096 \\documentclass LaTeX 2e document text
  70. !:mime text/x-tex
  71. !:strength + 15
  72. 0 search/4096 \\relax LaTeX auxiliary file
  73. !:mime text/x-tex
  74. !:strength + 15
  75. 0 search/4096 \\contentsline LaTeX table of contents
  76. !:mime text/x-tex
  77. !:strength + 15
  78. 0 search/4096 %\ -*-latex-*- LaTeX document text
  79. !:mime text/x-tex
  80. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  81. 0 search/1 \\ifx TeX document text
  82. # Index and glossary files
  83. 0 search/4096 \\indexentry LaTeX raw index file
  84. 0 search/4096 \\begin{theindex} LaTeX sorted index
  85. 0 search/4096 \\glossaryentry LaTeX raw glossary
  86. 0 search/4096 \\begin{theglossary} LaTeX sorted glossary
  87. 0 search/4096 This\ is\ makeindex Makeindex log file
  88. # End of TeX
  89. #------------------------------------------------------------------------------
  90. # file(1) magic for BibTex text files
  91. # From Hendrik Scholz <hendrik@scholz.net>
  92. 0 search/1/c @article{ BibTeX text file
  93. 0 search/1/c @book{ BibTeX text file
  94. 0 search/1/c @inbook{ BibTeX text file
  95. 0 search/1/c @incollection{ BibTeX text file
  96. 0 search/1/c @inproceedings{ BibTeX text file
  97. 0 search/1/c @manual{ BibTeX text file
  98. 0 search/1/c @misc{ BibTeX text file
  99. 0 search/1/c @preamble{ BibTeX text file
  100. 0 search/1/c @phdthesis{ BibTeX text file
  101. 0 search/1/c @techreport{ BibTeX text file
  102. 0 search/1/c @unpublished{ BibTeX text file
  103. 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
  104. 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
  105. 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
  106. 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
  107. 0 search/1 @c\ @mapfile{ TeX font aliases text file
  108. 0 string #LyX LyX document text
  109. # ConTeXt documents
  110. # https://wiki.contextgarden.net/
  111. 0 search/4096 \\setupcolors[ ConTeXt document text
  112. !:strength + 15
  113. 0 search/4096 \\definecolor[ ConTeXt document text
  114. !:strength + 15
  115. 0 search/4096 \\setupinteraction[ ConTeXt document text
  116. !:strength + 15
  117. 0 search/4096 \\useURL[ ConTeXt document text
  118. !:strength + 15
  119. 0 search/4096 \\setuppapersize[ ConTeXt document text
  120. !:strength + 15
  121. 0 search/4096 \\setuplayout[ ConTeXt document text
  122. !:strength + 15
  123. 0 search/4096 \\setupfooter[ ConTeXt document text
  124. !:strength + 15
  125. 0 search/4096 \\setupfootertexts[ ConTeXt document text
  126. !:strength + 15
  127. 0 search/4096 \\setuppagenumbering[ ConTeXt document text
  128. !:strength + 15
  129. 0 search/4096 \\setupbodyfont[ ConTeXt document text
  130. !:strength + 15
  131. 0 search/4096 \\setuphead[ ConTeXt document text
  132. !:strength + 15
  133. 0 search/4096 \\setupitemize[ ConTeXt document text
  134. !:strength + 15
  135. 0 search/4096 \\setupwhitespace[ ConTeXt document text
  136. !:strength + 15
  137. 0 search/4096 \\setupindenting[ ConTeXt document text
  138. !:strength + 15