[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-AUCTeX] Re: previews hiding significant information
From: |
Andreas Matthias |
Subject: |
[Bug-AUCTeX] Re: previews hiding significant information |
Date: |
Thu, 19 Apr 2007 17:08:13 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) |
David Kastrup wrote:
> 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.
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