Mercurial > emacs
comparison lisp/org/org-export-latex.el @ 101517:9f423e131117
* org-export-latex.el (org-export-as-latex): Call
`org-export-latex-first-lines' with OPT-PLIST as a parameter.
(org-export-latex-first-lines): New parameter OPT-PLIST.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Mon, 26 Jan 2009 08:40:19 +0000 |
parents | 64ef70f990a9 |
children | f5aedb5cbd80 |
comparison
equal
deleted
inserted
replaced
101516:e7f67dc08ae3 | 101517:9f423e131117 |
---|---|
432 (header (org-export-latex-make-header title opt-plist)) | 432 (header (org-export-latex-make-header title opt-plist)) |
433 (skip (cond (subtree-p nil) | 433 (skip (cond (subtree-p nil) |
434 (region-p nil) | 434 (region-p nil) |
435 (t (plist-get opt-plist :skip-before-1st-heading)))) | 435 (t (plist-get opt-plist :skip-before-1st-heading)))) |
436 (text (plist-get opt-plist :text)) | 436 (text (plist-get opt-plist :text)) |
437 (first-lines (if skip "" (org-export-latex-first-lines rbeg))) | 437 (first-lines (if skip "" (org-export-latex-first-lines opt-plist rbeg))) |
438 (coding-system (and (boundp 'buffer-file-coding-system) | 438 (coding-system (and (boundp 'buffer-file-coding-system) |
439 buffer-file-coding-system)) | 439 buffer-file-coding-system)) |
440 (coding-system-for-write (or org-export-latex-coding-system | 440 (coding-system-for-write (or org-export-latex-coding-system |
441 coding-system)) | 441 coding-system)) |
442 (save-buffer-coding-system (or org-export-latex-coding-system | 442 (save-buffer-coding-system (or org-export-latex-coding-system |
769 (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\\vspace*{1cm}\n" | 769 (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\\vspace*{1cm}\n" |
770 (min toc (plist-get opt-plist :headline-levels)))) | 770 (min toc (plist-get opt-plist :headline-levels)))) |
771 (toc (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\\vspace*{1cm}\n" | 771 (toc (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\\vspace*{1cm}\n" |
772 (plist-get opt-plist :headline-levels)))))))) | 772 (plist-get opt-plist :headline-levels)))))))) |
773 | 773 |
774 (defun org-export-latex-first-lines (&optional beg) | 774 (defun org-export-latex-first-lines (opt-plist &optional beg) |
775 "Export the first lines before first headline. | 775 "Export the first lines before first headline. |
776 If BEG is non-nil, the is the beginning of he region." | 776 If BEG is non-nil, the is the beginning of he region." |
777 (save-excursion | 777 (save-excursion |
778 (goto-char (or beg (point-min))) | 778 (goto-char (or beg (point-min))) |
779 (if (org-at-heading-p) (beginning-of-line 2)) | 779 (if (org-at-heading-p) (beginning-of-line 2)) |