[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Preview-latex questions
From: |
Ralf Angeli |
Subject: |
Re: [AUCTeX] Preview-latex questions |
Date: |
Wed, 26 May 2010 22:49:37 +0200 |
[Please keep the mailing list copied.]
* Boris Hollas (2010-05-24) writes:
> On Mon, 2010-05-24 at 20:52 +0200, Ralf Angeli wrote:
>> * Boris Hollas (2010-05-22) writes:
>>
>> > I have several questions related to the display of latex commands in the
>> > buffer, in particular in preview-latex mode:
>> >
>> > - I have \newcommand*{\defi}[1] {\emph{#1}}. Is it possible to make
>> > \defi{..} appear in italic or bold in the buffer?
>>
>> preview-latex should render this stuff in italics (in case the typeset
>> output will also be in italics). Or are you referring to font locking?
>
> No, \defi{} is rendered just as normal text.
I cannot reproduce this. If I type `C-c C-p C-d' in a buffer with the
following example file, the "bar" string is shown in italics.
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\newcommand{\defi}[1]{\emph{#1}}
\usepackage[active]{preview}
\PreviewMacro[!]{\defi}
\begin{document}
foo \defi{bar} baz
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---
>> > - I have environments like
>> >
>> > \begin{algorithm}[H]
>> > \If{cond}{
>> > \Goto{$M_i$}
>> > }
>> > \end{algorithm}
>> [...]
>> > that I don't want to appear within the surrounding text, ie not as a
>> > separate figure. Preview-latex doesn't render them correctly. Can this
>> > be fixed?
>> I don't understand this description/question.
>
> The algorithm environment is for algorithms in pseudocode. If I omit the
> [H], the typset is output as in the final document, but not with option
> [H]. I can't omit [H] however because this environment must appear
> exactly where I type it. The same ist true for VCDraw, which is for
> drawing automata, and for pspicture.
If the algorithm does not show up in the typeset document, then
preview-latex will likely also have problems showing it. Or do you mean
that the algorithm is shown in the typeset document but not rendered by
preview-latex?
>> > - Is it possible to outline environments for definition, theorem, proof
>> > to make them more visible in the buffer?
>>
>> What do you mean with "more visible"?
>
> Right now, I see eg a definition-environment as ordinary ASCII in the
> buffer. Can this be shaded, highlighted, or marked with a bar at the
> side?
With preview-latex or with font locking? If it is the latter, you can
customize `font-latex-math-environments' as mentioned in the AUCTeX
manual.
--
Ralf