Package: file
Version: 1:5.39-3
Severity: normal
X-Debbugs-Cc: jcgo...@protonmail.com

Dear Maintainer,

Latex source files which start with `%!` (usually used to specify directives,
as described here: https://tex.stackexchange.com/q/78101) are detected as
`PostScript document text`, mime type `application/postscript`, rather than
`text/x-tex` or similar.
The following (valid) Latex code shows the problem:

%!
\documentclass{article}
\begin{document}
asdf
\end{document}

If there's a space between the `%` and the `!`, `file` reports `text/x-tex`,
but some users don't put the space there (also apparently valid), so the file
gets incorrectly detected as Postscript.



-- System Information:
Debian Release: 11.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-5-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages file depends on:
ii  libc6      2.31-11
ii  libmagic1  1:5.39-3

file recommends no packages.

file suggests no packages.

-- no debconf information

Reply via email to