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 <[email protected]> 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
preview-diff.gz
Description: diff for preview-latex only
_______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
