emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Orthogonality of blocks


From: Christian Moe
Subject: Re: [O] Orthogonality of blocks
Date: Wed, 28 Dec 2011 00:19:02 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

Oh, right, it gets a bit more complicated if you want better control of the tabulated blocks, i.e. border separation and spacing between the table cells. Then you first need to wrap them in a <div>. You could do that with literal HTML, or (my preference) with org-special-blocks. Use CSS to display the div as a table, and set border separation and spacing on it. Reworked example:

#+title: Side by side code blocks
#+style: <style>.parallel {display: table; border-collapse: separate; border-spacing: 2px 2px;}
#+style: pre.src {display: table-cell}</style>

How to say hello in two languages:

#+begin_parallel

#+name: Perl_hello
#+begin_src perl :results output
  # Perl
  sub say_hello {
      print "Hello, world";
  }

  say_hello;
#+end_src

#+name: Python_hello
#+begin_src python :results output
  # Python
  def say_hello():
      print("Hello, world")

  say_hello()
#+end_src

#+end_parallel



reply via email to

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