Loris Bennett writes:
> No, the column names are fixed, so that's perfect, thank you. I
> suspected there might be some more straight-forward way than the
> interesting, but slightly more involved methods suggested by Achim and
> Rasmus.
There might be way to do that, but it's not implemented for
And if you are generating this programatically, this works:
#+BEGIN_SRC sh :results raw
(
echo "|a |b |c |d"
echo "|-"
echo "|1 |2 |3 |4"
echo "|5 |6 |7 |8"
)
#+END_SRC
--
Daniel E. Doherty
Eric Schulte writes:
> "Loris Bennett" writes:
>
>> Eric Schulte writes:
>>
>>> "Loris Bennett" writes:
>>>
Dear List,
This
#+BEGIN_SRC sh
echo "a b c d"
echo "1 2 3 4"
echo "5 6 7 8"
#+END_SRC
produces this:
#+RESULTS:
|
"Loris Bennett" writes:
> Eric Schulte writes:
>
>> "Loris Bennett" writes:
>>
>>> Dear List,
>>>
>>> This
>>>
>>> #+BEGIN_SRC sh
>>> echo "a b c d"
>>> echo "1 2 3 4"
>>> echo "5 6 7 8"
>>> #+END_SRC
>>>
>>> produces this:
>>>
>>> #+RESULTS:
>>> | a | b | c | d |
>>> | 1 | 2 | 3 | 4 |
>>>
"Loris Bennett" writes:
> So Achim's suggestion of using ":results raw" might be the way to go
> (once I've worked out what the sed bit is doing ...)
>
> However, the table will ultimately be around 4 lines long,
> so from a performance point of view it would be nice not to have to pipe
> the
Eric Schulte writes:
> "Loris Bennett" writes:
>
>> Dear List,
>>
>> This
>>
>> #+BEGIN_SRC sh
>> echo "a b c d"
>> echo "1 2 3 4"
>> echo "5 6 7 8"
>> #+END_SRC
>>
>> produces this:
>>
>> #+RESULTS:
>> | a | b | c | d |
>> | 1 | 2 | 3 | 4 |
>> | 5 | 6 | 7 | 8 |
>>
>> How do I get this
>>
"Loris Bennett" writes:
> Dear List,
>
> This
>
> #+BEGIN_SRC sh
> echo "a b c d"
> echo "1 2 3 4"
> echo "5 6 7 8"
> #+END_SRC
>
> produces this:
>
> #+RESULTS:
> | a | b | c | d |
> | 1 | 2 | 3 | 4 |
> | 5 | 6 | 7 | 8 |
>
> How do I get this
>
> #+RESULTS:
> | a | b | c | d |
> |-+-
Rasmus writes:
> Probably you can remove the require 'cl. Also, you can generalize the
> code to take arbitrarily hline positions.
Here's a more fun :post function (again depending on cl).
#+NAME: add_hline
#+BEGIN_SRC emacs-lisp :var data='((a b c) (d e f) (h i j)) h='(0 -2 100 last)
(let
Hi Loris,
"Loris Bennett" writes:
> How do I get this
>
> #+RESULTS:
> | a | b | c | d |
> |-+---+---+---|
> | 1 | 2 | 3 | 4 |
> | 5 | 6 | 7 | 8 |
You might find use of the post header argument here,
http://orgmode.org/manual/post.html
In this case it's as simple as this
#+NAME
Achim Gratz writes:
[…]
Looking at this again, of course this simpler version would do the same.
--8<---cut here---start->8---
#+BEGIN_SRC sh :results raw
(
echo "a b c d"
echo ""
echo "1 2 3 4"
echo "5 6 7 8"
) | sed -re 's/^| /|/g' -e 's/^\|$/|-/'
#+END_SRC
-
Loris Bennett writes:
> How do I get this
>
> #+RESULTS:
> | a | b | c | d |
> |-+---+---+---|
> | 1 | 2 | 3 | 4 |
> | 5 | 6 | 7 | 8 |
You really don't want to use a shell for that, but if you insist, this
would do it:
--8<---cut here---start->8---
#+
Dear List,
This
#+BEGIN_SRC sh
echo "a b c d"
echo "1 2 3 4"
echo "5 6 7 8"
#+END_SRC
produces this:
#+RESULTS:
| a | b | c | d |
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
How do I get this
#+RESULTS:
| a | b | c | d |
|-+---+---+---|
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
?
Thanks,
12 matches
Mail list logo