From 86f9e3ae9acc04a27d97f8e009b53ae81dea43f3 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 21 Jan 2025 20:29:10 -0800 Subject: [PATCH] Added typstyle action --- .github/workflows/lints.yml | 15 ++++++++++ .../parts/01 polynomials.typ | 30 ++++++++++++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 3b96eb9..07da921 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -13,3 +13,18 @@ jobs: uses: crate-ci/typos@master with: 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 . -type f -print0 | xargs -0 \ + ./typstyle-x86_64-unknown-linux-musl --check diff --git a/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ b/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ index fe980de..08ebc0c 100644 --- a/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ +++ b/src/Advanced/Tropical Polynomials/parts/01 polynomials.typ @@ -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, 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, 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, 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), (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, + ) }), )