emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Special blocks with options in LaTeX export
Date: Thu, 30 Jul 2015 12:09:18 +0200	[thread overview]
Message-ID: <87fv46ot2p.fsf@gmx.us> (raw)
In-Reply-To: 868u9yhvvx.fsf@example.com

Sebastien Vauban <sva-news@mygooglest.com>
writes:

> Rasmus <rasmus@gmx.us> writes:
>> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
>>> I am trying to export special blocks with options.  But it seems the
>
>>> options part is being ignored completely.  I expect the following:
>>>
>>>   #+begin_aside :options {Combinatorial background}
>>>   It is all random!
>>>   #+end_aside
>>>
>>> to be exported as:
>>>
>>>   \begin{aside}{Combinatorial background}
>>>   It is all random!
>>>   \end{aside}
>>>
>>> However what I get is without the extra argument to the environment.
>>>
>>> Am I missing something, or is this a bug?
>>
>> #+attr_latex: :options test
>>
>> #+begin_aside 
>> random 
>> #+end_aside
>
> I think Suvayu uncovers something interesting: how do we give a "title"
> to such an admonition (note, warning, tip, sidebar, etc.)?
>
> If we want to export our document to multiple backends, we would be
> forced to have:
>
>   #+attr_html: :options {By the way...}
>   #+attr_latex: :options {By the way...}
>   #+attr_odt: :options {By the way...}
>   #+begin_note
>   This is a useful note (with a title).
>   #+end_note

Isn't this too stylized?   Wouldn't it rather be

#+attr_html: :options "title='BTW'"
#+attr_latex: :options {BTW}
#+begin_note
This is a useful note (with a title).
#+end_note

ox-html has not restrictions on attr_html BTW.

> Wouldn't it make more sense to get the title as part of the admonition,
> as Suvayu tried it in his OP?
>
>   #+begin_note :options {By the way...}
>   This is a useful note (with a title).
>   #+end_note

If you have something that should be shared across identically across
backends.  For a title I guess you'd use a caption, right?  A macro would
be a quick way to allow solutions once you know the right mapping between
the option element and backend transforming.

Rasmus

-- 
Dobbelt-A

      reply	other threads:[~2015-07-30 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-28 11:23 Special blocks with options in LaTeX export Suvayu Ali
2015-06-28 11:30 ` Rasmus
2015-06-28 11:41   ` Suvayu Ali
2015-07-30  8:50   ` Sebastien Vauban
2015-07-30 10:09     ` Rasmus [this message]

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=87fv46ot2p.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).