emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [Patch] HTML export -- Allow to change the name of the global DIV
Date: Thu, 10 Mar 2011 14:07:12 +0100	[thread overview]
Message-ID: <80y64nxgxr.fsf@somewhere.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

Hello,

Here is a patch which allows one to change the (currently) hard-coded DIV name
in which the page contents is being inserted.

It currently is "content", but some prefer "container" or "wrapper".

If accepted, my next patch will be to make this a per-project variable.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: add-variable-for-container-div.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

diff --git a/lisp/org-html.el b/lisp/org-html.el
index c60c90d..772e9d0 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1,6 +1,6 @@
 ;;; org-html.el --- HTML export for Org-mode
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
@@ -583,6 +583,11 @@ with a link to this URL."
 	  (const :tag "Keep internal css" nil)
 	  (string :tag "URL or local href")))
 
+(defcustom org-export-content-div "content"
+  "The name of the container DIV that holds all the page contents."
+  :group 'org-export-htmlize
+  :type 'string)
+
 ;;; Hooks
 
 (defvar org-export-html-after-blockquotes-hook nil
@@ -1251,7 +1256,7 @@ lang=\"%s\" xml:lang=\"%s\">
 %s
 </head>
 <body>
-<div id=\"content\">
+<div id=\"%s\">
 %s
 "
 		 (format
@@ -1268,6 +1273,7 @@ lang=\"%s\" xml:lang=\"%s\">
 		 date author description keywords
 		 style
 		 mathjax
+		 org-export-content-div
 		 (if (or link-up link-home)
 		     (concat
 		      (format org-export-html-home/up-format

[-- Attachment #3: Type: text/plain, Size: 50 bytes --]


Best regards,
  Seb

-- 
Sébastien Vauban

             reply	other threads:[~2011-03-10 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10 13:07 Sébastien Vauban [this message]
2011-03-11  8:37 ` [Patch] HTML export -- Allow to change the name of the global DIV Bastien
2011-03-11  9:09   ` Sébastien Vauban
2011-03-14 13:11   ` Matt Lundin
2011-03-14 15:22     ` Jambunathan K
2011-03-14 15:25       ` Jambunathan K

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=80y64nxgxr.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).