[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] Re: previews hiding significant information
From: |
David Kastrup |
Subject: |
Re: [Bug-AUCTeX] Re: previews hiding significant information |
Date: |
Thu, 19 Apr 2007 16:39:02 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) |
Andreas Matthias <address@hidden> writes:
> David Kastrup wrote:
>
>> Andreas Matthias <address@hidden> writes:
>
>>> \documentclass[a4paper]{article}
>>> \usepackage{graphicx,afterpage}
>>> \begin{document}
>>> \afterpage{\includegraphics{hog}}
>>> foo
>>> \cleardoublepage
>>> bar
>>> \end{document}
>>
>> Previews hide the corresponding source code. And \cleardoublepage
>> _is_ the corresponding source code.
>
> Why is \cleardoublepage the corresponding source code? I don't
> understand that.
Because it executes the macro.
>> You can use
>> \PreviewCommand*\afterpage
>>
>> in order to deactivate \afterpage for the purpose of previewing.
>
> I guess this should be \PreviewMacro?
Yes.
> Btw, in the dtx there's still a reference to \cmd{\PreviewCommand}.
I'll try to remember until I am back at home.
> But why does adding \PreviewMacro*\afterpage just work if
> \usepackage[active,graphics]{preview} is added as well? Letting
> emacs insert the \usepackage command does not work.
Emacs uses \AtBeginDocument, the style is loaded too late.
Try
\AtBeginDocument{\ifx\ifPreview\undefined \else
\PreviewMacro*\afterpage \fi}
in the preamble, or read the docs about how to do it in a separate file.
--
David Kastrup