How to create a new theorem variation for multiple formats in Quarto? #13194
-
DescriptionI want to be able to create a new theorem variation that is not pointed out in the documentation in relation to Theorems and Proofs for multiple formats in Quarto. In particular, a new theorem environment for an axiom using the label prefix ![]() For example in LaTeX you can do this: \documentclass{article}
\usepackage{amsthm}
\title{My title}
\newtheorem{axiom}{Axiom}
\begin{document}
\maketitle
\section{My section}
\begin{axiom}[Axiom of extension] Two sets are equal if and only if they have the same elements. \end{axiom}
\end{document} What I try using quartoI try a possible solution using an environment listed in Cross Reference Options: ---
title: My title
format:
html:
embed-resources: true
pdf:
number-sections: true
docx: default
crossref:
cnj-title: Axiom
cnj-prefix: Axiom
---
# My section
::: {#cnj-axiom-extension}
## Axiom of extension
Two sets are equal if and only if they have the same elements.
::: However this is a partial solution because I am using a trick. QuestionWhere in the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
This comment has been hidden.
This comment has been hidden.
-
Your best bet is to write a Lua filter and to write the formats' specific code corresponding to your environment. Look at existing extensions: https://m.canouil.dev/quarto-extensions/ There are some specific extensions to help create environment in Typst and LaTeX: |
Beta Was this translation helpful? Give feedback.
GitHub has a pretty good search engine either by filenames and/or content.
Note that if your goal is to mimic Quarto's internal into your own Quarto extensions, this isn't going to work.