emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [beamer] What is the easiest way to inject latex code between bl


From: Mikhail Titov
Subject: Re: [O] [beamer] What is the easiest way to inject latex code between block environments?
Date: Wed, 18 Apr 2012 20:19:30 -0500

> -----Original Message-----
> From: address@hidden [mailto:emacs-orgmode-
> address@hidden On Behalf Of Mikhail Titov
> Sent: Tuesday, April 17, 2012 11:46 PM
> To: John Hendy
> Cc: address@hidden
> 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




reply via email to

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