Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a follow up to this question: superuser question 431356

How can I specify org mode publish setting globally? So not per project, but for any .org file I happen to publish?

so instead of:

 (setq org-publish-project-alist
  :base-directory "~/git/homepage/"
  :base-extension "org"
  :publishing-directory "~/public_html/"
  :publishing-function org-publish-org-to-html
  :style "<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" />")))

or this for every file:

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

I want something that changes the defaults of any org file.

share|improve this question
up vote 3 down vote accepted

You can customize org-export-html-style and org-export-html-style-extra.

The first has all the default values for org export, so you'd better leave as is unless you want to override everything.

org-export-html-style-extra gets appended after the default style definition with your own variations.

I use this setting:

"<style type=\"text/css\">\n  html {\n  font-family: sans-serif;\n  font-size: 11pt;\n  }\n  em { font-style: normal; font-weight: bold;}\n</style>"
share|improve this answer
GREAT! That was the trick! – reinier Jun 1 '12 at 20:31

Juancho's answer worked for me, with one change: when going through the org-mode customization menu (Customize > Export > HTML > Style Extras) I had to remove the \n and escape characters.

share|improve this answer
This should really be a comment to the top answer. – reinier Jul 11 '12 at 19:52
Agreed, but I don't see an "Add comment" by the top answer. – Tom Slee Jul 13 '12 at 12:06
ah perhaps you don't have enough reputation points to post a comment. (I think you have to have a few hundred points (their way to fight spam)) – reinier Jul 15 '12 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .