* [babel] bug, exporting scrname source blocks html
@ 2010-02-03 9:55 "Martin G. Skjæveland"
2010-02-03 16:44 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: "Martin G. Skjæveland" @ 2010-02-03 9:55 UTC (permalink / raw)
To: emacs-orgmode
Hi,
when I export the following to html
-------------------------------------start
* test
#+srcname: test1
#+begin_src n3 -n
subject predicate object
#+end_src
#+begin_src n3 -n
subject predicate object
#+end_src
-------------------------------------end
the two source blocks are exported as (spacing removed)
-------------------------------------start
<p>A</p>
<label class="org-src-name">test1 &equiv</label>
<span class="linenr">1: </span><pre class="src src-n3">
<span class="linenr">2: </span>subject predicate object
</pre>
<p>B</p>
<pre class="src src-n3"><span class="linenr">1: </span>subject
predicate object
</pre>
-------------------------------------end
which in a browser looks like
-------------------------------------start
A
test1 ≡ 1:
2: subject predicate object
B
1: subject predicate object
-------------------------------------end
In my opinion it should be exported to look like this
-------------------------------------start
A
1: subject predicate object
B
1: subject predicate object
-------------------------------------end
Thanks!
Martin
------------------------------------------------------------------------
Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0)
of 2009-09-27 on palmer, modified by Debian
Package: Org-mode version 6.34trans (release_6.34c.40.g2cd16.dirty)
current state:
==============
(setq
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-babel-interpreters '("makefile" "tex" "n3" "xml" "java" "python" "dot"
"css" "sh" "emacs-lisp")
org-export-latex-format-toc-function 'org-export-latex-format-toc-default
org-export-preprocess-hook '(org-export-blocks-preprocess)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-hide-block-toggle-maybe)
org-src-mode-hook '(org-src-mode-configure-edit-buffer)
org-confirm-shell-link-function 'yes-or-no-p
org-src-preserve-indentation t
org-export-first-hook '(org-beamer-initialize-open-trackers)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-export-latex-classes '(("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}"))
("book" "\\documentclass[11pt]{book}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
)
org-publish-project-alist '(("vortex" :base-directory "~/exercises/"
:publishing-directory "~/exercises/"
:base-extension "org" :publishing-function
org-publish-org-to-html :preamble
"${resource:breadcrumb}<style>.breadcrumb
{font-size:80%;}</style>" :skip-before-1st-heading nil)
)
org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
org-use-speed-commands t
org-mode-hook '((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
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-show-block-all
append local]
5]
)
org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe
org-babel-hash-at-point
org-babel-execute-src-block-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-export-interblocks '((lob org-babel-exp-lob-one-liners)
(src org-babel-exp-inline-src-blocks))
org-occur-hook '(org-first-headline-recenter)
org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
org-beamer-auto-fragile-frames
org-beamer-place-default-actions-for-lists)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-export-blocks '((src org-babel-exp-src-blocks nil)
(comment org-export-blocks-format-comment t)
(ditaa org-export-blocks-format-ditaa nil)
(dot org-export-blocks-format-dot nil))
)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [babel] bug, exporting scrname source blocks html
2010-02-03 9:55 [babel] bug, exporting scrname source blocks html "Martin G. Skjæveland"
@ 2010-02-03 16:44 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2010-02-03 16:44 UTC (permalink / raw)
To: Martin G. Skjæveland; +Cc: emacs-orgmode
Hi Martin,
Yes, we are still wrestling with how to deal with source-block names on
export to both LaTeX and html. You can use the "org-src-name" css class
to control the appearance of the source-code name -- or in your case to
hide it with the addition of something like the following to your
org-mode file
#+STYLE: <style>.org-src-name{ display: none; }</style>
As for the line numbering issue, I just pushed up a small patch which
should fix the line numbers in the case of name source blocks.
Thanks for reporting this bug.
Best -- Eric
"Martin G. Skjæveland" <martige@ifi.uio.no> writes:
> Hi,
>
> when I export the following to html
>
> -------------------------------------start
> * test
>
> #+srcname: test1
> #+begin_src n3 -n
> subject predicate object
> #+end_src
>
> #+begin_src n3 -n
> subject predicate object
> #+end_src
> -------------------------------------end
>
> the two source blocks are exported as (spacing removed)
>
> -------------------------------------start
> <p>A</p>
> <label class="org-src-name">test1 &equiv</label>
> <span class="linenr">1: </span><pre class="src src-n3">
> <span class="linenr">2: </span>subject predicate object
> </pre>
> <p>B</p>
> <pre class="src src-n3"><span class="linenr">1: </span>subject
> predicate object
> </pre>
> -------------------------------------end
>
> which in a browser looks like
>
> -------------------------------------start
> A
> test1 ≡ 1:
>
> 2: subject predicate object
>
> B
>
> 1: subject predicate object
> -------------------------------------end
>
> In my opinion it should be exported to look like this
>
> -------------------------------------start
> A
>
> 1: subject predicate object
>
> B
>
> 1: subject predicate object
> -------------------------------------end
>
>
> Thanks!
> Martin
>
> ------------------------------------------------------------------------
>
> Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0)
> of 2009-09-27 on palmer, modified by Debian
> Package: Org-mode version 6.34trans (release_6.34c.40.g2cd16.dirty)
>
> current state:
> ==============
> (setq
> org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
> org-metaup-hook '(org-babel-load-in-session-maybe)
> org-after-todo-state-change-hook '(org-clock-out-if-current)
> org-babel-interpreters '("makefile" "tex" "n3" "xml" "java" "python" "dot"
> "css" "sh" "emacs-lisp")
> org-export-latex-format-toc-function 'org-export-latex-format-toc-default
> org-export-preprocess-hook '(org-export-blocks-preprocess)
> org-tab-first-hook '(org-babel-hide-result-toggle-maybe
> org-hide-block-toggle-maybe)
> org-src-mode-hook '(org-src-mode-configure-edit-buffer)
> org-confirm-shell-link-function 'yes-or-no-p
> org-src-preserve-indentation t
> org-export-first-hook '(org-beamer-initialize-open-trackers)
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
> org-cycle-show-empty-lines
> org-optimize-window-after-visibility-change)
> org-export-latex-classes '(("article" "\\documentclass[11pt]{article}"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> ("\\paragraph{%s}" . "\\paragraph*{%s}"))
> ("book" "\\documentclass[11pt]{book}"
> ("\\chapter{%s}" . "\\chapter*{%s}")
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> )
> org-publish-project-alist '(("vortex" :base-directory "~/exercises/"
> :publishing-directory "~/exercises/"
> :base-extension "org" :publishing-function
> org-publish-org-to-html :preamble
> "${resource:breadcrumb}<style>.breadcrumb
> {font-size:80%;}</style>" :skip-before-1st-heading nil)
> )
> org-export-preprocess-before-normalizing-links-hook
> (org-remove-file-link-modifiers)
> org-use-speed-commands t
> org-mode-hook '((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
> #[nil "\300\301\302\303\304$\207"
> [org-add-hook change-major-mode-hook org-show-block-all
> append local]
> 5]
> )
> org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe
> org-babel-hash-at-point
> org-babel-execute-src-block-maybe)
> org-confirm-elisp-link-function 'yes-or-no-p
> org-export-interblocks '((lob org-babel-exp-lob-one-liners)
> (src org-babel-exp-inline-src-blocks))
> org-occur-hook '(org-first-headline-recenter)
> org-export-preprocess-before-selecting-backend-code-hook
> (org-beamer-select-beamer-code)
> org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
> org-beamer-auto-fragile-frames
> org-beamer-place-default-actions-for-lists)
> org-metadown-hook '(org-babel-pop-to-session-maybe)
> org-export-blocks '((src org-babel-exp-src-blocks nil)
> (comment org-export-blocks-format-comment t)
> (ditaa org-export-blocks-format-ditaa nil)
> (dot org-export-blocks-format-dot nil))
> )
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please 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] 2+ messages in thread
end of thread, other threads:[~2010-02-03 16:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 9:55 [babel] bug, exporting scrname source blocks html "Martin G. Skjæveland"
2010-02-03 16:44 ` 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).