From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Custom column environment in beamer export Date: Tue, 16 Jun 2015 11:42:34 +0200 Message-ID: <20150616094234.GB12806@chitra.no-ip.org> References: <20150615220046.GA6595@chitra.no-ip.org> <87ioaovc3y.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4nOD-0002pq-0m for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 05:42:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4nOA-0008VK-OQ for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 05:42:40 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:36578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4nOA-0008VA-HI for emacs-orgmode@gnu.org; Tue, 16 Jun 2015 05:42:38 -0400 Received: by wigg3 with SMTP id g3so103152383wig.1 for ; Tue, 16 Jun 2015 02:42:37 -0700 (PDT) Received: from chitra.no-ip.org ([2001:610:120:3001:2ad2:44ff:fe4a:b029]) by mx.google.com with ESMTPSA id n3sm20492816wix.1.2015.06.16.02.42.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 02:42:36 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87ioaovc3y.fsf@gmx.us> 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 On Tue, Jun 16, 2015 at 12:30:09AM +0200, Rasmus wrote: > Suvayu Ali writes: > > > * Fitting technique :B_minipage: > > :PROPERTIES: > > :BEAMER_env: minipage > > :BEAMER_arg: 0.1\linewidth > > :END: > > +/cFit/+ > > The closest would probably be something like > > (add-to-list 'org-beamer-environments-extra > '("minipage" > "m" > "\\begin{minipage}%o%a\n\\structure{%h}" > "\\end{minipage}")) > > Which would afford you something like > > * slide > ** Fitting technique :B_minipage: > :PROPERTIES: > :BEAMER_env: minipage > :BEAMER_OPT: [t]{0.1\linewidth} > :BEAMER_ACT: <5> > :END: > /cFit/ Well, I would rather keep the formatting in the org file, so no \structure in the template. But otherwise your suggestion seems exactly what I need :). > Unfortunately, BEAMER_OPTs are wrapped in square brackets thanks to > org-beamer--normalize-argument, so the above won't actually work (see > org-beamer--format-block). From the looks of it I'd be willing to call it > a bug, but Nicolas may have had something in mind. I was thinking the same. That's why I felt the need for the old BEAMER_arg property! > Perhaps these days it would be nice to allow the third element of > org-beamer-environments-extra to be a λ taking either the object or so. > Then again, perhaps this is an overkill and too low-level. This might be nice, but as you say could be overkill. Although, there are a few other cases which is harder to use with the current syntax. Take minipage as an example, it takes 3 optional arguments[1]. Presently there is no way of dealing with something like that. Removing the autowrapping of brackets would allow such cases, but it would probably break a few Org files in the wild. From that perspective, a lambda might be the way to go. > Personally, I'd use a block, e.g. > > #+attr_latex: :options [t]{.1\textwidth} > #+begin_minipage > Cfit > #+end_minipage Nice idea. I have never really explored using blocks (other than for raw latex), maybe I should ... Thanks, Footnotes: [1] https://en.wikibooks.org/wiki/LaTeX/Boxes#minipage_and_parbox -- Suvayu Open source is the future. It sets us free.