1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-29 20:35:02 +00:00

LaTeX export: Fix bugs with timestamp export.

The formatting of timestamp keywords was wrong.
This commit is contained in:
Carsten Dominik 2009-04-19 07:46:54 +02:00
parent 88468ff7fe
commit 6316b53c46
2 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,9 @@
2009-04-19 Carsten Dominik <carsten.dominik@gmail.com>
* 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)

View File

@ -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."