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: Wed, 23 May 2018 18:37:56 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Hi Keita,

Le 23/05/2018 à 15:39, Ikumi Keita a écrit :
Hi Jean,

jfbu <address@hidden> writes:

It is not easy for me to try out any patch to official AUCTeX
(does it have a github repo?)

It has savannah git repository:
https://git.savannah.gnu.org/cgit/auctex.git
Unfortunately, it doesn't on github.

I gave it a try with a creating a format like this

etex -ini -interaction=nonstopmode -jobname prv_prim\árias "&pdflatex"  
"\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}\dump"

(CAVEAT: for reasons explained above I do not look into AUCTeX ELisp files,
I just started from things in Keita's message and malaxed until I could
execute on commande line)

Then I executed manually this line (which I copied from the continuation of 
your message)

pdflatex -interaction=nonstopmode \&prv_prim\árias "\input{" "\detokenize{" prim\árias.tex 
"}" "}"

and it compiled seemingly successfully

$ pdflatex -interaction=nonstopmode \&prv_prim\árias "\input{" "\detokenize{" prim\árias.tex 
"}" "}"
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded 
format=pdflatex)

The literally same commands succeed here as well on xterm.  However,
after modifying seemingly to coordinate the actual preview-latex
commands, the latter fails.

(1) Add prv_primárias.ini argument to creat .fmt file.
etex -ini -interaction=nonstopmode -jobname prv_prim\árias "&pdflatex" prv_primárias.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{primárias.tex}"
-> No error
pdflatex -interaction=nonstopmode \&prv_prim\árias "\input{" "\detokenize{" prim\árias.tex 
"}" "}"
-> error
----------------------------------------------------------------------
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded 
format=pdflatex)
  restricted \write18 enabled.
entering extended mode
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/.tex
LaTeX2e <2018-04-01> patch level 4
CUSTOMISED FORMAT. Preloaded files:
         .
  article.cls    2014/09/29 v1.4h Standard LaTeX document class
   size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
         .
)
Runaway argument?
! File ended while scanning use of ^^M.
<inserted text>
                 \par
<*> &prv_primárias \
                      input{ \detokenize{ primárias.tex } }
! Emergency stop.
<*> ...ias \input{ \detokenize{ primárias.tex } }
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on .log.
----------------------------------------------------------------------
(2) Add \dump furthermore.
etex -ini -interaction=nonstopmode -jobname prv_prim\árias "&pdflatex" prv_primárias.ini 
"\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}\dump"
 "\input" "\detokenize{primárias.tex}"
-> No error
pdflatex -interaction=nonstopmode \&prv_prim\árias "\input{" "\detokenize{" prim\árias.tex 
"}" "}"
-> No error, but doesn't do its expected job
----------------------------------------------------------------------
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded 
format=pdflatex)
  restricted \write18 enabled.
entering extended mode
LaTeX2e <2018-04-01> patch level 4
(./primárias.tex
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29v1.4h StandardLaTeXdocumentclass
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo)) )
(\dump is performed only by INITEX)
No pages of output.
Transcript written on primárias.log.
----------------------------------------------------------------------

I will be busy for today,

I'm sorry to have bothered you many times.  I deeply appreciate your
kindness so far!


no bothering at all!


Perhaps I should give up this particular case (non-ascii file name +
preview-latex preamble cache) and commit the patch which fixes other
issues.


surely not!

What would helped me is to see the exact content of an ini file.

From another message of yours I have this

----------------------------------------------------------------------
, which can be obtained by C-c C-p C-f.  The init file prv_primárias.ini
is prepared by preview-latex by the following elisp code in
`preview-cache-preamble':
----------------------------------------------------------------------
      ;; mylatex.ltx expects a file name to follow.  Bad. `.tex'
      ;; in the tools bundle is an empty file.
      (write-region "\\ifx\\pdfoutput\\undefined\\else\
\\let\\PREVIEWdump\\dump\\def\\dump{%
\\edef\\next{{\\catcode`\\ 9 \\pdfoutput=\\the\\pdfoutput\\relax\
\\the\\everyjob}}\\everyjob\\next\\catcode`\\ 10 
\\let\\dump\\PREVIEWdump\\dump}\\fi\\input mylatex.ltx \\relax\n" nil dump-file)
----------------------------------------------------------------------

This does a hack (much much more hacky than anything I ever posted here)

It seems the hack goal is to prefix the real \dump by some code
which changes the \everyjob tokens to be prefixed by a change
of catcode of space to "ignore", then it does the \dump with
the thus modified \everyjob.

I thus subsume there is some problem with spaces from input which
the code wants to get ignored.

My eLisp is no-ob so I hope the single backslashes
(after \\else, after \\relax) are there to ignore end of line
and disappear in real thing.

Then it is intriguing that the comment says

"mylatex.ltx expects a file name to follow.  Bad."

and refers to empty file ".tex" but I see mylatex.ltx \relax not mylatex.ltx 
.tex ??

----
about this ".tex" it was missing from TeXLive for a while due to a LaTeX 
packaging
error but is since fixed
https://github.com/latex3/latex2e/issues/30
----

It might take some time until I can say something about preview's
mechanism, as I am not even that familiar to its usage. I hope
David can kick in, that would be so much faster.

It seems rather basic that AUCTeX should support preview
with non ascii filenames, much more so than passing
TeX macros before \input in some eLisp variable, which can be needed
only by advanced users who will know how to achieve
their goal anyhow otherwise.

Best,

Jean-François



reply via email to

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