From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mikhail Titov" Subject: Re: [beamer] What is the easiest way to inject latex code between block environments? Date: Wed, 18 Apr 2012 20:19:30 -0500 Message-ID: <004301cd1dca$79505700$6bf10500$@us> References: <005701cd1cff$d53486c0$7f9d9440$@us> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKg27-0005BG-D7 for emacs-orgmode@gnu.org; Wed, 18 Apr 2012 21:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKg22-0000fz-V6 for emacs-orgmode@gnu.org; Wed, 18 Apr 2012 21:19:38 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:51661) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SKg22-0000fu-Ow for emacs-orgmode@gnu.org; Wed, 18 Apr 2012 21:19:34 -0400 In-Reply-To: Content-Language: en-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: 'John Hendy' Cc: emacs-orgmode@gnu.org > -----Original Message----- > From: emacs-orgmode-bounces+mlt=gmx.us@gnu.org [mailto:emacs-orgmode- > bounces+mlt=gmx.us@gnu.org] On Behalf Of Mikhail Titov > Sent: Tuesday, April 17, 2012 11:46 PM > To: John Hendy > Cc: emacs-orgmode@gnu.org > Subject: Re: [O] [beamer] What is the easiest way to inject latex code between > block environments? > > >>> I would like to explicitly define heights for columns that contain blocks > to be able to use \vfill [1] in-between blocks. And here comes the problem. I > kind of need to inject Here is the dirty hack if someone else is also making posters with orgmode & beamerposter. Unfortunately I know AWK better than elisp so don't condemn me :-) It does a perfect job for me. I don't know if can be hooked to pipe through before writing TeX output. ----8<---------------------------------------------------------------------- ------------------->8--------- #!/usr/bin/awk -f # Post-process orgmode output before final call to pdflatex while using beamerposter BEGIN { end_block = 0 # 1 if previous line was \end{block} columns = 0 # 1 if probably \vbox will be needed, 2 if it is needed RS = "\r\n" # I'm on Windows height = ".98\\textheight" # FIXME } /^\\frametitle{.+}$/ { next} # frametitle removal from the only frame /^\\begin{columns}/ { columns = 1 } /^\\begin{column}/ && columns { columns = 2 } /^%% .+/ && columns == 2 { print "\\vbox to " height " {%"; columns = 0 } # we rely on orgmode comments :( /^\\end{block}$/ { end_block = 1 } /^\\begin{block}/ && end_block { print "\\vfill"; end_block = 0 } /^\\end{column}$/ && end_block { print "}%"; columns = 1; end_block = 0 } { print } ----8<---------------------------------------------------------------------- ------------------->8--------- Mikhail