emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.


From: Nicolas Goaziou
Subject: Re: [O] Bug: Literal Examples are malformed in exports (to html/tex) [8.0.3 (release_8.0.3-165-g60ca9e @ /home/quazimodo/.emacs.d/vendor/org-mode/lisp/)]
Date: Wed, 29 May 2013 21:10:04 +0200

Hello,

address@hidden (S.S) writes:

> I add a literal example like
>
> #+BEGIN_SRC
>        (defun org-xor (a b)
>           "Exclusive or."
>           (if a (not b) b))
> #+END_SRC

You need to provide a language for src blocks.

> and
>
> #+BEGIN_EXAMPLE
>   (defun org-xor (a b)
>      "Exclusive or."
>      (if a (not b) b))
> #+END_EXAMPLE
>
> to an org file in various places. 
>
> Export with (org-html-export-to-html) and (org-latex-export-to-latex)
> produces inconsistent and malformed example blocks. Some of these blocks
> produce 
> <p>
> #+BEGIN<sub>EXAMPLE</sub>
>   (defun org-xor (a b)
>      "Exclusive or."
>      (if a (not b) b))
> </p>
>
> Others produce
>
> <p>
> (defun org-xor (a b)
>    "Exclusive or."
>    (if a (not b) b))
> </p>
>
> and 
>
> \#+BEGIN$_{\text{EXAMPLE}}$
>   (defun org-xor (a b)
>      "Exclusive or."
>      (if a (not b) b))
> \#+END$_{\text{EXAMPLE}}$

It means the example blocks are not recognized as such, for some reason.
I cannot reproduce it, so I'd need a bit more context around your wrong
blocks. Could you provide an ECM?

> I add the following before an example block
> #+ATTR_HTML: :textarea t :width 40
>
> and it creates 
>
> <div textarea="t" width="40" class="example
> ">
> <p>
> (defun org-xor (a b)
>    "Exclusive or."
>    (if a (not b) b))
> </p>

I cannot reproduce it either, but it seems related to the first problem.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]