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: Aditya Mahajan
Subject: Re: [AUCTeX] Newbie questions regarding ConTeXt support.
Date: Mon, 10 Mar 2008 22:06:52 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Tue, 11 Mar 2008, David Kastrup wrote:

Aditya Mahajan <address@hidden> writes:

I am trying emacs + auctex for editing ConTeXt files for the first
time, so I may be wrong in my terminology. I have a few questions:

1. If I open a context file which says

\section {A section title}

then emacs makes the font for the title bigger and colored. However,
ConTeXt has another way for entering sections

\section A section title

That is, the section title is until a \par is encountered (or an
implicit \par in the form of an empty line). Currently, emacs does not
highlight this.

Is this a bug with auctex, or should I report to some other place?

A bug with AUCTeX's ConTeXt mode, certainly.  It is likely that a lot of
other commands should be treated similarly, so fixing this requires
somebody with a good clue of ConTeXt (not necessarily the same person
actually doing the changes, but overseeing them).

I have a good understanding about the user interface of most ConTeXt commands, so I can help with recommending what needs to be changed, and testing. However, first I need to make sure that the benifits are worth the effort (of switching to emacs). I will play around with emacs+auctex, and shout again once/if I decide to switch to it.


2. I noticed that in inline math (things between $...$), if I have
X_t, then the 't' is displayed in the subscript. I like this
feature. However, the same does not happen in display math (things
between \startformula ... \stopformula). Is there a configuration
option for this?

Most likely the same here.

Ok.

3. How do I enable reftex with ConTeXt? I could not find the
instructions in the reftex manual. (I installed emacs+auctex in ubuntu
using apt-get).

Well, take the instructions for LaTeX and replace "LaTeX" with
"ConTeXt".  Whether the results are good I don't know.

I would be really suprised if RefTeX can parse ConTeXt tags as well as it parses LaTeX tags. The trouble is that (from a parser's point of view) there is no way to parse ConTeXt input for tags unless you implement half of the ConTeXt parser inside. For vim, I have a private module, which modifies an internal ConTeXt command to write tags to a ctags file (which vim can read). But this process looses a lot of contextual information. In any case, I will play around with reftex and report back here.

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. 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. How hard will it be convert these pdfs to pngs and insert them in the correct location in the emacs buffer. If you think this scheme may work, I can try to write the ConTeXt code.

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.

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). I will try to download debian unstable deb packages and install them.

Thanks for your input.

Aditya




reply via email to

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