From: "Lennart C. Karssen" <lennart@karssen.org>
To: Emacs orgmode <emacs-orgmode@gnu.org>
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 [thread overview]
Message-ID: <0aba4e92-b878-4a37-b0e2-0848dcbef5a2@karssen.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1947 bytes --]
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
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next reply other threads:[~2024-01-09 12:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 12:02 Lennart C. Karssen [this message]
2024-01-09 22:15 ` Org LaTeX Beamer export and the order of loading packages and theme (XeLaTeX and fonts) Ihor Radchenko
2024-01-09 22:23 ` Lennart C. Karssen
2024-02-12 13:20 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0aba4e92-b878-4a37-b0e2-0848dcbef5a2@karssen.org \
--to=lennart@karssen.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).