auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Newbie questions regarding ConTeXt support.


From: David Kastrup
Subject: Re: [AUCTeX] Newbie questions regarding ConTeXt support.
Date: Tue, 11 Mar 2008 08:15:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Aditya Mahajan <address@hidden> writes:

> On Tue, 11 Mar 2008, David Kastrup wrote:
>
>> Aditya Mahajan <address@hidden> writes:
>
>>> 4. What I really like about auctex is the functionality of
>>> preview-latex. What is needed to support preview-latex for ConTeXt?
>>>
>>> The last one is pertaining to emacs rather than auctex, but I am sure
>>> that people here will be able to help.
>>
>> The changes in Emacs would be straightforward, I should think.  But
>> adapting preview.sty to ConTeXt requires TeX expertise.
>
> Could you elaborate a bit.

Read preview.pdf.

> Suppose I want to convert \startformula .... \stopformula to an
> image. Assuming all user macros are in the preamble (and not in main
> document), it is straightforward to write the contents of this command
> to a separate tex file, run texexec on it to get a tight pdf (with a
> tight bounding box) containing the formula only.

Read preview.pdf.  There is a lot more involved.  preview.sty picks out
all interesting stuff in a single run, measures it, records the
_baseline_, creates the bounding box in _TeX_ (meaning that display math
is always the same width, for example), does this for _all_ images at
once and does it at lightning speed.

> How hard will it be convert these pdfs to pngs and insert them in the
> correct location in the emacs buffer.

Hard.

> If you think this scheme may work, I can try to write the ConTeXt
> code.

Basically, all LaTeXisms in preview.sty need to be replaced by the
equivalent ConTeXt.  Most stuff is straightforward and could apply
equally well to plain TeX, but not all.

>>> 5. I mainly use vim for editing tex files, prefer to input math as
>>> utf-8 characters (vim does not have anything equivalent to
>>> preview-latex, so this forms a poor man's preview). However, when I
>>> open any file with utf-8 math in emacs, I get an sqare box. How can
>>> I get emacs to display utf-8 characters correctly.
>>
>> Installing proper fonts.
>
> I am using courier 10pt (Shift left-click -> courier -> 10). The same
> font displays utf correctly on the terminal and gvim.

With utf-8 math?  I doubt it.

>>> Emacs  : GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.7)
>>>  of 2008-02-08 on crested, modified by Ubuntu
>>> Package: 11.83
>>
>> 11.83?  Strangely old.  Not that it would matter for the problems you
>> reported IIRC.
>>
>>> current state:
>>> ==============
>>> (setq
>>>  AUCTeX-date "2006-06-07"
>>
>> Almost two years.
>
> Sigh, I am using the development branch of ubuntu (hardy alpha 6).

Kick them.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]