emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Fabrice Popineau <fabrice.popineau@supelec.fr>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Export / LaTeX / suggestion
Date: Tue, 07 May 2013 17:16:30 -0400	[thread overview]
Message-ID: <87wqrapk29.fsf@gmail.com> (raw)
In-Reply-To: <CAFgFV9Oyhu3RQZ53pNBL73vC82TARQ3_nKssyQ_XpLvkbQP7aQ@mail.gmail.com>

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	other threads:[~2013-05-07 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 19:42 Export / LaTeX / suggestion Fabrice Popineau
2013-05-07 21:16 ` Aaron Ecay [this message]
2013-05-07 21:34   ` Fabrice Popineau

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=87wqrapk29.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fabrice.popineau@supelec.fr \
    /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).