diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-07 07:52:43 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-07 07:52:43 +0200 |
commit | b385c98d2686a49833be22b6c2cfd03a6d345daf (patch) | |
tree | e0fdbb33fcb832432d61bcdd3544547bc0cdd806 | |
parent | 929ef2da1bf020a1d9a10f89866b941651454182 (diff) | |
download | org-mode-b385c98d2686a49833be22b6c2cfd03a6d345daf.tar.gz |
Fix some problems with the new LaTeX setup
-rw-r--r-- | lisp/org.el | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/lisp/org.el b/lisp/org.el index 9dfd1d6..ee79358 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -2943,6 +2943,8 @@ will be appended." (defcustom org-export-latex-default-packages-alist '(("AUTO" "inputenc") ("T1" "fontenc") + ("" "textcomp") + ("" "fixltx2e") ("" "graphicx") ("" "longtable") ("" "float") @@ -2954,7 +2956,10 @@ will be appended." ("" "wasysym") ("" "latexsym") ("" "amssymb") - ("" "hyperref")) + ("" "hyperref") +; ("" "microtype") + "\\tolerance=1000" + ) "Alist of default packages to be inserted in the header. Change this only if one of the packages here causes an incompatibility with another package you are using. @@ -2976,9 +2981,11 @@ some other package that conflicts with one of the default packages. Each cell is of the format \( \"options\" \"package\" \)." :group 'org-export-latex :type '(repeat - (list - (string :tag "options") - (string :tag "package")))) + (choice + (string :tag "A line of LaTeX") + (list :tag "options/package pair" + (string :tag "options") + (string :tag "package"))))) (defcustom org-export-latex-packages-alist nil "Alist of packages to be inserted in every LaTeX the header. @@ -2991,9 +2998,11 @@ Make sure that you only lis packages here which: - do not conflict with the setup in `org-format-latex-header'." :group 'org-export-latex :type '(repeat - (list - (string :tag "options") - (string :tag "package")))) + (choice + (string :tag "A line of LaTeX") + (list :tag "options/package pair" + (string :tag "options") + (string :tag "package"))))) (defgroup org-appearance nil "Settings for Org-mode appearance." @@ -15332,7 +15341,7 @@ EXTRA is a string." (setq rpl (if (or (match-end 1) (not extra)) "" (concat extra "\n")) tpl (replace-match rpl t t tpl)) - (if pkg (setq end (org-latex-packages-to-string pkg)))) + (if pkg (setq end (concat end "\n" (org-latex-packages-to-string pkg))))) (if (string-match "\\S-" end) (concat tpl "\n" end) @@ -15341,10 +15350,13 @@ EXTRA is a string." (defun org-latex-packages-to-string (pkg &optional newline) "Turn an alist of packages into a string with the \\usepackage macros." (setq pkg (mapconcat (lambda(p) - (if (equal "" (car p)) - (format "\\usepackage{%s}" (cadr p)) + (cond + ((stringp p) p) + ((equal "" (car p)) + (format "\\usepackage{%s}" (cadr p))) + (t (format "\\usepackage[%s]{%s}" - (car p) (cadr p)))) + (car p) (cadr p))))) pkg "\n")) (if newline (concat pkg "\n") pkg)) |