emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal <kaushal.modi@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Multiple entries of the same table in TOC when using longtable env + #+MACRO limitations
Date: Fri, 26 Sep 2014 13:43:52 -0400	[thread overview]
Message-ID: <CAFyQvY3LOjv4vFhin7TNar5vv-NhRrSEFsHD0vuDdYuKXZedOw@mail.gmail.com> (raw)

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

Hi all,

I have explained this issue in detail in this stackexchange question:
http://emacs.stackexchange.com/questions/314/toc-of-tables-for-org-mode-long-tables

I found a sort of workable solution but it is not very practical.

In the process of making that solution workable without having to request
this feature from the org-mode team, I faced some org-mode macro
limitations.

*Unable to have nested macro replacement. The below is not possible.*

#+MACRO: LT_REF     ref_longtable
#+MACRO: LT_TITLE   This is a long table
#+MACRO: LT_HEADER1 Header 1
#+MACRO: LT_HEADER2 Header 2
{{{LT_HEADER({{{LT_REF}}}, {{{LT_TITLE}}}, {{{LT_HEADER1}}},
{{{LT_HEADER2}}})}}}

*Unable to use macros in #+NAME:. The below is not possible.*

#+NAME: {{{LT_REF}}}


We also can't have a MACRO that can expand to multi-line org-mode "#+"
syntax lines.

Example: I couldn'd find a way by which {{{SOME_MACRO}}} can expand to:

----
    #+ATTR_LaTeX: :environment longtable
    {{{LT_HEADER(ref_longtable, This is a long table, Header 1, Header 2)}}}
    #+NAME: ref_longtable
----

What can be the best solution to get the longtables working with just one
TOC entry per table?
Can the org-mode macros code be improved to support the above use cases?



--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 7275 bytes --]

                 reply	other threads:[~2014-09-26 17:44 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=CAFyQvY3LOjv4vFhin7TNar5vv-NhRrSEFsHD0vuDdYuKXZedOw@mail.gmail.com \
    --to=kaushal.modi@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).