emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: Bill White <billw@wolfram.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: html export of src: extra newlines
Date: Tue, 14 Jul 2009 14:24:40 -0400	[thread overview]
Message-ID: <87bpnn86mv.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: <87vdlv5ga8.fsf@wolfram.com> (Bill White's message of "Tue, 14 Jul 2009 12:24:31 -0500")

Bill White <billw@wolfram.com> writes:

> Org seems to insert extra newlines when exporting src to html.  You can
> see the output at http://members.wolfram.com/billw/RomanCalendar.html
> (search for gregorianFromAbsolute) - there's a large amount of vertical
> space between the two function definitions.
>
> Is there some way to avoid exporting all those newlines?

>
>  - GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.16.1) of
>    2009-05-28 on billw-desktop
>  - Org-mode version 6.27trans
>
> Here's the relevant part of my .org file:
>
> ,----
> | #+begin_src mma
> | absoluteFromGregorian[{year_Integer, month_Integer, day_Integer}] :=
> |   DateDifference[epoch, {year, month, day}]
> | 
> | gregorianFromAbsolute[abs_Integer] := 
> |   DatePlus[epoch, abs]
> | #+end_src
> `----

I tried exporting this fragment using C-c C-e h, and could not replicate
this (org and html below). Maybe it would be revealing to try exporting
the org buffer directly using C-c C-e h (org-export-as-html), and seeing
if the problem occurs then with your setup?

Dan

Details
-------
I downloaded mma-mode just now from

http://www.itwm.fhg.de/as/asemployees/wichmann/mma.html

is that the same as yours?

,----[ C-h v mma-version RET ]
| mma-version is a variable defined in `mma.el'.
| Its value is "$Revision: 1.1 $"
| 
| Documentation:
| The Revision number of mma.el.
| You should add this number when reporting bugs.
| 
| [back]
`----

Here's my org

--8<---------------cut here---------------start------------->8---
#+title: mathematica example

* here's the block
#+begin_src mma
  absoluteFromGregorian[{year_Integer, month_Integer, day_Integer}] :=
    DateDifference[epoch, {year, month, day}]
  
  gregorianFromAbsolute[abs_Integer] := 
    DatePlus[epoch, abs]
#+end_src
and that was it
--8<---------------cut here---------------end--------------->8---

and here's the relevant bit of the html I got

--8<---------------cut here---------------start------------->8---
<pre class="src src-mma"><span style="color: #7fffd4; font-weight: bold;">absoluteFromGregorian</span>[{year_Integer, month_Integer, day_Integer}] :=
DateDifference[epoch, {year, month, day}]

<span style="color: #7fffd4; font-weight: bold;">gregorianFromAbsolute</span>[abs_Integer] := 
DatePlus[epoch, abs]
</pre>
--8<---------------cut here---------------end--------------->8---



>
> I export the whole project via 'C-c C-e P' - here's the generated html:
>
> ,----
> | <pre class="src src-mma">
> | <span style="color: #0000ff;">absoluteFromGregorian</span>[{year_Integer, month_Integer, day_Integer}] :=
> |   DateDifference[epoch, {year, month, day}]
> | 
> | 
> | 
> | <span style="color: #0000ff;">gregorianFromAbsolute</span>[abs_Integer] := 
> |   DatePlus[epoch, abs]
> | </pre>
> `----



>
> Here's the relevant part of org-publish-project-alist:
>
> ,----
> | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> | ("members.wolfram.com-org-notes"
> |  :base-directory "~/org/members.wolfram.com"
> |  :base-extension "org"
> |  :publishing-directory "~/org/000-published/members.wolfram.com/"
> |  :recursive t
> |  :publishing-function org-publish-org-to-html
> |  :headline-levels 4             ; Just the default for this project.
> |  :auto-preamble t
> |  )
> | ("members.wolfram.com-org-static"
> |  :base-directory "~/org/members.wolfram.com"
> |  :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
> |  :publishing-directory "~/org/000-published/members.wolfram.com/"
> |  :recursive t
> |  :publishing-function org-publish-attachment)
> | ("members.wolfram.com" :components ("members.wolfram.com-org-notes" "members.wolfram.com-org-static"))
> | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> `----
>
> Thanks!
>
> bw

  reply	other threads:[~2009-07-14 18:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 17:24 html export of src: extra newlines Bill White
2009-07-14 18:24 ` Dan Davison [this message]
2009-07-14 18:47   ` Bill White

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bpnn86mv.fsf@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=billw@wolfram.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).