[XeTeX] Emacs (X11) and XeTeX -- success

Martin Steer m.steer at coombs.anu.edu.au
Thu Feb 8 03:16:34 CET 2007


Peter Dyballa <Peter_Dyballa at Web.DE> writes:

> Am 07.02.2007 um 04:03 schrieb Martin Steer:

>> I don't understand the problem. It is possible to interact with
>> latex/xelatex through the output buffer. I can enter 'I', 'R', '?',
>> etc. and get an appropriate response. I'm using auctex 11.83.1 on
>> linux.
>>

> This might also work in Mac OS X. (I finally managed to get my dir  
> files describe what the info directories contain, so that info now  
> works accurately – but there's nothing more than in the PDF format  
> documentation file.) Citing from the AUCTeX info node:
>
> 	-- Command: TeX-interactive-mode
> 	     (`C-c C-t C-i') This command toggles the interactive mode of
> 	     AUCTeX, a global minor mode.  You can customize
> 	     `TeX-interactive-mode' to give it a different default.  In
> 	     interactive mode, TeX will pause with an error prompt when errors
> 	     are encountered and wait for the user to type something.
>
> So changing the default value of ``TeX-run-command´´ to ``TeX-run- 
> interactive´´ might give this desired behaviour. Since the options  
> are not documented I'll make a bug report on this!

A better way to define an xelatex command appears to be with
'TeX-run-TeX':

INS DEL Name: XeLateX
            Command: xelatex "%(mode)\input{%t}"
            How: Value Menu TeX-run-TeX
            Create a process for NAME using COMMAND to format FILE with TeX.
            Prompt: Toggle  off (nil)
            Modes: Value Menu All
            Menu elements:
            INS

Interaction works, toggling (C-c C-t C-i) works, modeline process
reporting works, and most importantly, error parsing works (which it
doesn't with ...run-command and ...run-interactive).

An even better way, as I suggested early in this thread, is to define
xelatex as a latex command style.

INS DEL Regexp: \`fontspec\'
            Style: xelatex
INS DEL Regexp: 
            Style: %(PDF)%(latex) %S%(PDFout)
INS
   State: SAVED and set.

Everything seems to work, including file parsing. Note that if you do
it this way, auctex will tell you that it is running latex.

> Alas, switching TeX-interactive-mode on, did not let me send any  
> input in GNU Emacs 23.0.0 and in Emacs.app, based on the same code –  
> it worked in GNU Emacs 22.0.93 and in Carbon Emacs (the Japanese  
> Package) ... (a second bug report! 

I'm using emacs 23.0.0 (unicode2).

My impression is that interactive mode (C-c C-t C-i) is about buffer
management rather than actually switching the interactivity of an
output buffer.

> This day is hourly getting better!) But: when I used the function
> send-invisible (the only completion of send), the x I entered in
> mini-buffer was sent and XeLaTeX exited. Another method to send any
> input does not seem to be documented ... (a third bug report?)

send-invisible is a comint mode function, for any process buffer,
rather than an ordinary (auctex) user function.

--
Martin


More information about the XeTeX mailing list