summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-07-06 14:55:47 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-07-06 14:55:47 +0200
commitb7157cc6661833fbd17b791458f1f6ce965328ae (patch)
treeb31ae4c6ee2b825c0aca4032bbf92f8c41530d1f
parent4f26d13f52b5b53583acb3a030f83c4e57c3dfdb (diff)
downloadorg-mode-b7157cc6661833fbd17b791458f1f6ce965328ae.tar.gz
Beamer: Put extra header last in header
* lisp/org-beamer.el (org-beamer-amend-header): Put extra header last in header. Tassilo Horn writes: > I'm doing a LaTeX beamer presentation with org. The org doc starts with > these lines: > > --8<---------------cut here---------------start------------->8--- > #+STARTUP: beamer > #+LaTeX_CLASS: beamer > #+TITLE: Implementieren, Integrieren, Installieren > #+AUTHOR: Tassilo Horn > #+EMAIL: horn@uni-koblenz.de > #+LANGUAGE: de > #+BEAMER_FRAME_LEVEL: 2 > #+LaTeX_CLASS_OPTIONS: [presentation] > #+BEAMER_HEADER_EXTRA: \usetheme[secheader]{Boadilla} \institute{Universität Koblenz, IST} > --8<---------------cut here---------------end--------------->8--- > > In the presentation, the ä in Universität is printed as an A with a ~ on > top, followed by a d'. The reason is that the BEAMER_HEADER_EXTRA is > put before the input encoding declaration. To be clear, org produces a > TeX file that starts with > > --8<---------------cut here---------------start------------->8--- > % Created 2010-07-06 Tue 08:57 > \documentclass[presentation]{beamer} > \usetheme[secheader]{Boadilla} \institute{Universität Koblenz, IST} > \usepackage[utf8]{inputenc} > \usepackage[T1]{fontenc} > --8<---------------cut here---------------end--------------->8--- > > but it should be at least: > > --8<---------------cut here---------------start------------->8--- > % Created 2010-07-06 Tue 08:57 > \documentclass[presentation]{beamer} > \usepackage[utf8]{inputenc} > \usetheme[secheader]{Boadilla} \institute{Universität Koblenz, IST} > \usepackage[T1]{fontenc} > --8<---------------cut here---------------end--------------->8--- > > In general, I'd say that it would be even more safe to put the extra > headers below all default headers.
-rw-r--r--lisp/org-beamer.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-beamer.el b/lisp/org-beamer.el
index af7887f..1530bfc 100644
--- a/lisp/org-beamer.el
+++ b/lisp/org-beamer.el
@@ -390,8 +390,8 @@ the value will be inserted right after the documentclass statement."
((re-search-forward "^[ \t]*BEAMER-HEADER-EXTRA-HERE[ \t]*$" nil t)
(replace-match org-beamer-header-extra t t)
(or (bolp) (insert "\n")))
- ((re-search-forward "^[ \t]*\\\\documentclass\\>" nil t)
- (beginning-of-line 2)
+ ((re-search-forward "^[ \t]*\\\\begin{document}" nil t)
+ (beginning-of-line 1)
(insert org-beamer-header-extra)
(or (bolp) (insert "\n"))))))