4
votes

I am having trouble getting emacs org-mode to export using my CSS file. I've been searching all day but can't seem to get it to work. The .org file and .css file are in the same directory and I have the following in my .org file:

#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
* First Headline...
* Second Headline...

However, when I export to HTML and view it in my browser, no changes are made. Looking at the source also shows that the default org-mode HTML header was used. Any suggestions?

2

2 Answers

4
votes

I see no reference to the STYLE option that you're using. The closest thing I find in the org manual refers to HTML_HEAD and HTML_HEAD_EXTRA:

Each exported file contains a compact default style that defines these classes in a basic way(2). You may overwrite these settings, or add to them by using the variables org-html-head' and org-html-head-extra'. You can override the global values of these variables for each file by using these keywords:

 #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style1.css" />
 #+HTML_HEAD_EXTRA: <link rel="alternate stylesheet" type="text/css" href="style2.css" />

My org version is 8.0.2.

-2
votes

Try #+STYLE: instead of #+HTML_HEAD:. It worked for me.