emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* can competing table headers: #+BEGIN #+ORGTBL #+TBLNAME be resolved?
@ 2012-03-16 15:44 Myles English
  0 siblings, 0 replies; only message in thread
From: Myles English @ 2012-03-16 15:44 UTC (permalink / raw)
  To: emacs-orgmode Mode

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]


Hi,

My aim is to have a document that can that can be updated via the
command line batch command.  What prevents this the need to rearrange
the header lines on a table that has multiple uses:

- to capture the columnview, the #+BEGIN line must be the first line
  above the table

- to export to latex, the #+ORGTBL line must be the first line above the
  table

- to name the table so that it may be - referred to in a source blocks,
  the #+TBLNAME line much be the first - one

All three scenarios may be investigated using the table in the attached
file.  It would be nice if the #+ lines did not need to be reordered
before accessing each feature so I am wondering if it would be feasible
to unify these header lines or at least make them ignore any subsequent
lines starting #+ ?

Thanks,

Myles


[-- Attachment #2: test-tbl.org --]
[-- Type: text/plain, Size: 1527 bytes --]

#+STARTUP: indent
#+COLUMNS: %50ITEM %5Effort(Time est. [H:M]){:}
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:nil
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport

* Competition between table header lines
** Introduction
The aim is to have a document that can that can be updated via the command
line batch command.  What prevents this the need to rearrange the header lines
on a table that has multiple uses:

- to capture the columnview, the #+BEGIN line must be the first line above the table
- to export to latex, the #+ORGTBL line must be the first line above the table
- to name the table so that it may be referred to in a source blocks,
  the #+TBLNAME line much be the first one

All three scenarios may be investigated using the table below.  It would be
nice if the #+ lines did not need to be reordered before accessing each
feature.

** Table
:PROPERTIES:
:Effort: 0:30
:END:

#+BEGIN: columnview :hlines 5 :id local
#+TBLNAME: cvtblname
#+ORGTBL: SEND cvtbl orgtbl-to-latex :fmt (1 padStr)
| ITEM     | Time est. [H:M] |
|----------+-----------------|
| ** Table |            0:30 |
#+END:

#+BEGIN_LATEX
\begin{landscape}
% BEGIN RECEIVE ORGTBL cvtbl
\begin{tabular}{lr}
ITEM & Time est. [H:M] \\
\hline
** Table & 0:30 \\
\end{tabular}
% END RECEIVE ORGTBL cvtbl
\end{landscape}
#+END_LATEX

#+NAME: calcblk
#+BEGIN_SRC emacs-lisp :var data=cvtblname[-1,1] :exports none
data
#+END_SRC

#+RESULTS: calcblk
: 0:30

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-16 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 15:44 can competing table headers: #+BEGIN #+ORGTBL #+TBLNAME be resolved? Myles English

Code repositories for project(s) associated with this 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).