diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8763e2393..954d14360 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2009-04-19 Carsten Dominik + * org-latex.el (org-export-latex-timestamp-keyword-markup): New + option. + (org-export-latex-keywords): Use new option. + * org.el (org-rear-nonsticky-at): New defsubst. (org-activate-plain-links, org-activate-angle-links) (org-activate-footnote-links, org-activate-bracket-links) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 54dfafc28..d88bd04ce 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -202,6 +202,11 @@ For example \orgTITLE for #+TITLE." :group 'org-export-latex :type 'string) +(defcustom org-export-latex-timestamp-keyword-markup "\\texttt{%s}" + "A printf format string to be applied to time stamps." + :group 'org-export-latex + :type 'string) + (defcustom org-export-latex-tables-verbatim nil "When non-nil, tables are exported verbatim." :group 'org-export-latex @@ -1092,11 +1097,14 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (defun org-export-latex-keywords () "Convert special keywords to LaTeX." (goto-char (point-min)) - (let ((re (concat org-export-latex-special-keyword-regexp - ".*" ; including the time stamp.... - ))) - (while (re-search-forward re nil t) - (replace-match (format "\\texttt{%s}" (match-string 0)) t t)))) + (while (re-search-forward org-export-latex-special-keyword-regexp nil t) + (replace-match (format org-export-latex-timestamp-keyword-markup + (match-string 0)) t t) + (save-excursion + (beginning-of-line 1) + (unless (looking-at ".*\\\\newline[ \t]*$") + (end-of-line 1) + (insert "\\newline"))))) (defun org-export-latex-fixed-width (opt) "When OPT is non-nil convert fixed-width sections to LaTeX."