emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uriel Avalos <amscopub-mail@yahoo.com>
To: emacs-orgmode@gnu.org
Subject: Re: Change DOCTYPE declaration?
Date: Wed, 17 Nov 2010 15:23:08 -0500	[thread overview]
Message-ID: <30439.6222848029$1290025424@news.gmane.org> (raw)
In-Reply-To: <20101117183427.GG2450@soloJazz.com>

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 <juan@pechiar.com> 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	other threads:[~2010-11-17 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101117130409.773797d2amscopub-mail@yahoo.com@dove.localdomain>
2010-11-17 18:34 ` Change DOCTYPE declaration? Juan Pechiar
2010-11-17 20:23   ` Uriel Avalos [this message]
     [not found]   ` <20101117152308.63473cd6amscopub-mail@yahoo.com@dove.localdomain>
2010-11-17 21:45     ` Juan Pechiar
     [not found]       ` <27942.1290032705@gamaville.americas.hpqcorp.net>
2010-11-17 23:02         ` Juan Pechiar
2010-11-18 15:35       ` Uriel Avalos
     [not found]       ` <20101118103550.33442d0eamscopub-mail@yahoo.com@dove.localdomain>
2010-11-18 15:51         ` Uriel Avalos
2010-11-18 15:52         ` Juan Pechiar
2010-11-17 18:04 Uriel Avalos

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='30439.6222848029$1290025424@news.gmane.org' \
    --to=amscopub-mail@yahoo.com \
    --cc=emacs-orgmode@gnu.org \
    /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).