From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Special blocks with options in LaTeX export Date: Thu, 30 Jul 2015 12:09:18 +0200 Message-ID: <87fv46ot2p.fsf@gmx.us> References: <20150628112350.GC24926@chitra.no-ip.org> <87pp4gnk86.fsf@gmx.us> <868u9yhvvx.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKkmP-0005TF-Cv for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 06:09:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKkmL-0005as-Cb for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 06:09:37 -0400 Received: from plane.gmane.org ([80.91.229.3]:36220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKkmL-0005ad-6V for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 06:09:33 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZKkmI-00072z-0F for emacs-orgmode@gnu.org; Thu, 30 Jul 2015 12:09:30 +0200 Received: from tsn109-201-154-151.dyn.nltelcom.net ([109.201.154.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jul 2015 12:09:29 +0200 Received: from rasmus by tsn109-201-154-151.dyn.nltelcom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jul 2015 12:09:29 +0200 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: emacs-orgmode@gnu.org Sebastien Vauban writes: > Rasmus writes: >> Suvayu Ali 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