emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Special blocks with options in LaTeX export


From: Rasmus
Subject: Re: [O] Special blocks with options in LaTeX export
Date: Thu, 30 Jul 2015 12:09:18 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Sebastien Vauban <address@hidden>
writes:

> Rasmus <address@hidden> writes:
>> Suvayu Ali <address@hidden> 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 via email to

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