소스 검색

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{Universitt Koblenz, IST}
> --8<---------------cut here---------------end--------------->8---
>
> In the presentation, the  in Universitt 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{Universitt 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{Universitt 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.
Carsten Dominik 14 년 전
부모
커밋
b7157cc666
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lisp/org-beamer.el

+ 2 - 2
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"))))))