emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: srandby@gmail.com
Cc: "[Orgmode]" <emacs-orgmode@gnu.org>
Subject: Re: Javascript Export Issue
Date: Sat, 7 Mar 2009 11:30:04 +0100	[thread overview]
Message-ID: <108B821D-C315-4B94-862C-A23436C7C573@uva.nl> (raw)
In-Reply-To: <49B1DC36.1020505@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3447 bytes --]

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="stylesheet" type="text/css" href="gen-style.css">
     <link rel="stylesheet" type="text/css" href="style.css">
     <script type="text/javascript" src="org-info.v.0.1.0.5.js"></ 
script>
     <script type="text/javascript" src="org-html.js"></script>
     <script type="text/javascript" src="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="text/javascript">
> <!--/*--><![CDATA[/*><!--*/
> THE SCRIPT
> /*]]>*/-->
> </script>
>
> Earlier versions of org-mode exported scripts this way:
>
> <script type="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="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="stylesheet" type="text/css" href="gen-style.css">
> <link rel="stylesheet" type="text/css" href="style.css">
> <script type="text/javascript" src="org-info.v.0.1.0.5.js"></script>
> <script type="text/javascript" src="org-html.js"></script>
> <script type="text/javascript" src="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


[-- Attachment #1.2: Type: text/html, Size: 4360 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

  parent reply	other threads:[~2009-03-07 10:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07  2:30 Javascript Export Issue srandby
2009-03-07 10:14 ` Sebastian Rose
2009-03-07 10:23 ` Sebastian Rose
2009-03-07 10:28   ` Carsten Dominik
2009-03-07 10:32   ` Carsten Dominik
2009-03-07 10:30 ` Carsten Dominik [this message]
2009-03-08  2:20   ` srandby

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=108B821D-C315-4B94-862C-A23436C7C573@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=srandby@gmail.com \
    /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).