From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: html export of src: extra newlines Date: Tue, 14 Jul 2009 14:24:40 -0400 Message-ID: <87bpnn86mv.fsf@stats.ox.ac.uk> References: <87vdlv5ga8.fsf@wolfram.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQmgK-0000Io-Od for emacs-orgmode@gnu.org; Tue, 14 Jul 2009 14:24:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQmgG-0000IR-Vi for emacs-orgmode@gnu.org; Tue, 14 Jul 2009 14:24:48 -0400 Received: from [199.232.76.173] (port=56720 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQmgG-0000IJ-PF for emacs-orgmode@gnu.org; Tue, 14 Jul 2009 14:24:44 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:55188) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQmgG-0002GS-5x for emacs-orgmode@gnu.org; Tue, 14 Jul 2009 14:24:44 -0400 In-Reply-To: <87vdlv5ga8.fsf@wolfram.com> (Bill White's message of "Tue, 14 Jul 2009 12:24:31 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bill White Cc: emacs-orgmode@gnu.org Bill White 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---
absoluteFromGregorian[{year_Integer, month_Integer, day_Integer}] :=
DateDifference[epoch, {year, month, day}]

gregorianFromAbsolute[abs_Integer] := 
DatePlus[epoch, abs]
--8<---------------cut here---------------end--------------->8--- > > I export the whole project via 'C-c C-e P' - here's the generated html: > > ,---- > |
> | absoluteFromGregorian[{year_Integer, month_Integer, day_Integer}] :=
> |   DateDifference[epoch, {year, month, day}]
> | 
> | 
> | 
> | gregorianFromAbsolute[abs_Integer] := 
> |   DatePlus[epoch, abs]
> | 
> `---- > > 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