Package: file
Version: 4.17-5
Severity: normal
Tags: patch

LaTeX detection only works if the relevant line is the first of the
file. This often isn't the case; many files start with comment blocks.

Fortunately this is easy to fix: just make the matches "regex" instead
of "string".

Additionally, there is currently no MIME type matching for (La)TeX
files. There seems to be a MIME type used for this, text/x-tex, and
while this is far from satisfactory, it's better than nothing (in my
case I use it for rendering LaTeX into PDF or HTML on the fly in a web
application). Hence, I propose the following magic.mime rules:

# TeX documents, from Daniel Quinlan ([EMAIL PROTECTED])
0       regex           \\input         text/x-tex
0       regex           \\section       text/x-tex
0       regex           \\setlength     text/x-tex
0       regex           \\documentstyle text/x-tex
0       regex           \\chapter       text/x-tex
0       regex           \\documentclass text/x-tex

This is the same as the magic rules, but minus the last two entries,
which are not for full document types.

Incidentally, there is a typo in one of the magic rules:

"LaTeX  table of contents"

has a double space which should be a single space.
-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages libmagic1 depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  zlib1g                       1:1.2.3-13  compression library - runtime

libmagic1 recommends no packages.

Versions of packages file depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to