* org-mode table alignment options (siunitx S-column)
@ 2016-02-15 0:27 Michael Giepen
2016-02-16 16:58 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Michael Giepen @ 2016-02-15 0:27 UTC (permalink / raw)
To: emacs-orgmode
I would like to align the decimals of the values in the following table
with siunitx "S column".
################################################
#+LATEX_HEADER: \usepackage{siunitx}
#+CAPTION: My caption
#+ATTR_LATEX: :align lS
| Column | Value |
| A | 2234.2 |
| B | 243.2345 |
| C | 2.03 |
| D | 4.0 |
################################################
Like this, no problem.
However, with wider tables you have to put a lot of attributes and the
following implementation would be clearer if it would be more org-mode
like with the attributes inside the table.
#+CAPTION: My caption
#+ATTR_LATEX: :align lS
| Column | Value | Value | Value | Value | Value |
| <l> | <S> | <S> | <S> | <S> | <S> |
| A | 2234.2 | 2234.2 | 2234.2 | 2234.2 | 2234.2 |
| B | 243.2345 | 243.2345 | 243.2345 | 243.2345 | 243.2345 |
| C | 2.03 | 2.03 | 2.03 | 2.03 | 2.03 |
| D | 4.0 | 4.0 | 4.0 | 4.0 | 4.0 |
But only l, c, and r and numbers for width are recognised within < >,
the S not.
Could this be expanded somehow to allow for any letter, or at least to
the ones that make sense?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-mode table alignment options (siunitx S-column)
2016-02-15 0:27 org-mode table alignment options (siunitx S-column) Michael Giepen
@ 2016-02-16 16:58 ` Nicolas Goaziou
2016-02-16 19:55 ` Eric S Fraga
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2016-02-16 16:58 UTC (permalink / raw)
To: Michael Giepen; +Cc: emacs-orgmode
Hello,
Michael Giepen <giepen.m@googlemail.com> writes:
> However, with wider tables you have to put a lot of attributes and the
> following implementation would be clearer if it would be more org-mode
> like with the attributes inside the table.
>
> #+CAPTION: My caption
> #+ATTR_LATEX: :align lS
> | Column | Value | Value | Value | Value | Value |
> | <l> | <S> | <S> | <S> | <S> | <S> |
> | A | 2234.2 | 2234.2 | 2234.2 | 2234.2 | 2234.2 |
> | B | 243.2345 | 243.2345 | 243.2345 | 243.2345 | 243.2345 |
> | C | 2.03 | 2.03 | 2.03 | 2.03 | 2.03 |
> | D | 4.0 | 4.0 | 4.0 | 4.0 | 4.0 |
>
> But only l, c, and r and numbers for width are recognised within < >,
> the S not.
>
> Could this be expanded somehow to allow for any letter, or at least to
> the ones that make sense?
Org implements minimal alignment rules, but it does so across all major
export back-ends. Introducing some new syntax here has at least
2 drawbacks:
1. It requires an implementation in every major back-ends, which may
not be always possible (e.g., in LaTeX, another default package is
required)
2. It may introduce some false positives (e.g., is "| <foo> |" an
alignment cookie or a regular field?).
I think #+ATTR_BACKEND: :align ... goes a long way towards removing
these limitations, at least on the export side.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-mode table alignment options (siunitx S-column)
2016-02-16 16:58 ` Nicolas Goaziou
@ 2016-02-16 19:55 ` Eric S Fraga
0 siblings, 0 replies; 3+ messages in thread
From: Eric S Fraga @ 2016-02-16 19:55 UTC (permalink / raw)
To: Michael Giepen; +Cc: emacs-orgmode
On Tuesday, 16 Feb 2016 at 17:58, Nicolas Goaziou wrote:
[...]
> I think #+ATTR_BACKEND: :align ... goes a long way towards removing
> these limitations, at least on the export side.
I agree.
I have always taken the view that the <x> syntax was for presentation in
org mode, not for export, probably because I mostly use the <NN>
construct to be able to see wide tables in emacs... Given the
capability of specifying :align on export backends, I don't think
there's any need for extending the current syntax.
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.3-601-gff9890
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-16 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 0:27 org-mode table alignment options (siunitx S-column) Michael Giepen
2016-02-16 16:58 ` Nicolas Goaziou
2016-02-16 19:55 ` Eric S Fraga
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.