emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with BEGIN_SRC export-as-html
@ 2012-03-25 23:55 lowstz
  2012-03-26  5:05 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: lowstz @ 2012-03-25 23:55 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi,

I have a problem with BEGIN_SRC export as html,

I use the BEGIN_SRC code block my code like this:

#+BEGIN_SRC C
#include <stdio.h>

int main(void)
{
printf("Hello, World!"\n);
}
#+END_SRC

It work well in emacs, but when I run export as html
the part of BEGIN_SRC / END_SRC generate <pre class="example">, it same
with the BEGIN_EXAMPLE / END_EXAMPLE

Not have this problem, but after re-installing Fedora and Emacs.
This is the effect before reinstall the Fedora and Emacs:
https://lowstz.org/wiki/java.html

Emacs Version: GNU Emacs 23.3.1
Org-mode Version: 7.8.06 (I have tried git version, but still the same
problem)

-- 
Best regards,
Lowstz Chen

http://lowstz.org/blog
Twitter: @lowstz

[-- Attachment #2: Type: text/html, Size: 1830 bytes --]

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

* Re: Problem with BEGIN_SRC export-as-html
  2012-03-25 23:55 Problem with BEGIN_SRC export-as-html lowstz
@ 2012-03-26  5:05 ` Nick Dokos
  2012-03-26 11:49   ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2012-03-26  5:05 UTC (permalink / raw)
  To: lowstz; +Cc: nicholas.dokos, emacs-orgmode

lowstz <lowstz@gmail.com> wrote:


> #+BEGIN_SRC C
> #include <stdio.h>
> 
> int main(void) 
> {
> printf("Hello, World!"\n);
> }
> #+END_SRC
> 
> It work well in emacs, but when I run export as html
> the part of BEGIN_SRC / END_SRC generate <pre class="example">, it same with the BEGIN_EXAMPLE /
> END_EXAMPLE
> 

I cannot reproduce this. I get (both with my normal startup and with a minimal
.emacs):

,----
| <pre class="src src-C"><span style="color: #b0c4de;">#include</span> <span style="color: #ffa07a;">&lt;stdio.h&gt;</span>
| 
| <span style="color: #98fb98;">int</span> <span style="color: #b2dfee;">main</span>(<span style="color: #98fb98;">void</span>)&#160;
| {
| printf(<span style="color: #ffa07a;">"Hello, World!"</span>\n);
| }
| </pre>
`----

Have you activated C as a babel language? Maybe some some initialization
is interfering: try with emacs -q and a minimal .emacs (search the list
archives for examples), although the fact that (iiuc) things worked
before you reinstalled emacs and fedora, seems to point to some more
basic misconfiguration (maybe you are picking up pieces of the org mode
distributed with the platform emacs?). Just guessing here.

GNU Emacs 24.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-01-24
Org-mode version 7.8.06 (release_7.8.06.110.g2756.dirty)

(my org-mode version includes half a dozen local modifications).

Nick

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

* Re: Problem with BEGIN_SRC export-as-html
  2012-03-26  5:05 ` Nick Dokos
@ 2012-03-26 11:49   ` Eric Schulte
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Schulte @ 2012-03-26 11:49 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: lowstz, emacs-orgmode

I believe that if htmlize.el is not available code blocks default to
<pre class="example"> on HTML export because Org-mode is not able to
fortify the source code.  I would suggest either installing htmlize.el
explicitly or switching to a newer version of Emacs in which it is
included by default.

Cheers,

Nick Dokos <nicholas.dokos@hp.com> writes:

> lowstz <lowstz@gmail.com> wrote:
>
>
>> #+BEGIN_SRC C
>> #include <stdio.h>
>> 
>> int main(void) 
>> {
>> printf("Hello, World!"\n);
>> }
>> #+END_SRC
>> 
>> It work well in emacs, but when I run export as html
>> the part of BEGIN_SRC / END_SRC generate <pre class="example">, it same with the BEGIN_EXAMPLE /
>> END_EXAMPLE
>> 
>
> I cannot reproduce this. I get (both with my normal startup and with a minimal
> .emacs):
>
> ,----
> | <pre class="src src-C"><span style="color: #b0c4de;">#include</span> <span style="color: #ffa07a;">&lt;stdio.h&gt;</span>
> | 
> | <span style="color: #98fb98;">int</span> <span style="color: #b2dfee;">main</span>(<span style="color: #98fb98;">void</span>)&#160;
> | {
> | printf(<span style="color: #ffa07a;">"Hello, World!"</span>\n);
> | }
> | </pre>
> `----
>
> Have you activated C as a babel language? Maybe some some initialization
> is interfering: try with emacs -q and a minimal .emacs (search the list
> archives for examples), although the fact that (iiuc) things worked
> before you reinstalled emacs and fedora, seems to point to some more
> basic misconfiguration (maybe you are picking up pieces of the org mode
> distributed with the platform emacs?). Just guessing here.
>
> GNU Emacs 24.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-01-24
> Org-mode version 7.8.06 (release_7.8.06.110.g2756.dirty)
>
> (my org-mode version includes half a dozen local modifications).
>
> Nick
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-25 23:55 Problem with BEGIN_SRC export-as-html lowstz
2012-03-26  5:05 ` Nick Dokos
2012-03-26 11:49   ` Eric Schulte

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