auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [AUCTeX] files with non-ascii characters and LaTeX as


From: Ikumi Keita
Subject: Re: [AUCTeX-devel] [AUCTeX] files with non-ascii characters and LaTeX as in TeXLive 2018
Date: Fri, 25 May 2018 00:26:47 +0900

Hi Jean and all,

The proposed method, with slight modification explained below, works for
all the cases I tested.  Thank you again!
For now, I attach the patch for preview-latex part only so that the
reader can concentrate on the relavant changes.

>>>>> jfbu <address@hidden> writes:

>> \ifx\pdfoutput\undefined\else\let\PREVIEWdump\dump\def\dump{%
>> \edef\next{{\pdfoutput=\the\pdfoutput\relax\the\everyjob}}%
>> \everyjob\next\catcode`\ 10 %
>> \catcode`/ 0 %
>> \def\AUCTEXINPUT##1{\catcode`/ 12\relax\catcode`\ 
>> 9\relax\input{\detokenize{"##1"}}}%
>> \let\dump\PREVIEWdump\dump}\fi\input mylatex.ltx \relax%


>> Notice that when ##1 (i.e. the filename) will be grabbed) the / is of
>> catcode 0, so ##1 is tokenized accordingly. Which in principle could
>> perhaps cause an issue \detokenize{aaa/b23} would give aaa/b<space>123
>> but as / is not legal in filenames in contexts I know of, I did not even
>> test this anticipation.

AUCTeX always runs TeX commands after changing the current directory to
that of the master file, so forward slash would never appear as an
argument of the command.  The region file is created in the same
directory as the master, thus region compilation should work as well.

>> I have also added quotes inside the \detokenize.

I tried removing those quotes and let the quotes added around the file
name with space to be put inside /AUCTEXINPUT like this:
pdflatex -foo -bar &prv_ppp_qqq /AUCTEXINPUT{"ppp qqq"} (without escape for 
shell)
, because it's easier to absorb the difference in the way of quoting the
shell arguments between w32 and non-w32 platforms.  Experiments showed
no problems even for files without space, so the attached patch takes
this way.  If this has any shortcomings, please tell me.

Regards,
Ikumi Keita

Attachment: preview-diff.gz
Description: diff for preview-latex only


reply via email to

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