Christian Moe <m...@christianmoe.com> writes: > On 12/27/11 9:37 PM, Eric Schulte wrote: >> Charles Turner<chtu...@gmail.com> writes: >> >>> Problem: I have two code blocks (#+BEGIN_SRC .. #+END) and I want to >>> display them side by side on the page, perhaps within an org table. > (...) >> Note that what you describe is likely possible using the existing >> exporter and writing some custom CSS to control how the serial content >> is displayed on the page. The "display" css style would be relevant >> here. > > Yes, > > pre.src {display: table-cell;} > > will do it in HTML. Full example follows below. I'll leave LaTeX to > those in the know... >
Wow, Thanks for sharing this example. I had no idea side-by-side block export could be so easily done. Best, > > hth, > Christian > > --- > > #+title: Side by side code blocks > #+style: <style>pre.src {display: table-cell;}</style> > > How to say hello in two languages: > > #+begin_src perl :results output > # Perl > sub say_hello { > print "Hello, world"; > } > > say_hello; > #+end_src > #+begin_src python :results output > # Python > def say_hello(): > print("Hello, world") > > say_hello() > #+end_src -- Eric Schulte http://cs.unm.edu/~eschulte/