emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export HTML with Free Form Text
@ 2014-05-13 15:03 Esben Stien
  2014-05-13 17:15 ` Rick Frankel
  0 siblings, 1 reply; 5+ messages in thread
From: Esben Stien @ 2014-05-13 15:03 UTC (permalink / raw)
  To: emacs-orgmode


If I have a heading like this: 

** foo
bar

baz

..the export is fine, because the extra empty space between the lines
makes the export function treat them as two paragraphs, but 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?

Many times I use a heading just to separate blocks of random text and
notes and I don't think I should have to tell it explicitly that this
text is free form.

-- 
Esben Stien is b0ef@e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e 
           jid:b0ef@    n     n

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export HTML with Free Form Text
  2014-05-13 15:03 Export HTML with Free Form Text Esben Stien
@ 2014-05-13 17:15 ` Rick Frankel
  2014-05-13 19:33   ` Esben Stien
  0 siblings, 1 reply; 5+ messages in thread
From: Rick Frankel @ 2014-05-13 17:15 UTC (permalink / raw)
  To: Esben Stien; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export HTML with Free Form Text
  2014-05-13 17:15 ` Rick Frankel
@ 2014-05-13 19:33   ` Esben Stien
  2014-05-14  3:39     ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Esben Stien @ 2014-05-13 19:33 UTC (permalink / raw)
  To: emacs-orgmode

Rick Frankel <rick@rickster.com> writes:

> You have (at least ;) two choices in org: example blocks or verse
> block.

How about a third choice, without blocks?

There's no underlying reason why text that is on separate lines should
be treated as text on one line.

I cannot create "blocks" every time I take a random note of something
inside a heading. They are on separate lines inside the heading, so it
doesn't make sense that they should be on the same line in an export of
a heading. 

I need a way to have html export treat these lines of text as lines of
text, not a single paragraph and I need it to do this without having me
mark it a block.

-- 
Esben Stien is b0ef@e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e 
           jid:b0ef@    n     n

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export HTML with Free Form Text
  2014-05-13 19:33   ` Esben Stien
@ 2014-05-14  3:39     ` Eric Abrahamsen
  2014-05-14  7:03       ` Esben Stien
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2014-05-14  3:39 UTC (permalink / raw)
  To: emacs-orgmode

Esben Stien <b0ef@esben-stien.name> writes:

> Rick Frankel <rick@rickster.com> writes:
>
>> You have (at least ;) two choices in org: example blocks or verse
>> block.
>
> How about a third choice, without blocks?
>
> There's no underlying reason why text that is on separate lines should
> be treated as text on one line.
>
> I cannot create "blocks" every time I take a random note of something
> inside a heading. They are on separate lines inside the heading, so it
> doesn't make sense that they should be on the same line in an export of
> a heading. 
>
> I need a way to have html export treat these lines of text as lines of
> text, not a single paragraph and I need it to do this without having me
> mark it a block.

You can do it with the preserve-breaks export option set to t. Either
"\n:t" in the #+OPTIONS line, or permanently by setting
org-export-preserve-breaks to t.

E

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Export HTML with Free Form Text
  2014-05-14  3:39     ` Eric Abrahamsen
@ 2014-05-14  7:03       ` Esben Stien
  0 siblings, 0 replies; 5+ messages in thread
From: Esben Stien @ 2014-05-14  7:03 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> You can do it with the preserve-breaks export option set to t. Either
> "\n:t" in the #+OPTIONS line, or permanently by setting
> org-export-preserve-breaks to t.

Hehe, I knew this would somehow be there;). 

Really great; thanks;)

-- 
Esben Stien is b0ef@e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e 
           jid:b0ef@    n     n

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-14  7:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13 15:03 Export HTML with Free Form Text Esben Stien
2014-05-13 17:15 ` Rick Frankel
2014-05-13 19:33   ` Esben Stien
2014-05-14  3:39     ` Eric Abrahamsen
2014-05-14  7:03       ` Esben Stien

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).