From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Subject: Multiple entries of the same table in TOC when using longtable env + #+MACRO limitations Date: Fri, 26 Sep 2014 13:43:52 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d044282ac441aed0503fb78e7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXZZR-0004Oi-7c for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 13:44:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXZZP-00060t-V9 for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 13:44:41 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:60306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXZZP-0005zc-9M for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 13:44:39 -0400 Received: by mail-we0-f174.google.com with SMTP id w62so9547513wes.33 for ; Fri, 26 Sep 2014 10:44:33 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --f46d044282ac441aed0503fb78e7 Content-Type: text/plain; charset=ISO-8859-1 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 --f46d044282ac441aed0503fb78e7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi all,

I have explained this issue in d= etail in this stackexchange question:=A0http://emacs.s= tackexchange.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 makin= g that solution workable without having to request this feature from the or= g-mode team, I faced some org-mode macro limitations.

Unable to ha= ve nested macro replacement. The below is not possible.

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

Unable to use macros in=A0#+NAME:. The below is not poss= ible.

#+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 exp= and to:

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

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

<= br>

--
K= aushal Modi
--f46d044282ac441aed0503fb78e7--