auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] files with non-ascii characters and LaTeX as in TeXLive 201


From: jfbu
Subject: Re: [AUCTeX] files with non-ascii characters and LaTeX as in TeXLive 2018
Date: Mon, 21 May 2018 11:04:47 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Hi Ikumi

Le 18/05/2018 à 08:36, Ikumi Keita a écrit :
Regarding your problem with \message{...}. Perhaps
\unexpanded will help you, as this shows (with April 2018 LaTeX)
\documentclass{article}
\begin{document}
\message{éàù}% gives about 72 macros ....
\message{\unexpanded{éàù}}% just displays éàù
\message{\unexpanded{#}}% does not help the doubling... \string# helps
\end{document}
Thanks for suggestion.  It seems that \unexpanded and \detokenize have
basically the same effect within \message, but I suppose \unexpanded is
better for some reason, isn't it?


I don't see indeed a difference between \unexpanded and \detokenize
when used within \message (but I have not studied the e-TeX sources).

I mentioned \unexpanded because it was more natural to me in the
context of writing to a file external to TeX itself, whereas I
use \detokenize when I am still inside TeX. In effect \detokenize
changes catcodes which is a notion not having sense once the
data is outside of TeX. On the other hand \unexpanded inhibits
TeX expansion (macros, active characters) which is something else.
Traditional LaTeX code base was done before e-TeX (the latter
release date is I think 1999, and TeXLive makes it default for
pdflatex since 2004), and has a \protect mechanism when
writing to files, which uses TeX primitive \noexpand. Things
are much easier with \unexpanded.

It might be that \unexpanded which only prevents expansion has
less overhead than \detokenize which creates tokens with normalized
catcodes, but even if true that is not really important here.

Thus I _think_ \unexpanded and \detokenize achieve exact same
when used within \message, (they obey \escapechar the same,
they add a space after macro names except if \<non-letter>,
they double the #'s,...), but you may need to ping some authority
for confirmation. Perhaps ask for advice on the LaTeX-L mailing
list ? (https://github.com/latex3/latex2e#code-fixes)

Notice that both will require balanced braces inside their
arguments.

About the e-TeX extensions in the context of LaTeX, (not Plain TeX),
I am wondering if there exist realistically people using pdflatex
binary from 15 years ago together with up-to-date AUCTeX ?
(for an example although TL2004's pdflatex was with e-TeX,
I was myself stuck at a place with TL2004 for quite some time,
when I connected over via ssh, but Emacs itself was also very old).

About adding TeX commands on command line the current man page
of pdftex on TL2018 is like this

pdftex [options] [&format] [file|\commands]

which indeed says that it is either filename or commands, the latter
case being recognized by a starting backslash (once reaching pdftex
command line parsing).

If AUCTeX provides a user-interface for extra TeX commands on
command-line, via some variable, couldn't it check for that
variable being or not nil. If nil, do not use \input, if not
nil, use the \input with whatever extra measures are needed
from the fact that any command will be executed after the format
is loaded, hence the non-ascii characters assumed to be utf-8
and their first byte is active.

Best,

Jean-François







reply via email to

[Prev in Thread] Current Thread [Next in Thread]