emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Jisang Yoo <jisang.yoo.ac@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: How can I write side by side code comparison table
Date: Thu, 11 Jul 2013 16:43:09 +0530	[thread overview]
Message-ID: <87k3kx2vui.fsf@gmail.com> (raw)
In-Reply-To: <CADtzDwb4ikpRWw-WepvFxZizODs28NSZGzoXKdAkJmAXhvFSDw@mail.gmail.com> (Jisang Yoo's message of "Thu, 11 Jul 2013 07:00:18 +0900")

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Jisang Yoo <jisang.yoo.ac@gmail.com> writes:

> I can write a table:
>
> | Python | Emacs Lisp |
> |--------+------------|
> |        |            |
>
> and I can write two source code blocks:
>
> #+BEGIN_SRC python
>   a = [0, 1, 2]
>   a[0] += 10
> #+END_SRC
> #+BEGIN_SRC elisp
>   (setq a (vector 0 1 2))
>   (cl-incf (elt a 0) 10)
> #+END_SRC
>
> but I don't know how to combine the two-column table with the two
> source code blocks in a way that exports to code tables like in
> Emergency Elisp

The ODT exporter - I believe it is *the only* exporter - that has
something called list tables.  See attachments.  You can make a special
request to turn it on for other exporters.

As far as HTML export is concerned there are some special CSS tricks
that you can use.  Search for posts by Christian Moe and look for the
keywords "side-by-side", "list table" or something like that.  You will
see atleast 3-5 threads where this question has popped up.


[-- Attachment #2: list-table.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 10162 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: list-table.org --]
[-- Type: text/x-org, Size: 214 bytes --]

#+attr_odt: :list-table t
- Python
  - Elisp
- 
  #+BEGIN_SRC python
    a = [0, 1, 2]
    a[0] += 10
  #+END_SRC
  - 
    #+BEGIN_SRC elisp
      (setq a (vector 0 1 2))
      (cl-incf (elt a 0) 10)
    #+END_SRC

  reply	other threads:[~2013-07-11 11:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 22:00 How can I write side by side code comparison table Jisang Yoo
2013-07-11 11:13 ` Jambunathan K [this message]
2013-07-11 18:17 ` Rick Frankel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3kx2vui.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jisang.yoo.ac@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).