[Top][All Lists]
[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
- [O] Orthogonality of blocks, Charles Turner, 2011/12/27
- Re: [O] Orthogonality of blocks, Eric Schulte, 2011/12/27
- Re: [O] Orthogonality of blocks, Christian Moe, 2011/12/27
- Re: [O] Orthogonality of blocks, Nick Dokos, 2011/12/27
- Re: [O] Orthogonality of blocks, Torsten Wagner, 2011/12/27
- Re: [O] Orthogonality of blocks, Jambunathan K, 2011/12/27
- Re: [O] Orthogonality of blocks, Jambunathan K, 2011/12/28
- Re: [O] Orthogonality of blocks, Sebastien Vauban, 2011/12/28
- Re: [O] Orthogonality of blocks, Charles Turner, 2011/12/28
- Re: [O] Orthogonality of blocks, Jambunathan K, 2011/12/29
- [O] Enhancing table cell alignments and commenting columns (was Re: Orthogonality of blocks), Jambunathan K, 2011/12/29
- Re: [O] Enhancing table cell alignments and commenting columns (was Re: Orthogonality of blocks), Jambunathan K, 2011/12/29
- Re: [O] Enhancing table cell alignments and commenting columns (was Re: Orthogonality of blocks), Jambunathan K, 2011/12/29