emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export / LaTeX / suggestion


From: Aaron Ecay
Subject: Re: [O] Export / LaTeX / suggestion
Date: Tue, 07 May 2013 17:16:30 -0400
User-agent: Notmuch/0.15.2+43~ge848af8 (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu)

Hi Fabrice,

2013ko maiatzak 7an, Fabrice Popineau-ek idatzi zuen:
> 
> Currently we need to write this :
> 
> #+ATTR_LATEX: :options [title of definition]
> #+begin_definition
> This is a definition.
> #+end_definition
> 
> to get this with the LaTeX exporter :
> 
> \begin{definition}[title of definition]
> This is a definition.
> \end{definition}
> 
> I was wondering if something like this is possible :
> 
> #+begin_definition :options [title of definition]
> This is a definition.
> #+end_definition
> 
> Generally speaking, the rest of the line with #+begin_... could be
> considered as an implicit #+ATTR_HTML for this environment.

I don’t think you want to do that – each backend (latex, html, 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’t handle :options at the moment,
but you can imagine how they might want to do so, which would certainly
not share latex’s syntax.)  The present #+attr_X convention keeps these
separate.

(I’ve got a solution to this that I’ve been using for the past 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’m 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.)

-- 
Aaron Ecay



reply via email to

[Prev in Thread] Current Thread [Next in Thread]