From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Orthogonality of blocks Date: Tue, 27 Dec 2011 14:10:26 -0700 Message-ID: <87boqt3em5.fsf@gmx.com> References: <4EFA208B.6040905@gmail.com> <87zkedkaz5.fsf@gmx.com> <4EFA34C0.3000200@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfeM7-00082C-Oh for emacs-orgmode@gnu.org; Tue, 27 Dec 2011 16:14:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RfeM6-00032m-3C for emacs-orgmode@gnu.org; Tue, 27 Dec 2011 16:14:43 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:60259 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RfeM5-00032Y-MN for emacs-orgmode@gnu.org; Tue, 27 Dec 2011 16:14:42 -0500 In-Reply-To: <4EFA34C0.3000200@christianmoe.com> (Christian Moe's message of "Tue, 27 Dec 2011 22:12:32 +0100") 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: mail@christianmoe.com Cc: emacs-orgmode@gnu.org, Charles Turner Christian Moe writes: > On 12/27/11 9:37 PM, Eric Schulte wrote: >> Charles Turner 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: > > 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/