Quarto PDF book: "LaTeX Error: Environment abstract undefined" #11193
Unanswered
isaactpetersen
asked this question in
Q&A
Replies: 1 comment
-
Use profiles, see https://quarto.org/docs/projects/profiles.html. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I posted this question on Posit forums a week ago but haven't received any responses (https://forum.posit.co/t/quarto-pdf-book-latex-error-environment-abstract-undefined/194119).
I am writing a quarto book. I include
abstract:
underbook:
in the_quarto.yml
file. My GitHub Actions knits the file to several output formats (HTML, EPUB, and PDF). Knitting to HTML and EPUB works fine. However, knitting to PDF errors out with the following error:The error is because my LaTeX document class (krantz) does not include an abstract environment, as noted in the following forum posts:
However, it is "by design" that my document class does not include an abstract environment. I don't want the abstract to appear in the PDF version, if possible, because I want to use the krantz document class. Yet I still want to include the Abstract in the HTML version. And I'd prefer not to have to maintain separate
_quarto.yml
files for HTML vs PDF outputs.To try to address this, I moved
abstract:
to theformat:
section. This allows the book to be knitted to each format--i.e., it no longer results in an error; however, it results in the abstract being printed on every page/chapter of the HTML, as described in the following discussion: #2282.Any help would be greatly appreciated. Basically, I want to accomplish the following:
_quarto.yml
files for the HTML, EPUB, and PDF versionsThanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions