David Kastrup wrote:
> 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.
Oh, \clearpage ejects \afterpage as well. I wasn't aware of that.
>> 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.
Ok. I think I should have grasped that myself.
I'll have a rest.
Thanks for the help.
Ciao
Andreas
_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex