auctex
[Top][All Lists]
Advanced

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

[AUCTeX] \begin{document} in verbatim env.


From: Joost Kremers
Subject: [AUCTeX] \begin{document} in verbatim env.
Date: Sun, 3 Jun 2007 14:24:00 +0200
User-agent: Mutt/1.5.12-2006-07-14

Hi all,

I'm working on a document in which I with to cite an Elisp function that
produces a small LaTeX file based on some input. This function essentially
opens a temp buffer, writes the LaTeX code in it, and then saves it. Part
of the LaTeX code it writes is (obviously) a "\begin{document}"
statement. And this confuses preview-latex. When I do C-c C-p C-b to
preview the entire buffer, Emacs reports "error in process sentinel: LaTeX
found no preview images".

Since the function is in a verbatim environment, it's not possible to do
something like \begin{docu{}ment}, which would otherwise yield the correct
output without confusing preview. For now, I wrote \begin{documen} instead
of \begin{document}, but I'll need to change that for the final version, so
if anyone knows of a better work-around, please let me know.[1]

In general, however, wouldn't it be better to just ignore the contents of
verbatim environments altogether?

Joost



Footnotes: 
[1] Of course, it would be trivial to change the Elisp code so that it does
not contain the string "\\begin{document}", e.g. I could write (insert
"\\begin" "{document}"), but it would not be obvious to the reader why I
did that.

-- 
Joost Kremers, PhD
University of Cologne
Institute for German Language and Literature
Albertus Magnus Platz
50923 Cologne, Germany
Tel. +49 221 / 4703807




reply via email to

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