Stream: Archive Mirror: Isabelle Users Mailing List

Topic: [isabelle] using beamer in document preparation


view this post on Zulip Email Gateway (Aug 22 2022 at 11:40):

From: Buday Gergely <gbuday@karolyrobert.hu>
Hi,

the archives say from 2008 that it is straightforward to create slides with beamer and Isabelle:

https://lists.cam.ac.uk/mailman/htdig/cl-isabelle-users/2008-December/msg00029.html

I created a minimal example theory-imports-main-begin, a ROOT file and rewrote document/root.tex to use the beamer class and the build has failed. Running pdflatex directly in output/document resulted in

! LaTeX Error: Option clash for package hyperref.

according to

http://tex.stackexchange.com/questions/203045/latex-error-option-clash-for-package-hyperref

this is because of inconsistent invocations of the hyperref package. I could not find any

\usepackage{hyperref}

in output/document.

How can I fix this? Is beamer the recommended way to create slides of an Isabelle session?

view this post on Zulip Email Gateway (Aug 22 2022 at 11:41):

From: Makarius <makarius@sketis.net>
LaTeX is inherently non-compositional. Style files and packages routinely
cause clashes of options, macros etc.

The included pdfsetup.sty is merely an example, which happens to be used
by default for most documents. You can just ignore it, and imitate the 3
lines it contains in your own root.tex, or do something completely
different.

Makarius

view this post on Zulip Email Gateway (Aug 22 2022 at 11:41):

From: Buday Gergely <gbuday@karolyrobert.hu>
Makarius wrote:

LaTeX is inherently non-compositional. Style files and packages routinely cause
clashes of options, macros etc.

Is there a better way to typeset scientific documents?

view this post on Zulip Email Gateway (Aug 22 2022 at 11:43):

From: Buday Gergely <gbuday@karolyrobert.hu>

I created a minimal example theory-imports-main-begin, a ROOT file and
rewrote document/root.tex to use the beamer class and the build has failed.
Running pdflatex directly in output/document resulted in

! LaTeX Error: Option clash for package hyperref.
...
this is because of inconsistent invocations of the hyperref package. I could not
find any

\usepackage{hyperref}

in output/document.

Because it is with options in pdfsetup.thy .

My ad-hoc solution was to create a beamerpdfsetup.sty, list it at document_files in the ROOT file and make root.tex use this beamerpdfsetup.sty.

http://tex.stackexchange.com/questions/224111/error-option-clash-for-package-hyperref

suggests that instead of

\usepackage[colorlinks=true,linkcolor=linkcolor,citecolor=linkcolor,filecolor=linkcolor,pagecolor=linkcolor,urlcolor=linkcolor]{hyperref}

one should use

\hypersetup{colorlinks=true,linkcolor=linkcolor,citecolor=linkcolor,filecolor=linkcolor,pagecolor=linkcolor,urlcolor=linkcolor}

to avoid the double invocation of the hyperref package, as beamer.cls already invokes it. This works now.

I do not know whether this is backwards compatible with non-beamer classes. If there is an interest I can investigate this.


Last updated: Apr 26 2024 at 20:16 UTC