[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Org LaTeX Beamer export and the order of loading packages and theme (XeL
From: |
Lennart C. Karssen |
Subject: |
Org LaTeX Beamer export and the order of loading packages and theme (XeLaTeX and fonts) |
Date: |
Tue, 9 Jan 2024 12:02:14 +0000 |
User-agent: |
Mozilla Thunderbird |
Dear list,
I have been happily using the LaTeX Beamer export for several years.
Recently, I had to update one of the themes I use for the slides and ran
into a problem related to the order in which the theme and the LaTeX
packages are exported to the .tex file.
I use XeLaTeX to compile my documents so I can use fonts like Fira Sans
in my slides. For this, I load the fontspec package in my Beamer theme
font file. The Org export code puts the #+BEAMER_THEME options after the
packages loaded org-latex-packages-alist (and those specified on
#+LATEX_HEADER lines) in the LaTeX preamble. In my case this gives a
font problem, because my org-latex-packages-alist loads the polyglossia
package (which loads the fontspec package needed for the fonts), but my
beamer theme also tries to load fontspec and somehow (probably related
to options passed to fontspec), this leads to different (unwanted)
behaviour.
The desired behaviour would be to have sans-serif math in my equations,
which works fine if I load my theme before loading other packages (in
pure LaTeX). However, in the case of Org export, the \usetheme{}
commands ends up after the \usepackage lines, which leads to serif fonts
in my equations.
So my questions are basically the following:
1) Is there a way to tell Org to export the #+BEAMER_THEME lines before
anything else?
2) Is there a reason why the Beamer theme options are exported after
other LaTeX packages? Wouldn't it be better to export the Beamer theme
options before loading additional packages? The reason for that being
that the theme sets defaults, which can then (potentially) be altered by
loading additional packages.
Best regards,
Lennart Karssen.
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
's-Hertogenbosch
The Netherlands
lennart@karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Org LaTeX Beamer export and the order of loading packages and theme (XeLaTeX and fonts),
Lennart C. Karssen <=