auctex-devel
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
[AUCTeX-devel] [PATCH] New function to align tables
From
:
Damien Cassou
Subject
:
[AUCTeX-devel] [PATCH] New function to align tables
Date
:
Thu, 25 Aug 2011 17:57:04 +0200
Hi,
I've just created a function that align the '&' in a Latex table. This makes them much easier to read and change.
(defun LaTeX-align-table ()
(interactive)
(save-excursion
(LaTeX-mark-environment)
(align-regexp (region-beginning) (region-end) "\\(\\s-*\\)&" 1 1 t)))
Calling this function within the following environment:
address@hidden@{}}
\toprule
& Foo & Something different & Bar \\
\midrule
Yeah & 69 & 60 & 402 \\
Another yeah & 742 & 848 (x 3.2) & 3820 \\
\bottomrule
\end{tabular}
Results in the following:
address@hidden@{}}
\toprule
& Foo & Something different & Bar \\
\midrule
Yeah & 69 & 60 & 402 \\
Another yeah & 742 & 848 (x 3.2) & 3820 \\
\bottomrule
\end{tabular}
What do you think?
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
[AUCTeX-devel] [PATCH] New function to align tables
,
Damien Cassou
<=
Re: [AUCTeX-devel] [PATCH] New function to align tables
,
Ivan Andrus
,
2011/08/30
Re: [AUCTeX-devel] [PATCH] New function to align tables
,
Damien Cassou
,
2011/08/31
[AUCTeX-devel] align.el (was: [PATCH] New function to align tables)
,
Uwe Brauer
,
2011/08/31
Prev by Date:
[AUCTeX-devel] off topic: split file into several files using csplit
Next by Date:
Re: [AUCTeX-devel] [PATCH] New function to align tables
Previous by thread:
[AUCTeX-devel] off topic: split file into several files using csplit
Next by thread:
Re: [AUCTeX-devel] [PATCH] New function to align tables
Index(es):
Date
Thread