forked from quarto-ext/typst-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
86 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.DS_Store | ||
|
||
/.luarc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ams.png | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,46 @@ | ||
# Ams Format | ||
# Typst AMS Format | ||
|
||
## Installing | ||
Based on the AMS template published by the Typst team at <https://typst/typst-templates/ams>. | ||
|
||
**NOTE**: This format requires the pre-release version of Quarto v1.4, which you can download here: <https://quarto.org/docs/download/prerelease>. | ||
|
||
_TODO_: Replace the `<github-organization>` with your GitHub organization. | ||
## Installing | ||
|
||
```bash | ||
quarto use template <github-organization>/ams | ||
quarto use template quarto-ext/typst-templates/ams | ||
``` | ||
|
||
This will install the format extension and create an example qmd file | ||
that you can use as a starting place for your document. | ||
This will install the extension and create an example qmd file that you can use as a starting place for your document. | ||
|
||
## Using | ||
|
||
_TODO_: Describe how to use your format. | ||
The example qmd demonstrates the document options supported by the IEE format (`title`, `authors`, `abstract`, `bibliography`, etc.). For example, your document options might look something like this: | ||
|
||
```yaml | ||
--- | ||
title: "Mathematical Theorems" | ||
authors: | ||
- name: Ralph Howard | ||
email: "[email protected]" | ||
url: "www.math.sc.edu/~howard" | ||
affiliations: | ||
- name: University of South Carolina | ||
department: Department of Mathematics | ||
city: Columbia | ||
state: SC | ||
postal-code: 29208 | ||
abstract: | | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Curabitur ex justo, pretium nec ante mattis, ultricies | ||
ultricies magna. Duis neque nulla, feugiat a consectetur id, | ||
fermentum a lorem. Vivamus sit amet est interdum, eleifend | ||
libero in, rutrum lorem. | ||
format: | ||
ams-typst: default | ||
bibliography: refs.bib | ||
--- | ||
``` | ||
|
||
This document Would be rendered as: | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
function Div(el) | ||
if el.classes:includes('ams-theorem') then | ||
local args = '' | ||
if el.attributes['numbered'] == "false" then | ||
args = '(numbered: false)' | ||
end | ||
local blocks = pandoc.List({ | ||
pandoc.RawBlock('typst', '#theorem' .. args .. '[') | ||
}) | ||
blocks:extend(el.content) | ||
blocks:insert(pandoc.RawBlock('typst', ']\n')) | ||
return blocks | ||
elseif el.classes:includes('ams-proof') then | ||
local blocks = pandoc.List({ | ||
pandoc.RawBlock('typst', '#proof[') | ||
}) | ||
blocks:extend(el.content) | ||
blocks:insert(pandoc.RawBlock('typst', ']\n')) | ||
return blocks | ||
end | ||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters