emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* TABLES: aesthetics on columns
@ 2011-11-23 11:13 Daniel Martins
  2011-11-23 12:40 ` Suvayu Ali
  2011-11-23 16:25 ` Jonas Hörsch
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Martins @ 2011-11-23 11:13 UTC (permalink / raw)
  To: Michael Brand; +Cc: Gustav Wikström, emacs-orgmode

I have two questions on (possibly) improving aesthetics on columns
when editing org tables.

Following the thread on table editing, I have a minor issue with
editing org-mode for Latex generation (which I do most of the time!).
I have a table with several columns which are e.g. integer numbers and
the headings are single variables such as
a,b,c, M,k etc
it is OK but I want to include sometimes Greek terms and subscripts such as
\lambda or
$\delta_\kappa$
and the columns are not so nice to see and edit due to the different spacings


In Latex I could use \def

\def\ll{$\lambda$}
\def\dk{$\delta_\kappa$}


and the use \ll and \dk on the headings is quite nice (despite the
generally horrendous aspect of Latex tables when compared with the
clean, neat, simple and effective counterpart in org-mode).

So I have the first question:

1) Can I do the same in org-mode i.e. a previous (and possibly local)
definition or long variable befopre putting them in a table?


The other (maybe superfluous) question is

2) Can I locally define a table as completely in math mode?

So I could type e.g.


A)
|---+---+---+---|
|   | M | l | k |
|---+---+---+---|
| M | - |   |   |
| l |   | - |   |
| k |   |   | - |
|---+---+---+---|

Instead of

B)
|-----+-----+-----+-----|
|     | $M$ | $l$ | $k$ |
|-----+-----+-----+-----|
| $M$ | -   |     |     |
| $l$ |     | -   |     |
| $k$ |     |     | -   |
|-----+-----+-----+-----|

and when I export a table like A) to Latex I have the aspect of B) instead?


Daniel

2011/11/22 Michael Brand <michael.ch.brand@gmail.com>
>
> Hi Daniel
>
> On Tue, Nov 22, 2011 at 15:26, Daniel Martins <danielemc@gmail.com> wrote:
> > Thank you very much!!!
> > Just one point
> > In my case at least M-<down> does not insert a new line!
>                      ^^^^^^^^^
>
> Yes, my fault. Corrigendum:
>
> 1) M-S-<down> to add the new row
> 2) mark the region from "t" down to any char from the field below
> 3) M-Ret
>
> Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: TABLES: aesthetics on columns
  2011-11-23 11:13 TABLES: aesthetics on columns Daniel Martins
@ 2011-11-23 12:40 ` Suvayu Ali
  2011-11-23 12:50   ` Daniel Martins
  2011-11-23 16:25 ` Jonas Hörsch
  1 sibling, 1 reply; 4+ messages in thread
From: Suvayu Ali @ 2011-11-23 12:40 UTC (permalink / raw)
  To: Daniel Martins; +Cc: emacs-orgmode

On Wed, 23 Nov 2011 09:13:18 -0200
Daniel Martins <danielemc@gmail.com> wrote:

> 1) Can I do the same in org-mode i.e. a previous (and possibly local)
> definition or long variable befopre putting them in a table?
> 

Try this in the header of the org file:

#+LATEX_HEADER: \def\ll{$\lambda$}

> 
> The other (maybe superfluous) question is
> 
> 2) Can I locally define a table as completely in math mode?

Sorry, I don't think this is possible.

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: TABLES: aesthetics on columns
  2011-11-23 12:40 ` Suvayu Ali
@ 2011-11-23 12:50   ` Daniel Martins
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Martins @ 2011-11-23 12:50 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

Worked perfectly.

Question 2 is a (minor) pity.

Thank you very much.

Daniel

2011/11/23 Suvayu Ali <fatkasuvayu+linux@gmail.com>:
> #+LATEX_HEADER: \def\ll{$\lambda$}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: TABLES: aesthetics on columns
  2011-11-23 11:13 TABLES: aesthetics on columns Daniel Martins
  2011-11-23 12:40 ` Suvayu Ali
@ 2011-11-23 16:25 ` Jonas Hörsch
  1 sibling, 0 replies; 4+ messages in thread
From: Jonas Hörsch @ 2011-11-23 16:25 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Nov 23 2011, Daniel Martins wrote:

> 2) Can I locally define a table as completely in math mode?
>
> So I could type e.g.
>
>
> A)
> |---+---+---+---|
> |   | M | l | k |
> |---+---+---+---|
> | M | - |   |   |
> | l |   | - |   |
> | k |   |   | - |
> |---+---+---+---|
>
> Instead of
>
> B)
> |-----+-----+-----+-----|
> |     | $M$ | $l$ | $k$ |
> |-----+-----+-----+-----|
> | $M$ | -   |     |     |
> | $l$ |     | -   |     |
> | $k$ |     |     | -   |
> |-----+-----+-----+-----|
>
> and when I export a table like A) to Latex I have the aspect of B) instead?

with a header of
#+LATEX_HEADER: \newcolumntype{m}{>{$}l<{$}}
(where you define a new type of column, which always puts a $ to the
beginning and to the end of a cell)

and
#+ATTR_LATEX: align=mmmm   ( <- one m for each column )
directly above your table (this sets the mandatory argument for the
tabular environment, so that the new column type is used for every
column)

should probably do it, if i understand everything correctly.

cheers,
jonas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-23 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 11:13 TABLES: aesthetics on columns Daniel Martins
2011-11-23 12:40 ` Suvayu Ali
2011-11-23 12:50   ` Daniel Martins
2011-11-23 16:25 ` Jonas Hörsch

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).