Hello,

super.quazim...@gmail.com (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