From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: Export / LaTeX / suggestion Date: Tue, 07 May 2013 17:16:30 -0400 Message-ID: <87wqrapk29.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZpFR-0005P5-C8 for emacs-orgmode@gnu.org; Tue, 07 May 2013 17:16:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZpFQ-0006iD-7C for emacs-orgmode@gnu.org; Tue, 07 May 2013 17:16:33 -0400 Received: from mail-vc0-f175.google.com ([209.85.220.175]:45897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZpFQ-0006i5-40 for emacs-orgmode@gnu.org; Tue, 07 May 2013 17:16:32 -0400 Received: by mail-vc0-f175.google.com with SMTP id lf10so1017237vcb.20 for ; Tue, 07 May 2013 14:16:31 -0700 (PDT) In-Reply-To: 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: Fabrice Popineau Cc: "emacs-orgmode@gnu.org" Hi Fabrice, 2013ko maiatzak 7an, Fabrice Popineau-ek idatzi zuen: >=20 > Currently we need to write this : >=20 > #+ATTR_LATEX: :options [title of definition] > #+begin_definition > This is a definition. > #+end_definition >=20 > to get this with the LaTeX exporter : >=20 > \begin{definition}[title of definition] > This is a definition. > \end{definition} >=20 > I was wondering if something like this is possible : >=20 > #+begin_definition :options [title of definition] > This is a definition. > #+end_definition >=20 > Generally speaking, the rest of the line with #+begin_... could be > considered as an implicit #+ATTR_HTML for this environment. I don=E2=80=99t think you want to do that =E2=80=93 each backend (latex, ht= ml, etc.) could have its own incompatible keywords. In this case, :options for latex and :options for html (and ascii, etc.) will have different syntax. (html, ascii, etc. export don=E2=80=99t handle :options at the mom= ent, but you can imagine how they might want to do so, which would certainly not share latex=E2=80=99s syntax.) The present #+attr_X convention keeps t= hese separate. (I=E2=80=99ve got a solution to this that I=E2=80=99ve been using for the p= ast several weeks, but it involves several interlocking pieces and is too messy to be shared still. In brief, it comprises extending the parser to handle :keywords on a #+begin_foo line, and extending the exporter backends to allow different types of block (definition, quote, etc.) to be formatted using that information. I=E2=80=99m busy with exams at the moment, but in a week or so I hope to have some free time to work on it, among other org-related projects.) --=20 Aaron Ecay