Received: (at bugs) by bugs.debian.org; 26 Feb 2001 15:45:46 +0000 From Marcin.Kasperski@softax.com.pl Mon Feb 26 09:45:46 2001 Return-path: Received: from bozon.softax.com.pl [::ffff:212.45.246.130] by master.debian.org with esmtp (Exim 3.12 1 (Debian)) id 14XPqL-0007GY-00; Mon, 26 Feb 2001 09:45:45 -0600 Received: from atlas.softax.com.pl ([212.45.246.141] helo=softax.com.pl) by bozon.softax.com.pl with esmtp (Exim 3.15 #1) id 14XPq1-0002PR-00 for bugs@bugs.debian.org; Mon, 26 Feb 2001 16:45:25 +0100 Sender: marcink Message-ID: <3A9A7A15.8DE45725@softax.com.pl> Date: Mon, 26 Feb 2001 16:45:25 +0100 From: Marcin Kasperski X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: pl, Polish, en MIME-Version: 1.0 To: Debian Bugs Subject: AucTeX commands ignore translate-file settings... Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Delivered-To: bugs@bugs.debian.org Package: xemacs21-basesupport Version: 2000.09.04-1 Recent TeX distributions (initiating from teTeX but this extensions is becoming popular) contain nice enhancement for people using non-English languages (in my case it is Polish so my examples mention iso-latin-2). One can specify .tex file encoding in the first line of the TeX document writing something like %& -translate-file=il2-pl After writing that running any tex command (tex, latex, pdflatex) on the file is equivalent to running *tex -translate-file blah.tex on the file which does not contain such specification (what causes to translate characters encoding in some way before the exact TeXing). This is nice because documents can self-describe their encoding (BTW, this method works better than inputenc package bound to LaTeX2e for two reasons: it works for plain tex and it is compatible with everything while inputenc conflicts with some packages). Unfortunately, auctex processes TeX files with something like *tex '\nonstopmode\input{blah.tex}' in which case encoding declaration is not handled (this results in strange characters presented in place of the national characters). Workaround: one can customize TeX-command-list changing - say - %l '\\nonstopmode\\input{%t}' to %l -translate-file=il2-pl '\\nonstopmode\\input{%t}' Works for people using one and only one encoding (frequent case). The problem and this trick could be documented in AucTeX docs. Complete solution which I would really like: AucTeX could notice shebang line in the buffer being processed (it must be the first line), enable encoding information to commands in the form of some %p (where %p can contain sth. like '-translate-file=il2-pl') and use it in default commands (say %l %p '\\nonstopmode\\input{%t}'. By the way: the shebang line can contain format declaration too. In this case it can look so: %&latex -translate-file=il2-pl and causes processing like text &latex -translate-file=il2-pl blah.tex Adding &latex to %p would work in this case too... -- http://www.mk.w.pl / Marcin.Kasperski | Internetowy arkusz pracy (timesheet): @softax.com.pl | http://www.mk.w.pl/programy/timesheet @bigfoot.com \