[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Some hints for editing tables
From: |
Joost Kremers |
Subject: |
Re: [AUCTeX] Some hints for editing tables |
Date: |
Mon, 16 Nov 2015 23:21:29 +0100 |
>
> Op 15 nov. 2015 om 18:55 heeft Mosè Giordano <address@hidden> het volgende
> geschreven:
>
> Dear all,
>
> as you all know, editing tables in LaTeX can be quite tedious.
> Luckily in AUCTeX we got a couple of nice features, auto insertion of
> the appropriate &s and a good indentation function in tabular-like
> environments, but there is still much room for improvements.[1]
[...]
> Note
> [1] Suggestions welcome.
Well, IMHO this is one area where Emacs shines, but you need a bit more than
just AUCTeX. Using orgmode and preview-latex, there is a solution that is
better than anything I've ever seen. This is what I do:
- include in the preamble of my documents the following snippet:
```
\usepackage{comment}
\specialcomment{orgtbl}{}{}
\excludecomment{orgtbl}
```
- customise `orgtbl-radio-table-templates`, so that the LaTeX table is inside
an orgtbl environment.
- customise `LaTeX-comment-env-list` and `LaTeX-verbatim-environments` to
include `orgtbl`.
- customise `TeX-fold-env-list` to fold the orgtbl environment to "[orgtbl]".
(Actually, there's no need to set up a special comment environment. I do it so
I can easily distinguish between folded comments and folded org tables.)
- activate `orgtbl-mode` in my LaTeX buffer.
- issue the command `M-x orgtbl-insert-radio-table` where I want my table to
be. This inserts an org-mode table template inside an orgtbl environment, plus
a receiving location for the LaTeX table right above it.
- edit my table with the full orgmode table editor right inside my LaTeX buffer.
- press C-c C-c when I'm done with the table. This converts the table to LaTeX
format and puts the result in the LaTeX buffer at the specified location.
- press C-c C-o C-b to fold the orgtbl environment.
- move the cursor to the LaTeX table and press C-c C-p C-p to preview the table.
The results? This:
allows me to edit the table comfortably (moving from cell to cell with TAB,
automatic realignment of columns, quick insertion/deletion of rows and columns
with C-M-<cursor_key>, etc.) and eventually turns into this:
(Yes, in case you noticed, I do indeed use a proportional font in my LaTeX
buffers.)
I think that calls for a big Woohoo! and a big Hail Ye! to all the Emacs
priests who help make this possible (which IMO includes the AUCTeX team). Oh,
and stop staring at the people quietly slipping out the back door. They're just
vi users sneeking to their computers to see whether evil-mode works with AUCTeX.
Ok, I'm going a bit overboard there, but I really think the whole thing is
truly amazing and it deserves a mention in a thread entitled "Some hints for
editing tables". Even if it's not entirely what you were after when you said
suggestions were welcome...
--
Joost Kremers
Life has its moments
- [AUCTeX] Some hints for editing tables, Mosè Giordano, 2015/11/16
- Re: [AUCTeX] Some hints for editing tables,
Joost Kremers <=
- Re: [AUCTeX] Some hints for editing tables, Mosè Giordano, 2015/11/16
- Re: [AUCTeX] Some hints for editing tables, Joost Kremers, 2015/11/17
- Re: [AUCTeX] Some hints for editing tables, Mosè Giordano, 2015/11/18
- Re: [AUCTeX] Some hints for editing tables, jfbu, 2015/11/19
- Re: [AUCTeX] Some hints for editing tables, Marcin Borkowski, 2015/11/19
- Re: [AUCTeX] Some hints for editing tables, jfbu, 2015/11/19
- Re: [AUCTeX] Some hints for editing tables, Marcin Borkowski, 2015/11/19
- Re: [AUCTeX] Some hints for editing tables, jfbu, 2015/11/19
- Re: [AUCTeX] Some hints for editing tables, jfbu, 2015/11/19
- Re: [AUCTeX] Some hints for editing tables, Jorge A. Alfaro-Murillo, 2015/11/19