* LaTeX (not Beamer) export options
@ 2017-12-14 17:05 Ken Mankoff
2017-12-15 12:12 ` Eric S Fraga
0 siblings, 1 reply; 3+ messages in thread
From: Ken Mankoff @ 2017-12-14 17:05 UTC (permalink / raw)
To: Org Mode
Hi Org List,
Is there an easy way to specify #+LATEX_HEADER options that will not be used when exporting to Beamer? I can do the opposite - #+BEAMER_HEADER lines are not exported to LaTeX. But I have some LaTeX config options that are getting in the way when exporting to Beamer.
Thanks,
-k.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LaTeX (not Beamer) export options
2017-12-14 17:05 LaTeX (not Beamer) export options Ken Mankoff
@ 2017-12-15 12:12 ` Eric S Fraga
2017-12-18 15:56 ` Ken Mankoff
0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2017-12-15 12:12 UTC (permalink / raw)
To: Ken Mankoff; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
On Thursday, 14 Dec 2017 at 18:05, Ken Mankoff wrote:
> Hi Org List,
>
> Is there an easy way to specify #+LATEX_HEADER options that will not
> be used when exporting to Beamer? I can do the opposite
> -#+BEAMER_HEADER lines are not exported to LaTeX. But I have some
> LaTeX config options that are getting in the way when exporting to
> Beamer.
Hopefully somebody else will answer with a proper org solution but, in
the absence of anything else, you could wrap the LaTeX code in the
latex_header with an \if looking for something that is unique to beamer
and only include the code if not beamer. Something along the lines of
#+latex_header: \ifx\frametitle\undefined\usepackage{somepackage}\fi
which seems to work. \usepackage{somepackage} is what you actually want
when not using beamer. Replace with your own stuff. You can make it
more readable by doing:
# only for LaTeX and not beamer
#+latex_header: \ifx\frametitle\undefined
#+latex_header: \usepackage{somepackage}
#+latex_header: \usepackage{another}
#+latex_header: \fi
HTH,
eric
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LaTeX (not Beamer) export options
2017-12-15 12:12 ` Eric S Fraga
@ 2017-12-18 15:56 ` Ken Mankoff
0 siblings, 0 replies; 3+ messages in thread
From: Ken Mankoff @ 2017-12-18 15:56 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Org Mode
Hi Eric,
On 2017-12-15 at 12:12, Eric S Fraga <esflists@gmail.com> wrote:
> On Thursday, 14 Dec 2017 at 18:05, Ken Mankoff wrote:
>> Is there an easy way to specify #+LATEX_HEADER options that will not
>> be used when exporting to Beamer?
>
> #+latex_header: \ifx\frametitle\undefined\usepackage{somepackage}\fi
>
> which seems to work. \usepackage{somepackage} is what you actually want
> when not using beamer. Replace with your own stuff. You can make it
> more readable by doing:
>
> # only for LaTeX and not beamer
> #+latex_header: \ifx\frametitle\undefined
> #+latex_header: \usepackage{somepackage}
> #+latex_header: \usepackage{another}
> #+latex_header: \fi
Thanks for this solution. Unless there is a more formal solution, or until someone implements #+LATEX_ONLY_HEADER, this works well. Thank you!
-k.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-18 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 17:05 LaTeX (not Beamer) export options Ken Mankoff
2017-12-15 12:12 ` Eric S Fraga
2017-12-18 15:56 ` Ken Mankoff
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).