Added typstyle action
This commit is contained in:
parent
cb3e27429f
commit
df28a09214
15
.github/workflows/lints.yml
vendored
15
.github/workflows/lints.yml
vendored
@ -13,3 +13,18 @@ jobs:
|
|||||||
uses: crate-ci/typos@master
|
uses: crate-ci/typos@master
|
||||||
with:
|
with:
|
||||||
config: ./tools/typos.toml
|
config: ./tools/typos.toml
|
||||||
|
|
||||||
|
typstyle:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: "Download Typstyle"
|
||||||
|
run: |
|
||||||
|
wget -q "https://github.com/Enter-tainer/typstyle/releases/download/v0.12.14/typstyle-x86_64-unknown-linux-musl"
|
||||||
|
chmod +x typstyle-x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
- name: Check typst formatting
|
||||||
|
run: |
|
||||||
|
find . -name "*.typ" -type f -print0 | xargs -0 \
|
||||||
|
./typstyle-x86_64-unknown-linux-musl --check
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
"latex-workshop.latex.recipe.default": "latexmk (xelatex)"
|
"latex-workshop.latex.recipe.default": "latexmk (xelatex)",
|
||||||
|
"tinymist.formatterPrintWidth": 80
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
#let show_solutions = {
|
#let show_solutions = {
|
||||||
if "show_solutions" in sys.inputs {
|
if "show_solutions" in sys.inputs {
|
||||||
// Show solutions unless they're explicitly disabled
|
// Show solutions unless they're explicitly disabled
|
||||||
not (sys.inputs.show_solutions == "false" or sys.inputs.show_solutions == "no")
|
not (
|
||||||
|
sys.inputs.show_solutions == "false" or sys.inputs.show_solutions == "no"
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
// Show solutions by default
|
// Show solutions by default
|
||||||
true
|
true
|
||||||
@ -91,7 +93,12 @@
|
|||||||
#let preparedby(name) = (
|
#let preparedby(name) = (
|
||||||
text(
|
text(
|
||||||
size: 10pt,
|
size: 10pt,
|
||||||
[Prepared by ] + name + [ on ] + datetime.today().display("[month repr:long] [day padding:none], [year]"),
|
[Prepared by ]
|
||||||
|
+ name
|
||||||
|
+ [ on ]
|
||||||
|
+ datetime
|
||||||
|
.today()
|
||||||
|
.display("[month repr:long] [day padding:none], [year]"),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -76,7 +76,13 @@ Draw a graph of the tropical polynomial $f(x) = x^2 #tp 1x #tp 4$. \
|
|||||||
dotline((0, 1 * step), (7 * step, 8 * step))
|
dotline((0, 1 * step), (7 * step, 8 * step))
|
||||||
dotline((0, 4 * step), (8 * step, 4 * step))
|
dotline((0, 4 * step), (8 * step, 4 * step))
|
||||||
|
|
||||||
line((0, 0), (1 * step, 2 * step), (3 * step, 4 * step), (7.5 * step, 4 * step), stroke: 1mm + oblue)
|
line(
|
||||||
|
(0, 0),
|
||||||
|
(1 * step, 2 * step),
|
||||||
|
(3 * step, 4 * step),
|
||||||
|
(7.5 * step, 4 * step),
|
||||||
|
stroke: 1mm + oblue,
|
||||||
|
)
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -138,7 +144,13 @@ Graph $f(x) = -2x^2 #tp x #tp 8$. \
|
|||||||
dotline((0.5 * step, 0), (4 * step, 8 * step))
|
dotline((0.5 * step, 0), (4 * step, 8 * step))
|
||||||
dotline((0, 4 * step), (8 * step, 4 * step))
|
dotline((0, 4 * step), (8 * step, 4 * step))
|
||||||
|
|
||||||
line((0.5 * step, 0), (1 * step, 1 * step), (4 * step, 4 * step), (7.5 * step, 4 * step), stroke: 1mm + oblue)
|
line(
|
||||||
|
(0.5 * step, 0),
|
||||||
|
(1 * step, 1 * step),
|
||||||
|
(4 * step, 4 * step),
|
||||||
|
(7.5 * step, 4 * step),
|
||||||
|
stroke: 1mm + oblue,
|
||||||
|
)
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -212,7 +224,12 @@ Graph $f(x) = 1x^2 #tp 3x #tp 5$.
|
|||||||
dotline((0, 5 * step), (8 * step, 5 * step))
|
dotline((0, 5 * step), (8 * step, 5 * step))
|
||||||
dotline((0, 3 * step), (5 * step, 8 * step))
|
dotline((0, 3 * step), (5 * step, 8 * step))
|
||||||
|
|
||||||
line((0, 1 * step), (2 * step, 5 * step), (7.5 * step, 5 * step), stroke: 1mm + oblue)
|
line(
|
||||||
|
(0, 1 * step),
|
||||||
|
(2 * step, 5 * step),
|
||||||
|
(7.5 * step, 5 * step),
|
||||||
|
stroke: 1mm + oblue,
|
||||||
|
)
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -256,7 +273,12 @@ Graph $f(x) = 2x^2 #tp 4x #tp 4$.
|
|||||||
dotline((0, 4 * step), (5 * step, 8 * step))
|
dotline((0, 4 * step), (5 * step, 8 * step))
|
||||||
dotline((0, 4 * step), (8 * step, 4 * step))
|
dotline((0, 4 * step), (8 * step, 4 * step))
|
||||||
|
|
||||||
line((0, 2 * step), (1 * step, 4 * step), (7.5 * step, 4 * step), stroke: 1mm + oblue)
|
line(
|
||||||
|
(0, 2 * step),
|
||||||
|
(1 * step, 4 * step),
|
||||||
|
(7.5 * step, 4 * step),
|
||||||
|
stroke: 1mm + oblue,
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user