emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* BEGIN_EXAMPLE question
@ 2009-08-12  3:32 Bill Hager
  2009-08-12  4:43 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Hager @ 2009-08-12  3:32 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 499 bytes --]

Hello Org List!

I don't seem to understand #+BEGIN_EXAMPLE and it's relation to html
export.  What I think is that everything between a #+BEGIN_EXAMPLE and
#+END_EXAMPLE should end up in <pre> tags when I do a HTML export with C-c
C-e b.  However, the reality is that everything ends up in a <p> tag for me.

My goal is to have sections of my org file end up in <pre> tags when I HTML
export.  Any ideas on how I can do this?

I'm running the default emacs 22.2.1 on Ubuntu Jaunty.

Thanks

- Bill

[-- Attachment #1.2: Type: text/html, Size: 566 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: BEGIN_EXAMPLE question
  2009-08-12  3:32 BEGIN_EXAMPLE question Bill Hager
@ 2009-08-12  4:43 ` Nick Dokos
  2009-08-12 10:48   ` Bill Hager
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2009-08-12  4:43 UTC (permalink / raw)
  To: Bill Hager; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

Bill Hager <whager@gmail.com> wrote:

> I don't seem to understand #+BEGIN_EXAMPLE and it's relation to html
> export.  What I think is that everything between a #+BEGIN_EXAMPLE and
> #+END_EXAMPLE should end up in <pre> tags when I do a HTML export with C-c
> C-e b.  However, the reality is that everything ends up in a <p> tag for me.
> 
> My goal is to have sections of my org file end up in <pre> tags when I HTML
> export.  Any ideas on how I can do this?
> 
> I'm running the default emacs 22.2.1 on Ubuntu Jaunty.
> 

I can't reproduce this. I used the following simple org file:

,----
| 
| * Test
| 
| Here's an example:
| 
| #+BEGIN_EXAMPLE
| This is a test.
| #+END_EXAMPLE
`----

did C-c C-e h and got the attached html file. The example is
<pre>'d properly I think.

HTH,
Nick


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: HTML file produced by exporting the org file above. --]
[-- Type: text/xml, Size: 3054 bytes --]

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>

<title>bar</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2009-08-12 00:36:59 EDT"/>
<meta name="author" content="Nick Dokos"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  html { font-family: Times, serif; font-size: 12pt; }
  .title  { text-align: center; }
  .todo   { color: red; }
  .done   { color: green; }
  .tag    { background-color: #add8e6; font-weight:normal }
  .target { }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  p.verse { margin-left: 3% }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top; }
  dt { font-weight: bold; }
  div.figure { padding: 0.5em; }
  div.figure p { text-align: center; }
  .linenr { font-size:smaller }
  .code-highlighted {background-color:#ffff00;}
  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }
  /*]]>*/-->
</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="content">
<h1 class="title">bar</h1>


<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Test </a></li>
</ul>
</div>
</div>

<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Test </h2>
<div class="outline-text-2" id="text-1">


<p>
Here's an example:
</p>



<pre class="example">This is a test.
</pre>



</div>
</div>
<div id="postamble">
<p class="author"> Author: Nick Dokos
<a href="mailto:nick@gamaville.dokosmarshall.org">&lt;nick@gamaville.dokosmarshall.org&gt;</a>
</p>
<p class="date"> Date: 2009-08-12 00:36:59 EDT</p>
<p class="creator">HTML generated by org-mode 6.29trans in emacs 23</p>
</div>
</div>
</body>
</html>

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: BEGIN_EXAMPLE question
  2009-08-12  4:43 ` Nick Dokos
@ 2009-08-12 10:48   ` Bill Hager
  2009-08-12 15:38     ` Bill Hager
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Hager @ 2009-08-12 10:48 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1145 bytes --]

On Wed, Aug 12, 2009 at 12:43 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Bill Hager <whager@gmail.com> wrote:
>
> > I don't seem to understand #+BEGIN_EXAMPLE and it's relation to html
> > export.  What I think is that everything between a #+BEGIN_EXAMPLE and
> > #+END_EXAMPLE should end up in <pre> tags when I do a HTML export with
> C-c
> > C-e b.  However, the reality is that everything ends up in a <p> tag for
> me.
> >
> > My goal is to have sections of my org file end up in <pre> tags when I
> HTML
> > export.  Any ideas on how I can do this?
> >
> > I'm running the default emacs 22.2.1 on Ubuntu Jaunty.
> >
>
> I can't reproduce this. I used the following simple org file:
>
> ,----
> |
> | * Test
> |
> | Here's an example:
> |
> | #+BEGIN_EXAMPLE
> | This is a test.
> | #+END_EXAMPLE
> `----
>
> did C-c C-e h and got the attached html file. The example is
> <pre>'d properly I think.
>

Thanks Nick.  That does help give me something to compare against.  I've
attached my results from the same test you did with C-c C-e h showing <p>
tags instead of <pre> tags for the BEGIN_EXAMPLE/END_EXAMPLE section.

Thanks

- Bill

[-- Attachment #1.2: Type: text/html, Size: 1690 bytes --]

[-- Attachment #2: test.html --]
[-- Type: text/html, Size: 1386 bytes --]

[-- Attachment #3: test.org --]
[-- Type: application/octet-stream, Size: 75 bytes --]


* Test

Here's an example:

#+BEGIN_EXAMPLE
This is a test.
#+END_EXAMPLE

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: BEGIN_EXAMPLE question
  2009-08-12 10:48   ` Bill Hager
@ 2009-08-12 15:38     ` Bill Hager
  0 siblings, 0 replies; 4+ messages in thread
From: Bill Hager @ 2009-08-12 15:38 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1421 bytes --]

On Wed, Aug 12, 2009 at 6:48 AM, Bill Hager <whager@gmail.com> wrote:

> On Wed, Aug 12, 2009 at 12:43 AM, Nick Dokos <nicholas.dokos@hp.com>wrote:
>
>> Bill Hager <whager@gmail.com> wrote:
>>
>> > I don't seem to understand #+BEGIN_EXAMPLE and it's relation to html
>> > export.  What I think is that everything between a #+BEGIN_EXAMPLE and
>> > #+END_EXAMPLE should end up in <pre> tags when I do a HTML export with
>> C-c
>> > C-e b.  However, the reality is that everything ends up in a <p> tag for
>> me.
>> >
>> > My goal is to have sections of my org file end up in <pre> tags when I
>> HTML
>> > export.  Any ideas on how I can do this?
>> >
>> > I'm running the default emacs 22.2.1 on Ubuntu Jaunty.
>> >
>>
>> I can't reproduce this. I used the following simple org file:
>>
>> ,----
>> |
>> | * Test
>> |
>> | Here's an example:
>> |
>> | #+BEGIN_EXAMPLE
>> | This is a test.
>> | #+END_EXAMPLE
>> `----
>>
>> did C-c C-e h and got the attached html file. The example is
>> <pre>'d properly I think.
>>
>
> Thanks Nick.  That does help give me something to compare against.  I've
> attached my results from the same test you did with C-c C-e h showing <p>
> tags instead of <pre> tags for the BEGIN_EXAMPLE/END_EXAMPLE section.
>
> Thanks
>


I noticed that Nick was using emacs 23.  I downloaded and compiled 23.1 from
the GNU website.  The new version properly uses <pre> tags for
#+BEGIN_EXAMPLE.

- Bill

[-- Attachment #1.2: Type: text/html, Size: 2276 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-08-12 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-12  3:32 BEGIN_EXAMPLE question Bill Hager
2009-08-12  4:43 ` Nick Dokos
2009-08-12 10:48   ` Bill Hager
2009-08-12 15:38     ` Bill Hager

Code repositories for project(s) associated with this 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).