emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: Esben Stien <b0ef@esben-stien.name>
Cc: emacs-orgmode@gnu.org
Subject: Re: Export HTML with Free Form Text
Date: Tue, 13 May 2014 13:15:47 -0400	[thread overview]
Message-ID: <4f60b9ee200457d31ba459635c819dc3@mail.rickster.com> (raw)
In-Reply-To: <87iop9hgaa.fsf@quasar.esben-stien.name>

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  />
&#xa0;&#xa0;is<br  />
&#xa0;&#xa0;&#xa0;&#xa0;a<br  />
verse<br  />
</p>

<pre class="example">
this
is
a
verse
</pre>
#+END_HTML

  reply	other threads:[~2014-05-13 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 15:03 Export HTML with Free Form Text Esben Stien
2014-05-13 17:15 ` Rick Frankel [this message]
2014-05-13 19:33   ` Esben Stien
2014-05-14  3:39     ` Eric Abrahamsen
2014-05-14  7:03       ` Esben Stien

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=4f60b9ee200457d31ba459635c819dc3@mail.rickster.com \
    --to=rick@rickster.com \
    --cc=b0ef@esben-stien.name \
    --cc=emacs-orgmode@gnu.org \
    /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).