Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update typst tool tip blog #150

Merged
merged 2 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/blog-metas/1003.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"postDate": "2023-12-22T14:52:11.831Z",
"updateDate": "2024-11-24T04:18:44.722Z"
"updateDate": "2024-12-07T04:12:28.607Z"
}
3 changes: 2 additions & 1 deletion src/content/blog-metas/2024-11-28-esbuild-lambda-layer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"postDate": "2024-11-28T06:11:46.788Z"
"postDate": "2024-11-28T06:11:46.788Z",
"updateDate": "2024-12-07T04:12:28.608Z"
}
23 changes: 21 additions & 2 deletions src/content/blogs/1003.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 覚えておくと便利なTypstの文法
title: 覚えておくと便利なTypstの小技
description: 組版システムTypstのドキュメントにないけど覚えておくと便利な小技を紹介します。
tags: [advent-calendar, typst]
category: tech
Expand All @@ -8,7 +8,7 @@ author: miyaji

この記事は[OUCC Advent Calendar 2023](https://adventar.org/calendars/9315)の23日目の記事です。前回の記事はあいうえおさんの[PowerPointの音声ファイルをWhisperで文字起こししてみた](/blog/articles/powerpoint-whisper)でした。

Typst を授業のレポートに使う中でドキュメントなどからは読み取りづらいが、知っておいたほうが良いという文法がいくつかあったので紹介します
Typst を授業のレポートに使う中でドキュメントなどからは読み取りづらいが、知っておいたほうが良いという文法や使用法がいくつかあったので紹介します

## Typstとは

Expand Down Expand Up @@ -113,6 +113,25 @@ type myfunc_with = (value: number) => (() => number)
$ f(x) = a x $ <label>
```

## SVGで複数ページ出力するには`{p}`を使う

`{p}`で出力ファイルにページ番号をつけて、複数ページのSVGを出力することができます。

```bash
typst compile input.typ output{p}.svg
```

また、これは直接関係しないのですがPowerShellで`{}`を使うと変数展開になるので、`` `{p`}``のようにバッククオートでエスケープする必要があります。
## コマンドラインから入力を与えられる

`--input key=value`のように入力を与えることができます。これは`sys.inputs.key`で文字列として参照できます。

```bash
typst compile --input key=value input.typ
```

[System Functions - Typst Documentation](https://typst.app/docs/reference/foundations/sys/)

## 最後に

Typstはまだまだ機能があるのでうまく使いこなせるように勉強します。
Expand Down
2 changes: 2 additions & 0 deletions src/content/blogs/2024-11-28-esbuild-lambda-layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ author: miyaji
tags: ["advent-calendar", "esbuild", "javascript", "aws", "aws-lambda", "aws-cdk"]
---

この記事は [OUCC Advent Calendar 2024](https://adventar.org/calendars/10655) の 1日目の記事です。

CDKでLambdaには`NodejsFunction`というバンドルとminifyを行うConstructがあるものの、Lambda Layerにはそのようなものがありません。そこで、esbuildを使ってLambdaとLambda Layerの両方のバンドルを行なっていきます。

## esbuildのCode Splitting
Expand Down
4 changes: 4 additions & 0 deletions src/content/tags/advent-calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"name": "Advent Calendar",
"description": "12月に部員が投稿するアドベントカレンダーの記事です。",
"links": [
{
"url": "https://adventar.org/calendars/10655",
"text": "OUCC Advent Calendar 2024 - Adventar"
},
{
"url": "https://adventar.org/calendars/9315",
"text": "OUCC Advent Calendar 2023 - Adventar"
Expand Down