emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Myles English <mylesenglish@gmail.com>
To: emacs-orgmode Mode <emacs-orgmode@gnu.org>
Subject: can competing table headers: #+BEGIN #+ORGTBL #+TBLNAME be resolved?
Date: Fri, 16 Mar 2012 15:44:20 +0000	[thread overview]
Message-ID: <87ehssv9d7.fsf@gmail.com> (raw)

[-- 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

                 reply	other threads:[~2012-03-16 15:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87ehssv9d7.fsf@gmail.com \
    --to=mylesenglish@gmail.com \
    --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).