emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Changing the font family in HTML export


From: Pieter Praet
Subject: Re: [O] Changing the font family in HTML export
Date: Tue, 28 Jun 2011 11:18:58 +0200
User-agent: Notmuch/0.5-243-g5a76944 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu)

On Tue, 28 Jun 2011 11:00:43 +0200, Dror Atariah <address@hidden> wrote:
> This solved the problem. However, as you pointed out, in case I want to 
> publish/share this generated html, I have to send as well another file, and 
> it is not longer self contained. In the automatically, generated html, there 
> is a section at the beginning:
> --==--
> <style type="text/css">
>  <!--/*--><![CDATA[/*><!--*/
>   html { font-family: Times, serif; font-size: 12pt; }
>   .title  { text-align: center; }
>   .todo   { color: red; }
>   .done   { color: green; }
>   .tag    { background-color: #add8e6; font-weight:normal }
> ...
> --==--
> 
> Isn't there a way to tell orgmode to change this part, and, for example, use 
> a different font?

This is hardcoded @ org-html.el:122.

You can change this manually, but keep in mind that in order to make it
stick, you'll need to run "make it stick" (sans the "it stick").

For more info, see http://orgmode.org/worg/org-faq.html#sec-3_3


Also, word of advice: this is a public mailing list, so it might not be
such a fantastic idea to divulge everything apart from your shoe size
and favourite colour in your signature.


> On Jun 28, 2011, at 10:42 AM, Manuel Giraud wrote:
> 
> > Dror Atariah <address@hidden> writes:
> > 
> >> Thanks for the quick answer!
> >>> I think you could use an external css file for that. You can do so by
> >>> setting the STYLE property in you org file like that:
> >>> 
> >>> --8<---------------cut here---------------start------------->8---
> >>> #+TITLE: My page
> >>> #+STYLE: <link rel="stylesheet" href="my_own.css" type="text/css"/>
> >>> 
> >>> * My first title
> >>> --8<---------------cut here---------------end--------------->8---
> >> This means that I have to generate and put "my_own.css" file in the
> >> right place. 
> > 
> > Yes. But I don't know how you publish things after having generated the
> > html. You may just have to copy this file in the right place once.
> > 
> > 
> >> What should this file contain? 
> > 
> > It's a css file it could contain many things (see
> > http://www.w3schools.com/css/ for good tutorials and test). But in your
> > case this will do the trick:
> > 
> > --8<---------------cut here---------------start------------->8---
> > html { font-family: Helvetica, sans-serif; font-size: 12pt; }
> > --8<---------------cut here---------------end--------------->8---
> > 
> > 
> >> I'm happy with the formatting of the exported html, I only want to
> >> change the font. Is this still the right approach?
> > 
> > I still think it is the best option because one day you'd like to change
> > the color of h1's title and this approach still stand (in fact that's
> > what css are for).
> > 
> > Best regards,
> > -- 
> > Manuel Giraud
> 
> Dror Atariah
> ---------------------------------------------------------------
> Landline:        +49-30-43024501
> Mobile:         +49-176-67116376
> Mobile (in IL): +972 54 5912389
> IM:                 address@hidden
>                  address@hidden
> 
> 


Peace

-- 
Pieter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]