emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] hlines in babel output


From: Eric Schulte
Subject: Re: [O] hlines in babel output
Date: Sat, 23 Feb 2013 14:38:13 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Rasmus <address@hidden> 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 via email to

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