emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: S.S
Subject: [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: Thu, 30 May 2013 04:15:22 +1000

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

I add a literal example like

#+BEGIN_SRC
       (defun org-xor (a b)
          "Exclusive or."
          (if a (not b) b))
#+END_SRC

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}}$

vs

\begin{example
}
(defun org-xor (a b)
   "Exclusive or."
   (if a (not b) b))
\end{example

I expect to see correctly created example areas that maintain
spacing/tabs/newlines.

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>

NOTE: I do not believe that I have a mixed install. By deleting org-mode
8.0.3 and using the built-in 7.8.11 these problems are resolved.


Emacs  : GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-11-10 on charichuelo, modified by Debian
Package: Org-mode version 8.0.3 (release_8.0.3-165-g60ca9e @ 
/home/quazimodo/.emacs.d/vendor/org-mode/lisp/)

current state:
==============
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
                      org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '((lambda nil
                  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all)
                   (quote append) (quote local))
                  )
                 (lambda nil
                  (org-add-hook (quote change-major-mode-hook)
                   (quote org-babel-show-result-all) (quote append) (quote 
local))
                  )
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
                     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )



reply via email to

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