auctex
[Top][All Lists]
Advanced

[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: Tue, 17 Nov 2015 13:18:40 +0100
User-agent: mu4e 0.9.13; emacs 24.5.50.1

Hi Mosè,

On Mo, Nov 16 2015, Mosè Giordano <address@hidden> wrote:
> Thank you!  Indeed I was discussing features entirely AUCTeX-related
> (being this the AUCTeX mailing list ;-), but your experience with
> other Emacs tools that can be used for LaTeX documents is relevant.
>
> I like org, and I used it in the past (nowadays much less), and its
> table features are really impressive.  In particular I love the
> possibility to turn Emacs into a full fledged spreadsheet combining
> org and calc.  Nevertheless, I don't like very much the final LaTeX
> output of org tables (I don't know if it changed lately, but looking
> to your screenshot it doesn't seem to be so), for example the vertical
> bars are questionable, but of course in Emacs you can customize every
> detail and the content of of the table is more important of its aspect
> that can be easily adjusted.

Oh, by default, orgtbl-mode doesn't put bars in the table. I customised
it that way. (Not because I think it looks better, BTW...)

> I must admit that when I was thinking to possible improvements to
> management of tables inside AUCTeX I was really thinking about org:
> moving across cells with TAB and inserting and deleting columns with a
> single key binding are really handy features!  But I'm not sure it's
> worth having those features in AUCTeX, it could be a useless
> duplication of efforts if many users take advantage of org anyway.

Actually, if that sort of table editing would be possible without using
orgtbl-mode, I might be inclined to use it. It would require less
customisation and one could edit the table directly rather than using an
extra comment block.

I don't know if it'd be possbile to tell org's table editing commands to
use & as column separators and \\ as end of row indicatiors. If not, it
might still be possible to take the relevant code, modify it and include
it in AUCTeX.

If you do decide to take on the challenge, here's a few things to take
into consideration:

- I use visual-line-mode in my LaTeX buffers, so anything that works by
  piggybacking on auto-fill-mode won't work for me.

- One clear disadvantage of orgtbl-mode is that its table alignment
  functions aren't aware of folded LaTeX commands. If you have things
  like, \emph or \textsc etc. in the table and they're folded, the
  alignment is messed up. If AUCTeX were to get such table editing
  functionality, it'd be great if it were folding-aware, in that the
  alignment takes the actual visible width of the cell contents into
  account.

- The question is then whether you'd want folding and unfolding to
  realign tables automatically. That seems like a bad idea, because in
  all other respects, folding does not change the actual content of the
  buffer, but there might be users who'd prefer it. (Personally, the
  first thing I do after loading a tex file is to fold the entire
  buffer, so I wouldn't want this.)

Anyway, just a few thoughts. AUCTeX-specific this time. ;-)


-- 
Joost Kremers
Life has its moments



reply via email to

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