Sfoglia il codice sorgente

HTML export: New span element around time stamps

New wrapper span around keyword plus time stamp, with class
timestamp-wrapper.

    .timestamp-wrapper {float: right;}

could be a nice entry in a CSS style file.
Carsten Dominik 16 anni fa
parent
commit
e06b3e5d25
4 ha cambiato i file con 36 aggiunte e 26 eliminazioni
  1. 4 0
      doc/ChangeLog
  2. 26 25
      doc/org.texi
  3. 3 0
      lisp/ChangeLog
  4. 3 1
      lisp/org-html.el

+ 4 - 0
doc/ChangeLog

@@ -1,3 +1,7 @@
+2009-04-14  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.texi (CSS support): Document new class.
+
 2009-03-31  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.texi (Agenda commands): Document the "?" operator to find

+ 26 - 25
doc/org.texi

@@ -8541,31 +8541,32 @@ keywords and tags lead to conflicts, use the variables
 parts of the document - your style specifications may change these, in
 addition to any of the standard classes like for headlines, tables etc.
 @example
-p.author           @r{author information, including email}
-p.date             @r{publishing date}
-p.creator          @r{creator info, about Org-mode version}
-.title             @r{document title}
-.todo              @r{TODO keywords, all not-done states}
-.done              @r{the DONE keywords, all stated the count as done}
-.WAITING           @r{each TODO keyword also uses a class named after itself}
-.timestamp         @r{time stamp}
-.timestamp-kwd     @r{keyword associated with a time stamp, like SCHEDULED}
-.tag               @r{tag in a headline}
-._HOME             @r{each tag uses itself as a class, "@@" replaced by "_"}
-.target            @r{target for links}
-.linenr            @r{the line number in a code example}
-.code-highlighted  @r{for highlighting referenced code lines}
-div.outline-N      @r{div for outline level N (headline plus text))}
-div.outline-text-N @r{extra div for text at outline level N}
-.section-number-N  @r{section number in headlines, different for each level}
-div.figure         @r{how to format an inlined image}
-pre.src            @r{formatted source code}
-pre.example        @r{normal example}
-p.verse            @r{verse paragraph}
-div.footnotes      @r{footnote section headline}
-p.footnote         @r{footnote definition paragraph, containing a footnote}
-.footref           @r{a footnote reference number (always a <sup>)}
-.footnum           @r{footnote number in footnote definition (always <sup>)}
+p.author            @r{author information, including email}
+p.date              @r{publishing date}
+p.creator           @r{creator info, about Org-mode version}
+.title              @r{document title}
+.todo               @r{TODO keywords, all not-done states}
+.done               @r{the DONE keywords, all stated the count as done}
+.WAITING            @r{each TODO keyword also uses a class named after itself}
+.timestamp          @r{time stamp}
+.timestamp-kwd      @r{keyword associated with a time stamp, like SCHEDULED}
+.timestamp-wrapper  @r{span around keyword plus time stamp}
+.tag                @r{tag in a headline}
+._HOME              @r{each tag uses itself as a class, "@@" replaced by "_"}
+.target             @r{target for links}
+.linenr             @r{the line number in a code example}
+.code-highlighted   @r{for highlighting referenced code lines}
+div.outline-N       @r{div for outline level N (headline plus text))}
+div.outline-text-N  @r{extra div for text at outline level N}
+.section-number-N   @r{section number in headlines, different for each level}
+div.figure          @r{how to format an inlined image}
+pre.src             @r{formatted source code}
+pre.example         @r{normal example}
+p.verse             @r{verse paragraph}
+div.footnotes       @r{footnote section headline}
+p.footnote          @r{footnote definition paragraph, containing a footnote}
+.footref            @r{a footnote reference number (always a <sup>)}
+.footnum            @r{footnote number in footnote definition (always <sup>)}
 @end example
 
 @vindex org-export-html-style-default

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-04-14  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-html.el (org-html-handle-time-stamps): Wrap time stamps into
+	an additional span element.
+
 	* org-clock.el: Fix a number of docstrings.
 	(org-clock-find-position): New argument
 	FIND-UNCLOSED to make the function find an unclosed clock in the

+ 3 - 1
lisp/org-html.el

@@ -1606,12 +1606,14 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used."
 	(or b (setq b (substring s 0 (match-beginning 0))))
 	(setq r (concat
 		 r (substring s 0 (match-beginning 0))
+		 "@<span class=\"timestamp-wrapper\">"
 		 (if (match-end 1)
 		     (format "@<span class=\"timestamp-kwd\">%s @</span>"
 			     (match-string 1 s)))
 		 (format " @<span class=\"timestamp\">%s@</span>"
 			 (substring
-			  (org-translate-time (match-string 3 s)) 1 -1)))
+			  (org-translate-time (match-string 3 s)) 1 -1))
+		 "@</span>")
 	      s (substring s (match-end 0))))
       ;; Line break if line started and ended with time stamp stuff
       (if (not r)