emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Change DOCTYPE declaration?


From: Uriel Avalos
Subject: Re: [Orgmode] Change DOCTYPE declaration?
Date: Wed, 17 Nov 2010 15:23:08 -0500

Thanks for the reply. After some monkeying around, I found I could do this:

(add-hook 'org-export-html-final-hook
          (lambda ()
           (let ((kill-whole-line t))
            (goto-char (point-min))
            (next-line)
            (kill-line 2)
            (insert "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" 
\"http://www.w3.org/TR/html4/strict.dtd\";>\n")
            )
           )
          )

To undo it, I can call this:

(setq org-export-html-final-hook nil)

However, one question, the above sets the doctype GLOBALLY. Is there a way to 
do set this automagically per file? (I.e., some kind of file-specific export 
option)


On Wed, 17 Nov 2010 16:34:27 -0200
Juan Pechiar <address@hidden> wrote:

> Hi,
> 
> The DOCTYPE declaration is hardcoded inside org-html.el
> 
> You may change it by defining a hook and modifying the generated HTML.
> Have a look at the following message, where they get rid of the
> declaration:
> 
> http://lists.gnu.org/archive/html/emacs-orgmode/2010-06/msg00063.html
> 
> you may add some 'insert' there with your own declaration.
> 
> Regards,
> .j.
> 
> On Wed, Nov 17, 2010 at 01:04:09PM -0500, Uriel Avalos wrote:
> > How do I change the doctype declaration?
> >
> > Is there an export option or variable I can set? I tried searching
> > for the variable. Perhaps I'm using a version of orgmode that's too
> > old?
> >
> > The only thing I could find was org-export-html-xml-declaration but
> > that's not the same thing.



reply via email to

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