emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-orgmode@gnu.org
Subject: [parser] feature request: column and row numbers available for table-cell elements
Date: Wed, 18 Jan 2017 21:55:11 +0000	[thread overview]
Message-ID: <87d1fk6nk0.fsf@delle7240.chemeng.ucl.ac.uk> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2066 bytes --]

Hello,

I have been writing a derived backend for LaTeX export which outputs the
formulae used in a table.  This is for teaching purposes where I
currently use an external spreadsheet to illustrate some simple
modelling concepts.  I would prefer to use org (as my slides are
generated by org via beamer) and am able to output a formatted table of
the formulae used in a table.

However, due to various possible hidden rows and columns that do not
appear in the exported table, the row and column references are not
easily usable directly to identify the reference entries in the table.

Would it be possible to extend the table-cell element in the parser to
add :row and :column attributes that have the internal org values, as
used by the formulae?

An example table that I have been using to test my derived backend and
which illustrates the issue is:

#+begin_src org
  |   | Strategy | Average performance |
  |---+----------+---------------------|
  | / |          |                8.69 |
  | / |          |                9.72 |
  | / |          |                9.03 |
  |---+----------+---------------------|
  |   |        1 |                9.15 |
  |---+----------+---------------------|
  | / |          |                9.15 |
  | / |          |                7.60 |
  | / |          |                7.46 |
  |---+----------+---------------------|
  |   |        2 |                8.07 |
  |---+----------+---------------------|
  ,#+TBLFM: @5$3=vmean(@-I..@-II);%.2f::@9$3=vmean(@-I..@-II);%.2f
#+end_src

This table does not export the first column nor any of the rows with /
in the first column.  So, in the exported table, there are only 3 rows
and 2 columns but the formulae refer to, e.g. column 3 and row 9.  I
would like to be able to annotate the output with the org row and column
numbers so need access to these data.

A screenshot of what the derived backend generates currently is attached.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.2-104-gf5b7de

[-- Attachment #1.2: screendump-20170118214644.png --]
[-- Type: image/png, Size: 19319 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

             reply	other threads:[~2017-01-18 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 21:55 Eric S Fraga [this message]
2017-01-19 21:15 ` [parser] feature request: column and row numbers available for table-cell elements Nicolas Goaziou
     [not found] ` <a6c057b982054dc896ad78973aa0d220@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-19 22:18   ` Eric S Fraga
2017-01-20  8:09   ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1fk6nk0.fsf@delle7240.chemeng.ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).