emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: hlines in babel output
Date: Sat, 23 Feb 2013 14:38:13 -0700	[thread overview]
Message-ID: <87d2vqzp6i.fsf@gmail.com> (raw)
In-Reply-To: <871uc667xa.fsf@pank.eu> (rasmus@gmx.us's message of "Sat, 23 Feb 2013 22:23:45 +0100")

Rasmus <rasmus@gmx.us> writes:

>> I have the following Org document where I would like to add some extra
>> hlines to the output.  I'm using babel.  I tried the ascii package but
>> couldn't find anything giving me extra hlines.  I'd also prefer to
>> stick to just babel. 
>
> I'm still looking for a good way to insert horizontal lines into
> generated tables.  I have been trying to use Emacs Lisp to use
> org-table-insert-hline using (i) babel and (ii) noweb.  For (i) I need
> to add an hline object as the second-to-last object, but I havne't
> been successful so far.
>
> I'd appreciate any hints.
>

First be sure to read the relevant page of the manual [1].  After that,
something like the following should allow for arbitrary hline insertion.

#+name: test
#+begin_src sh
  seq 10
#+end_src

#+begin_src emacs-lisp :var x=test
  (append (subseq x 0 2) (list 'hline) (subseq x 2))
#+end_src

#+RESULTS:
|  1 |
|  2 |
|----|
|  3 |
|  4 |
|  5 |
|  6 |
|  7 |
|  8 |
|  9 |
| 10 |

Hope this helps,

Footnotes: 
[1]  http://orgmode.org/manual/hlines.html

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

      reply	other threads:[~2013-02-23 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11  1:34 hlines in babel output Rasmus
2013-02-23 21:23 ` Rasmus
2013-02-23 21:38   ` Eric Schulte [this message]

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=87d2vqzp6i.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /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).