From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Javascript Export Issue Date: Sat, 7 Mar 2009 11:30:04 +0100 Message-ID: <108B821D-C315-4B94-862C-A23436C7C573@uva.nl> References: <49B1DC36.1020505@gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: multipart/mixed; boundary="===============1035282841==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LftnN-0005j2-F2 for emacs-orgmode@gnu.org; Sat, 07 Mar 2009 05:30:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LftnL-0005iq-PE for emacs-orgmode@gnu.org; Sat, 07 Mar 2009 05:30:16 -0500 Received: from [199.232.76.173] (port=33182 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LftnL-0005in-JI for emacs-orgmode@gnu.org; Sat, 07 Mar 2009 05:30:15 -0500 Received: from mail-ew0-f179.google.com ([209.85.219.179]:44185) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LftnL-0002MN-0E for emacs-orgmode@gnu.org; Sat, 07 Mar 2009 05:30:15 -0500 Received: by ewy27 with SMTP id 27so417634ewy.42 for ; Sat, 07 Mar 2009 02:30:14 -0800 (PST) In-Reply-To: <49B1DC36.1020505@gmail.com> 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: srandby@gmail.com Cc: "[Orgmode]" --===============1035282841== Content-Type: multipart/alternative; boundary=Apple-Mail-1-416566893 --Apple-Mail-1-416566893 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi Scott, I do not think it makes sense to automatically produce these files. Among other things, it would mean that the extra files are produces for every single export of a file. If you want external files, You likely will use the same for a set of pages. After pulling the latest version you can do this: 1. prepare any style files and script files you want to use 2. do this (setq org-export-html-style-include-default nil) (setq org-export-html-style-include-scripts nil) (setq org-export-html-style " ") Instead of the last setting, you can also use #+STYLE in a file to specify the style files for this particular page. HTH - Carsten > On Mar 7, 2009, at 3:30 AM, srandby@gmail.com wrote: > Greetings, > > When I export (using org-mode 6.23) to html an org file that has > options for org-info.js, the html file contains this: > > > > Earlier versions of org-mode exported scripts this way: > > > > Today, I discovered that the first script listed above will work > with Firefox, but not with Safari (I don't know about IE). After > some research, I discovered several fixes, including the old way of > exporting, the easiest being: > > > > > I realize there are issues here with the differences between html > browsers and xml browsers, so I've decided that I would like to have > scripts (and styles) exported as separate files. Is this possible? > > When I export my org file to html, the html file contains one style > section and two script sections. If these three were instead > exported to separate files, that would eliminate the need to worry > about how to enclose styles and scripts with comments in a way that > works for all browsers. Of course, then org-mode would be creating > four files instead of one, but I would like to have this option. > Everything I've read about this matter recommends keeping styles and > scripts as external files. > > When I create the three files manually and edit the html file > appropriately, the html file lacks all the style and script code > which is replaced by: > > > > > > > > Here gen-style.css contains the style generated by org-mode, > style.css is my own style, org-html.js is the first script generated > by org-mode, and mystery.js is the second script generated by org- > mode (it is mysterious to me). > > Scott Randby > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-1-416566893 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Scott,

I = do not think it makes sense to automatically produce these = files.
Among other things, it would mean that the extra files = are
produces for every single export of a file.
If = you want external files, You likely will use the
same for a = set of pages.

After pulling the latest = version you can do this:

1. prepare any style = files and script files you want to use

2. do = this

(setq = org-export-html-style-include-default nil)
(setq = org-export-html-style-include-scripts nil)
(setq = org-export-html-style
   "<link rel=3D"stylesheet" = type=3D"text/css" href=3D"gen-style.css">
    <link = rel=3D"stylesheet" type=3D"text/css" href=3D"style.css">
   =  <script type=3D"text/javascript" = src=3D"org-info.v.0.1.0.5.js"></script>
   =  <script type=3D"text/javascript" = src=3D"org-html.js"></script>
    <script = type=3D"text/javascript" = src=3D"mystery.js"></script>")


Instead of the last setting, you can also use #+STYLE in a = file
to specify the style files for this particular = page.

HTH

- = Carsten




On Mar 7, 2009, = at 3:30 AM, srandby@gmail.com = wrote:

Greetings,

When I = export (using org-mode 6.23) to html an org file that has options for = org-info.js, the html file contains this:

<script = type=3D"text/javascript">
<!--/*--><![CDATA[/*><!--*/
THE = SCRIPT
/*]]>*/-->
</script>

Earlier versions of org-mode = exported scripts this way:

<script = type=3D"text/javascript">
/* <![CDATA[ */
THE SCRIPT
/* ]]> = */
</script>

Today, I discovered that the first script = listed above will work with Firefox, but not with Safari (I don't know = about IE). After some research, I discovered several fixes, including = the old way of exporting, the easiest being:

<script = type=3D"text/javascript">
<!--
THE = SCRIPT
-->
</script>


I realize there are issues here = with the differences between html browsers and xml browsers, so I've = decided that I would like to have scripts (and styles) exported as = separate files. Is this possible?

When I export my org file to = html, the html file contains one style section and two script sections. = If these three were instead exported to separate files, that would = eliminate the need to worry about how to enclose styles and scripts with = comments in a way that works for all browsers. Of course, then org-mode = would be creating four files instead of one, but I would like to have = this option. Everything I've read about this matter recommends keeping = styles and scripts as external files.

When I create the three = files manually and edit the html file appropriately, the html file lacks = all the style and script code which is replaced by:

<link = rel=3D"stylesheet" type=3D"text/css" href=3D"gen-style.css">
<link = rel=3D"stylesheet" type=3D"text/css" href=3D"style.css">
<script = type=3D"text/javascript" = src=3D"org-info.v.0.1.0.5.js"></script>
<script = type=3D"text/javascript" src=3D"org-html.js"></script>
<script = type=3D"text/javascript" src=3D"mystery.js"></script>

Here = gen-style.css contains the style generated by org-mode, style.css is my = own style, org-html.js is the first script generated by org-mode, and = mystery.js is the second script generated by org-mode (it is mysterious = to me).

Scott = Randby


_______________________________________________
Emacs= -orgmode mailing list
Remember: use `Reply All' to send replies to = the list.
Emacs-orgmode@gnu.org
http://= lists.gnu.org/mailman/listinfo/emacs-orgmode
<= br>
= --Apple-Mail-1-416566893-- --===============1035282841== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1035282841==--