Hi Jean, thanks a lot, your advice led me to the success! >>>>> jfbu <j...@free.fr> writes:
> Putting altogether : > 1. We need file prv_testmylátex.ini to be > \ifx\pdfoutput\undefined\else\let\PREVIEWdump\dump\def\dump{% > \edef\next{{\catcode`\ 9 \pdfoutput=\the\pdfoutput\relax\the\everyjob}}% > \everyjob\next\catcode`\ 10 % > \catcode`/ 0 % > \def\AUCTEXINPUT##1{\catcode`/ 12\relax\input{\detokenize{##1}}}% > \let\dump\PREVIEWdump\dump}\fi\input mylatex.ltx \relax% > REMARK: the above hack of \dump is conditional on \pdfoutput being > defined which I think is good anyhow. \pdfoutput is defined for > pdflatex whether dvi or pdf output. > 2. We create the format with this incantation > etex -ini -jobname prv_testmylátex "&pdflatex" > "\input{\detokenize{prv_testmylátex.ini}}" > "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" > "\input{\detokenize{testmylátex.tex}}" > the following less paranoid version (I don't wrap the name of ini file in > \detokenize) seems to work too > etex -ini -jobname prv_testmylátex "&pdflatex" prv_testmylátex.ini > "\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}" > "\input{\detokenize{testmylátex.tex}}" I took this version. I also omitted "-jobname prv_testmylátex" since the original AUCTeX code doesn't have that part. Do you recommend to restore them? > The detokenize at the end is really needed. (Or we could play the other games > with \UseRawInputEncoding) > 3. We then use the format with this incantation > pdflatex -fmt="prv_testmylátex.fmt" /AUCTEXINPUT{testmylátex.tex} I used the form "&prv_testmylátex" instead of -fmt="prv_testmylátex.fmt" following the original AUCTeX code. I expect this is harmless. > It works in my testing in Terminal on Mac OS X (bash shell) > (I tested it with /AUCTEXINPUT{some other file with non-ascii filename} > to check macros defined in the preamble of testmylátex.tex are actually > used, proving the created format was indeed used). Thank you very much for your all valuable works! I'll test this with other cases (TL2017, file names with space, on w32 platform) and propose to commit again. For those interested in, the current tentative patch is attached below. Regards, Ikumi Keita
tentative-patch2.gz
Description: new approach v2
_______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel