[OS X Emacs] Re: Can't Make Doc-View Work
Peter Dyballa
Peter_Dyballa at Web.DE
Sun Mar 21 12:03:44 EDT 2010
Am 12.03.2010 um 09:05 schrieb Axel E. Retif:
> I still have to make it work, but I'm not giving up.
In the meantime you could try this hack:
(defun split-for-tikz2pdf ()
(interactive)
(TeX-run-style-hooks "tikz")
(TeX-run-style-hooks "tkz-berge")
(compile (format "tikz2pdf -v %S \n" buffer-file-name))
(sit-for 4) ;; adjust the number of seconds the compilation
finishes before PDF file is loaded
(other-window 1)
(split-window-vertically 15)
(find-file "tikz2pdf_temp.pdf")
(auto-revert-mode 1)
(doc-view-mode)
)
The sit-for function is the "clue" – it lets Emacs wait for the given
amount of seconds. The value can be different, depending on the
processor, the file system, the job to perform, other CPU usage. It
might fail when the system has more than one processor...
The proper solution would be to use some call-process* function. I am
not yet understanding why it always fails for me.
BTW, I have a small init file for TeX related experiments (setting up
AUCTeX particularly plus some convenience). I launch Emacs from the
command line like:
.../Emacs -T 'TeX Live 2009' -geometry 92x50+375+25 -q -l ~/.emacs-
TeXLive.el --no-desktop --debug-init ..../PGF-file.tex -f split-for-
tikz2pdf
The split-for-tikz2pdf function is in ~/.emacs-TeXLive.el.
--
Greetings
Pete
Isn't vi that text editor with two modes... one that beeps and one
that corrupts your file?
– Dan Jacobson, on comp.os.linux.advocacy
More information about the MacOSX-Emacs
mailing list