New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beamer and theorems #3650
Comments
xelatex offers unicode support that pdflatex doesn't; you can always switch the pdf engine yourself, but we do care deeply about internationalization and pdflatex doesn't offer a sufficiently good path forward. So we're sticking with xelatex. |
@cscheid You get the same unicode support with lualatex without all the disadvantages of xelatex A bit of background on xelatex vs. lualatex https://www.reddit.com/r/LaTeX/comments/rrrfbz/comment/hqkwgnb/?utm_source=share&utm_medium=web2x&context=3 (the answer by @ zauguin) |
Note- for the original issue regarding theorems, you can workaround the error by disabling theorems in Beamer using:
Also note to self- consider revisiting |
There are a lot of feedback in the first post. I haven't process all but just wanted to add a few things: @sam Regarding anything on the Regarding the theorems now and the conflict, there is a workaround which not to use the cross refer theorem feature in your beamer slide. Using it will trigger the insertion of definition in the doc, which conflicts as you said. However, you could use Example
Drawback is that cross referencing using Quarto syntax is not possible.
@dragonstyle FWIW this is the approach we have taken in bookdown at the time when we needed to solve the same issue. (rstudio/bookdown#1143 and PR rstudio/bookdown#1145) However, when using It is the same issue in Quarto for now I think - no easy way to use ---
title: "Example"
format:
beamer:
theme: Xiaoshan # https://www.ctan.org/pkg/pgfornament-han
filters:
- latex-environment
environments: [fact, problem]
---
## some blocks
::: {#thm-1}
## Metropolis
A theorem
:::
::: {#lem-1}
## Metropolis
A lemma
:::
See @thm-1 and @lem-1.
## Some other blocks
::: {.fact options="A fact"}
Some interesting stuff
:::
::: {.problem}
A problem
:::
In bookdown, we allow the user to opt-out auto addition of definition to provide it manually - if so, cross ref still works. options(bookdown.theorem.enabled = FALSE) Sharing as this can be useful to think about if we want to / can provide same flexibility |
I ran into the same issue with the JuliaCon proceedings class (https://github.com/JuliaCon/JuliaConSubmission.jl/blob/d574a4f172a1074abbf23f93719f9811bfeaa7c3/paper/juliacon.cls): It already defines I worked around this issue with |
I was wondering, if one possible approach could be to only set an option (e.g., |
Bug description
With quarto 1.3.49 on macOS 11.6, a simple test document with a theorem (https://stackoverflow.com/q/74780867/2777074)
will lead to a non-compilable document, because you try to define the already defined
theorem
environment. It would be better to check if an environment already exists before you try to define it.Some other comments about the generated .tex file:
with current hyperref, the unicode option is hardly necessary, it is now the default
this will cause problems further down
unnecessary. Even if note pages are shown, beamer will load it automatically
unnecessary, beamer loads them by default
unnecessary, that's the default for several years now
unnecessary, beamer loads it by default
unnecessary, beamer loads them by default
makes no sense in a class without floating mechanism
Why? A couple of lines above you force loading the caption package
unnecessary, beamer loads them by default
you've already loaded it two times, now three and the next line will also load it
hyperref is loaded by default in beamer
you are loading the beamer class with the ignorenonframetext option. This redefinition will never be seen
(It seems that xelatex is the default engine. Is this really such a good idea? It neither has the speed advantage of pdflatex, nor the goodies of lualatex but comes with a truck load of problems, like missing text on beamer note pages, incorrect uncovering of overlays...)
Checklist
The text was updated successfully, but these errors were encountered: