> -----Original Message----- > From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode- > bounces+mlt=gmx...@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