* feature request: exporting TBLFM line, formatted or not
@ 2016-04-11 12:50 Eric S Fraga
2016-04-11 13:22 ` Nick Dokos
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Eric S Fraga @ 2016-04-11 12:50 UTC (permalink / raw)
To: Emacs Org mode mailing list
Hello,
For pedagogical reasons, it would be nice to be able, in some case, to
export a table (to LaTeX typically) with annotations (i.e. column and
row labels) and, more importantly, the equations used to populate the
table. Is this possible somehow?
Obviously, for the row/column labelling, I could simply add an extra
column and row with those labels...
For the TBLFM aspect, thinking aloud but with no real knowledge, would
it be possible to create a filter, say, that maybe copies and transforms
a TBLFM line before being thrown away by the export engine?
Any suggestions welcome.
thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature request: exporting TBLFM line, formatted or not
2016-04-11 12:50 feature request: exporting TBLFM line, formatted or not Eric S Fraga
@ 2016-04-11 13:22 ` Nick Dokos
[not found] ` <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2016-04-11 13:22 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Hello,
>
> For pedagogical reasons, it would be nice to be able, in some case, to
> export a table (to LaTeX typically) with annotations (i.e. column and
> row labels) and, more importantly, the equations used to populate the
> table. Is this possible somehow?
>
> Obviously, for the row/column labelling, I could simply add an extra
> column and row with those labels...
>
> For the TBLFM aspect, thinking aloud but with no real knowledge, would
> it be possible to create a filter, say, that maybe copies and transforms
> a TBLFM line before being thrown away by the export engine?
>
> Any suggestions welcome.
>
Bastien's table formulas tutorial does it this way:
--8<---------------cut here---------------start------------->8---
* Column formulas and field formulas
Ok, so now we have this table:
: | Student | Maths | Physics | Mean |
: |----------+-------+---------+------|
: | Bertrand | 13 | 09 | 11 |
: | Henri | 15 | 14 | |
: | Arnold | 17 | 13 | |
: #+TBLFM: @2$4=vmean($2..$3)
--8<---------------cut here---------------end--------------->8---
Will that work for you?
--
Nick
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
* Re: feature request: exporting TBLFM line, formatted or not
[not found] ` <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-04-11 13:40 ` Eric S Fraga
2016-04-11 14:20 ` Eric S Fraga
1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2016-04-11 13:40 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
On Monday, 11 Apr 2016 at 13:22, Nick Dokos wrote:
> Bastien's table formulas tutorial does it this way:
>
> * Column formulas and field formulas
>
> Ok, so now we have this table:
>
> : | Student | Maths | Physics | Mean |
> : |----------+-------+---------+------|
> : | Bertrand | 13 | 09 | 11 |
> : | Henri | 15 | 14 | |
> : | Arnold | 17 | 13 | |
> : #+TBLFM: @2$4=vmean($2..$3)
>
> Will that work for you?
It would but what I would really like is to have an option I can turn on
to enable me to process the TBLFM line for output but have the table
appear as normal. I don't want to have the table in verbatim.
What I was thinking of is to have essentially a caption below the table
that presents the equations used.
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature request: exporting TBLFM line, formatted or not
[not found] ` <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-11 13:40 ` Eric S Fraga
@ 2016-04-11 14:20 ` Eric S Fraga
1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2016-04-11 14:20 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Okay, a start on this using hooks:
#+begin_src emacs-lisp
(defun esf/process-table-tblfm (backend)
"Process the TBLFM line to make it available for export as a verbatim block"
(while (re-search-forward "^ *#\\+TBLFM:" (point-max) t)
(replace-match ":")
(let ((start (point))
(end (progn (forward-line) (point))))
(goto-char start)
(while (re-search-forward "::" end t)
(replace-match "\n: ")))
)
)
(add-hook 'org-export-before-parsing-hook 'esf/process-table-tblfm)
#+end_src
I'm sure there's a much easier way to do this but, for now, this does
what I need.
thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: feature request: exporting TBLFM line, formatted or not
2016-04-11 12:50 feature request: exporting TBLFM line, formatted or not Eric S Fraga
2016-04-11 13:22 ` Nick Dokos
[not found] ` <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-04-12 20:15 ` Nicolas Goaziou
[not found] ` <a16c6224a33449c684b11fa4eebdac42@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
3 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2016-04-12 20:15 UTC (permalink / raw)
To: Emacs Org mode mailing list
Hello,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> For pedagogical reasons, it would be nice to be able, in some case, to
> export a table (to LaTeX typically) with annotations (i.e. column and
> row labels) and, more importantly, the equations used to populate the
> table. Is this possible somehow?
>
> Obviously, for the row/column labelling, I could simply add an extra
> column and row with those labels...
>
> For the TBLFM aspect, thinking aloud but with no real knowledge, would
> it be possible to create a filter, say, that maybe copies and transforms
> a TBLFM line before being thrown away by the export engine?
You can write a custom back-end. All the TBLFM information is stored in
the table element.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <a16c6224a33449c684b11fa4eebdac42@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>]
end of thread, other threads:[~2016-04-13 7:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 12:50 feature request: exporting TBLFM line, formatted or not Eric S Fraga
2016-04-11 13:22 ` Nick Dokos
[not found] ` <1bbb803c2d1d4ae391de2caff17ebb62@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-11 13:40 ` Eric S Fraga
2016-04-11 14:20 ` Eric S Fraga
2016-04-12 20:15 ` Nicolas Goaziou
[not found] ` <a16c6224a33449c684b11fa4eebdac42@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-13 7:30 ` Eric S Fraga
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).