Andreas Matthias <[EMAIL PROTECTED]> writes:
> David Kastrup wrote:
>
>> Andreas Matthias <[EMAIL PROTECTED]> 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
_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex