On 2014-05-13 11:03, Esben Stien wrote:
If I have a heading like this:
** foo
bar
baz
..and I export it to html, it comes out like this:
** foo
bar baz
Is there any way to tell export that free form text like this is
allowed?
What you want is verbatim text, or "Literal examples", not really
free-form. HTML by definition treats runs of whitespace as a single
space, so you need to do something to get it to treat the text as
separate lines. You have (at least ;) two choices in org: example
blocks or verse block.
Here's an example:
---- 8< cut here 8< -----
* Literal text
#+BEGIN_VERSE
this
is
a
verse
#+END_VERSE
#+BEGIN_EXAMPLE
this
is
a
verse
#+END_EXAMPLE
And the html output:
#+BEGIN_HTML
<p class="verse">
this<br />
  is<br />
    a<br />
verse<br />
</p>
<pre class="example">
this
is
a
verse
</pre>
#+END_HTML