bug-gnu-emacs
[Top][All Lists]
Advanced

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

[Windows] tex-mode: Emacs+ MiKTeX


From: Paolo Martini
Subject: [Windows] tex-mode: Emacs+ MiKTeX
Date: Fri, 15 Oct 2004 18:07:44 +0200
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I found a problem of interoperability between emacs's tex-mode and
MiKTeX's DVI viewer, but i think it's applicable to other applications
called from emacs as well.

1) Set tex-dvi-view-command to "C:\path\to\miktex\bin\yap.exe"
2) Create a .tex file and save it in a path containing spaces (e.g.
C:\Documents and Settings\User\Documents\foobar.tex)
3) C-c C-f (TeX File)
4) C-c C-v (TeX View)

the tex-shell tells that emacs is calling something like:
C:\MiKTeX\Main\miktex\bin\yap.exe c:/Documents and
Settings/Paolo/Documenti/Chimica/esp1.dvi&

that is wrong, it should call yap this way:
C:\MiKTeX\Main\miktex\bin\yap.exe "c:\Documents and
Settings\Paolo\Documenti\Chimica\esp1.dvi"&

I made a simple workaround:

(defun tex-send-command (command &optional file background)
~  "Send COMMAND to TeX shell process, substituting optional FILE for *.
Do this in background if optional BACKGROUND is t.  If COMMAND has no *,
FILE will be appended, preceded by a blank, to COMMAND.  If FILE is nil, no
substitution will be made in COMMAND.  COMMAND can be any expression that
evaluates to a command string.

Return the process in which TeX is running."
~  (when file
~    (setf file (shell-quote-argument  (substitute ?\\ ?/ file))))
~  ..snip..

It's incomplete, but it works on my system, maybe it would be ok to have
an auto-quoting tex-send-command function that understands how to di it
by itself, but i don't know elisp and i cannot do it and propose.

Regards, Paolo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBb/XQhW78UdvgTikRApe8AJwNyDjapcJvo0Y8JXMy2/RYozAUjwCfXTdz
rd9UYoaHGqcm78MpaeHyMrQ=
=qn/e
-----END PGP SIGNATURE-----
--------------------------------------------------------------------
L'utente che ti ha inviato questa email ha a disposizione:

Spazio illimitato, Webmail, accesso Imap, Pop3 e Smtp, 4 differenti domini email, protezione antispam e filtro mime, dimensione massima allegati 200mb.
Tutto totalmente gratuito, la tua email ha queste funzionalità ?
Puoi registrarti all'indirizzo: http://www.nectarine.it

Questo messaggio pubblicitario viene aggiunto in maniera automatica, segnalazione abusi: address@hidden
--------------------------------------------------------------------




reply via email to

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