comparison lisp/org/org-latex.el @ 106168:83924fb4f59c

2009-11-20 Carsten Dominik <carsten.dominik@gmail.com> * org-agenda.el (org-agenda-diary-entry-in-org-file): Rebuild agenda after adding new entry. * org-datetree.el (org-datetree-find-day-create): Fix regular expression. * org.el (org-display-outline-path): Use a format specifier for message, to avoid problems with heading containing `%'. * org-agenda.el (org-agenda-hide-tags-regexp): New option. (org-format-agenda-item): Call `org-agenda-fix-displayed-tags'. (org-agenda-fix-displayed-tags): New function. (org-agenda-do-context-action): Just call `org-display-outline-path', without piping the result through `message'. * org-latex.el (org-export-latex-preprocess): Protect secondary footnote references. * org-indent.el (org-indent-initialize): Avoid empty strings as line prefixes. * org-agenda.el (org-agenda-diary-entry-in-org-file): Make sure hat checking for the mark does not throw an error. (org-agenda-diary-entry-in-org-file): Catch the case that there is not `day' text property in the cursor line. * org.el (org-sort-entries-or-items): Make sure that the final entry has a newline before doing the sorting. * org-agenda.el (org-agenda-diary-entry-in-org-file): Get the text property at the beginning of the line. * org.el (org-make-link-string): Don't allow a description with only white space. * org-agenda.el (org-agenda-insert-diary-strategy): New variable. (org-agenda-insert-diary-as-top-level): New function. (org-agenda-add-entry-to-org-agenda-diary-file): Call `org-agenda-insert-diary-as-top-level'. * org.el (org-occur-in-agenda-files): Make sure none of the buffers is narrowed. (org-activate-plain-links): Add the face property here. (org-set-font-lock-defaults): Do not add the face to plain links, the activator function does this. * org-habit.el (org-is-habit-p): Add doc string. * org-archive.el (org-archive-subtree-default-with-confirmation): Autoload. * org-latex.el (org-export-latex-fontify): Fix regexp to make char after match optional (happens at the end of a line...). * org.el (org-fontify-meta-lines-and-blocks): Apply special faces for special blocks. * org-faces.el (org-copy-face): Set lisp indentation. (org-quote, org-verse): New faces. * org-agenda.el (org-agenda-remove-date): Remove variable. * org-freemind.el (org-freemind-escape-str-from-org): Fix encoding. * org-html.el (org-export-as-html): Move the home/up link into the content div. * org.el (org-export-latex-packages-alist): Option definition moved here from org-latex.el. * org-html.el (org-export-html-home/up-format): Add an ID to the up/home div. * org-wl.el (org-wl-store-link): Handle the case that `wl-use-petname' is set. * org.el (org-set-effort): Improve prompt. (org-get-outline-path): Widen to get full path. (org-compact-display-after-subtree-move): Function removed. 2009-11-20 Eric Schulte <schulte.eric@gmail.com> * org-exp-blocks.el (org-export-blocks-format-ditaa): Use sha1 hash keys to cache and re-use images generated by the org-exp-blocks interface to ditaa and dot. * org.el (org-format-latex): Latex images are now saved to files named by the sha1 hash of the latex source text avoiding regeneration of identical images.
author Carsten Dominik <dominik@science.uva.nl>
date Fri, 20 Nov 2009 20:50:32 +0000
parents b92e7ae35c75
children 1d1d5d9bd884
comparison
equal deleted inserted replaced
106167:c898329ba7ba 106168:83924fb4f59c
2 ;; 2 ;;
3 ;; Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. 3 ;; Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
4 ;; 4 ;;
5 ;; Emacs Lisp Archive Entry 5 ;; Emacs Lisp Archive Entry
6 ;; Filename: org-latex.el 6 ;; Filename: org-latex.el
7 ;; Version: 6.33c 7 ;; Version: 6.33x
8 ;; Author: Bastien Guerry <bzg AT altern DOT org> 8 ;; Author: Bastien Guerry <bzg AT altern DOT org>
9 ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com> 9 ;; Maintainer: Carsten Dominik <carsten.dominik AT gmail DOT com>
10 ;; Keywords: org, wp, tex 10 ;; Keywords: org, wp, tex
11 ;; Description: Converts an org-mode buffer into LaTeX 11 ;; Description: Converts an org-mode buffer into LaTeX
12 12
253 (defcustom org-export-latex-tables-column-borders nil 253 (defcustom org-export-latex-tables-column-borders nil
254 "When non-nil, grouping columns can cause outer vertical lines in tables. 254 "When non-nil, grouping columns can cause outer vertical lines in tables.
255 When nil, grouping causes only separation lines between groups." 255 When nil, grouping causes only separation lines between groups."
256 :group 'org-export-latex 256 :group 'org-export-latex
257 :type 'boolean) 257 :type 'boolean)
258
259 (defcustom org-export-latex-packages-alist nil
260 "Alist of packages to be inserted in the header.
261 Each cell is of the format \( \"option\" . \"package\" \)."
262 :group 'org-export-latex
263 :type '(repeat
264 (list
265 (string :tag "option")
266 (string :tag "package"))))
267 258
268 (defcustom org-export-latex-low-levels 'itemize 259 (defcustom org-export-latex-low-levels 'itemize
269 "How to convert sections below the current level of sectioning. 260 "How to convert sections below the current level of sectioning.
270 This is specified by the `org-export-headline-levels' option or the 261 This is specified by the `org-export-headline-levels' option or the
271 value of \"H:\" in Org's #+OPTION line. 262 value of \"H:\" in Org's #+OPTION line.
1463 1454
1464 (defun org-export-latex-fontify () 1455 (defun org-export-latex-fontify ()
1465 "Convert fontification to LaTeX." 1456 "Convert fontification to LaTeX."
1466 (goto-char (point-min)) 1457 (goto-char (point-min))
1467 (while (re-search-forward org-emph-re nil t) 1458 (while (re-search-forward org-emph-re nil t)
1468 ;; The match goes one char after the *string* 1459 ;; The match goes one char after the *string*, except at the end of a line
1469 (let ((emph (assoc (match-string 3) 1460 (let ((emph (assoc (match-string 3)
1470 org-export-latex-emphasis-alist)) 1461 org-export-latex-emphasis-alist))
1471 (beg (match-beginning 0)) 1462 (beg (match-beginning 0))
1472 (end (match-end 0)) 1463 (end (match-end 0))
1473 rpl s) 1464 rpl s)
1489 (match-string 4)) 1480 (match-string 4))
1490 (match-string 5))) 1481 (match-string 5)))
1491 (if (caddr emph) 1482 (if (caddr emph)
1492 (setq rpl (org-export-latex-protect-string rpl)) 1483 (setq rpl (org-export-latex-protect-string rpl))
1493 (save-match-data 1484 (save-match-data
1494 (if (string-match "\\`.\\(\\\\[a-z]+{\\)\\(.*\\)\\(}\\).\\'" rpl) 1485 (if (string-match "\\`.\\(\\\\[a-z]+{\\)\\(.*\\)\\(}\\).?\\'" rpl)
1495 (progn 1486 (progn
1496 (add-text-properties (match-beginning 1) (match-end 1) 1487 (add-text-properties (match-beginning 1) (match-end 1)
1497 '(org-protected t) rpl) 1488 '(org-protected t) rpl)
1498 (add-text-properties (match-beginning 3) (match-end 3) 1489 (add-text-properties (match-beginning 3) (match-end 3)
1499 '(org-protected t) rpl))))) 1490 '(org-protected t) rpl)))))
1822 (foot-prefix (match-string 0)) 1813 (foot-prefix (match-string 0))
1823 footnote footnote-rpl) 1814 footnote footnote-rpl)
1824 (save-excursion 1815 (save-excursion
1825 (if (not (re-search-forward (concat "^" (regexp-quote foot-prefix)) 1816 (if (not (re-search-forward (concat "^" (regexp-quote foot-prefix))
1826 nil t)) 1817 nil t))
1827 (replace-match "$^{\\1}$") 1818 (replace-match (org-export-latex-protect-string
1819 (concat "$^{" (match-string 1) "}$")))
1828 (replace-match "") 1820 (replace-match "")
1829 (let ((end (save-excursion 1821 (let ((end (save-excursion
1830 (if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t) 1822 (if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t)
1831 (match-beginning 0) (point-max))))) 1823 (match-beginning 0) (point-max)))))
1832 (setq footnote (concat (org-trim (buffer-substring (point) end)) 1824 (setq footnote (concat (org-trim (buffer-substring (point) end))