emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Orthogonality of blocks


From: Eric Schulte
Subject: Re: [O] Orthogonality of blocks
Date: Tue, 27 Dec 2011 14:10:26 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Christian Moe <address@hidden> writes:

> On 12/27/11 9:37 PM, Eric Schulte wrote:
>> Charles Turner<address@hidden>  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/



reply via email to

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