From 84811d84c101a2637079bc5cd797fc95451c1142 Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Sat, 27 Sep 2025 01:01:31 +0900 Subject: [PATCH 1/7] =?UTF-8?q?`/docs/reference/svg/`=E3=81=AE=E7=BF=BB?= =?UTF-8?q?=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/translation-status.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/translation-status.json b/website/translation-status.json index 35540d3ce..97b3d38a3 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -165,7 +165,7 @@ "/docs/reference/html/elem/": "untranslated", "/docs/reference/html/frame/": "untranslated", "/docs/reference/png/": "untranslated", - "/docs/reference/svg/": "untranslated", + "/docs/reference/svg/": "translated", "/docs/guides/": "translated", "/docs/guides/guide-for-latex-users/": "untranslated", "/docs/guides/page-setup-guide/": "untranslated", From c214c880a8b7a8963499bc54a618eb0a67bbe53a Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Sat, 27 Sep 2025 13:53:25 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=E7=BF=BB=E8=A8=B3=E5=AE=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/reference/export/svg.md | 96 ++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/reference/export/svg.md b/docs/reference/export/svg.md index 630ab8452..df3a9ba6c 100644 --- a/docs/reference/export/svg.md +++ b/docs/reference/export/svg.md @@ -1,48 +1,48 @@ -Instead of creating a PDF, Typst can also directly render pages to scalable -vector graphics (SVGs), which are the preferred format for embedding vector -graphics in web pages. Like PDF files, SVGs display your document exactly how -you have laid it out in Typst. Likewise, they share the benefit of not being -bound to a specific resolution. Hence, you can print or view SVG files on any -device without incurring a loss of quality. (Note that font printing quality may -be better with a PDF.) In contrast to a PDF, an SVG cannot contain multiple -pages. When exporting a multi-page document, Typst will emit multiple SVGs. - -SVGs can represent text in two ways: By embedding the text itself and rendering -it with the fonts available on the viewer's computer or by embedding the shapes -of each glyph in the font used to create the document. To ensure that the SVG -file looks the same across all devices it is viewed on, Typst chooses the latter -method. This means that the text in the SVG cannot be extracted automatically, -for example by copy/paste or a screen reader. If you need the text to be -accessible, export a PDF or HTML file instead. - -SVGs can have transparent backgrounds. By default, Typst will output an SVG with -an opaque white background. You can make the background transparent using -`[#set page(fill: none)]`. Learn more on the -[`page` function's reference page]($page.fill). - -# Exporting as SVG -## Command Line -Pass `--format svg` to the `compile` or `watch` subcommand or provide an output -file name that ends with `.svg`. - -If your document has more than one page, Typst will create multiple image files. -The output file name must then be a template string containing at least one of -- `[{p}]`, which will be replaced by the page number -- `[{0p}]`, which will be replaced by the zero-padded page number (so that all - numbers have the same length) -- `[{t}]`, which will be replaced by the total number of pages - -When exporting to SVG, you have the following configuration options: - -- Which pages to export by specifying `--pages` followed by a comma-separated - list of numbers or dash-separated number ranges. Ranges can be half-open. - Example: `2,3,7-9,11-`. - -## Web App -Click "File" > "Export as" > "SVG" or click the downwards-facing arrow next to -the quick download button and select "Export as SVG". When exporting to SVG, you -have the following configuration options: - -- Which pages to export. Valid options are "All pages", "Current page", and - "Custom ranges". Custom ranges are a comma-separated list of numbers or - dash-separated number ranges. Ranges can be half-open. Example: `2,3,7-9,11-`. +PDFを出力する代わりに、Typstはページを直接スケーラブル・ベクター・グラフィックス(SVG)としてレンダリングすることもできます。 +これは、ウェブページにベクターグラフィックスを埋め込むための推奨される形式です。 +PDFファイルと同様に、SVGはTypstでレイアウトした通りに文書を表示します。 +さらに、特定の解像度に縛られないという利点も共有しています。 +そのため、品質の低下を招くことなく、任意のデバイスでSVGファイルを印刷または表示できます。 +(ただし、フォントの印刷品質はPDFの方が良い場合があります) +PDFとは異なり、SVGは複数のページを含むことはできません。 +複数ページのドキュメントをエクスポートする場合、Typstは複数のSVGを出力します。 + +SVGはテキストを2つの方法で表現できます。 +テキスト自体を埋め込み、閲覧者のコンピューターで利用可能なフォントでレンダリングする方法か、 +文書の作成に使用されたフォントの各グリフの形状を埋め込む方法です。 +SVGファイルが表示されるすべてのデバイスで同じように見えることを保証するために、Typstは後者の方法を選択します。 +これは、例えばコピー&ペーストやスクリーンリーダーなどでSVG内のテキストを自動抽出できないことを意味します。 +テキストのアクセシビリティが必要な場合は、 +代わりにPDFまたはHTMLファイルをエクスポートしてください。 + +SVGは透明な背景を持つことができます。 +デフォルトでは、Typstは不透明な白背景のSVGを出力します。 +`[#set page(fill: none)]`を使用して背景を透明にすることができます。 +詳細は[`page`関数のリファレンスページ]($page.fill)を確認してください。 + +# SVG形式でのエクスポート +## コマンドライン +`compile`または`watch`サブコマンドで`--format svg`を指定するか、 +`.svg`で終わる出力ファイル名を指定してください。 + +文書が複数ページからなる場合、Typstは複数の画像ファイルを生成します。 +このとき、出力ファイル名は次のうち少なくとも1つを含むテンプレート文字列でなければなりません。 +- `[{p}]`:はページ番号に置き換えられます +- `[{0p}]`:は(すべての番号が同じ長さになるように) + ゼロ埋めされたページ番号に置き換えられます +- `[{t}]`:は総ページ数に置き換えられます + +SVG形式でエクスポートする際には、以下の設定オプションが指定可能です。 + +- `--pages` の後に、カンマ区切りのページ番号またはダッシュによる番号範囲を指定することで、エクスポートするページを指定します。 + 範囲指定は半開区間にすることもできます。 + 例:`2,3,7-9,11-`。 + +## Webアプリ +「File」>「Export as」>「SVG」をクリックするか、 +クイックダウンロードボタンの横にある下向き矢印をクリックして「Export as SVG」を選択します。 +SVG形式でエクスポートする際には、以下の設定項目を指定できます。 + +- エクスポートするページ。有効なオプションは「All pages(全てのページ)」、「Current page(現在のページ)」、および「Custom ranges(カスタム範囲)」です。 + カスタム範囲は、カンマ区切りの番号リストまたはダッシュで区切られた番号範囲です。 + 範囲は半開区間にすることもできます。例:`2,3,7-9,11-`。 From 888f44e9e017303753faf93ac719687b2fe1d681 Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Sat, 27 Sep 2025 20:33:09 +0900 Subject: [PATCH 3/7] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/reference/export/svg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/export/svg.md b/docs/reference/export/svg.md index df3a9ba6c..eafdcde82 100644 --- a/docs/reference/export/svg.md +++ b/docs/reference/export/svg.md @@ -30,7 +30,7 @@ SVGは透明な背景を持つことができます。 - `[{p}]`:はページ番号に置き換えられます - `[{0p}]`:は(すべての番号が同じ長さになるように) ゼロ埋めされたページ番号に置き換えられます -- `[{t}]`:は総ページ数に置き換えられます +- `[{t}]`は総ページ数に置き換えられます SVG形式でエクスポートする際には、以下の設定オプションが指定可能です。 From 9868206388836ed13531bcbeb0fd6cd6f76024c2 Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Sat, 27 Sep 2025 20:33:18 +0900 Subject: [PATCH 4/7] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/reference/export/svg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/export/svg.md b/docs/reference/export/svg.md index eafdcde82..5c117e548 100644 --- a/docs/reference/export/svg.md +++ b/docs/reference/export/svg.md @@ -27,7 +27,7 @@ SVGは透明な背景を持つことができます。 文書が複数ページからなる場合、Typstは複数の画像ファイルを生成します。 このとき、出力ファイル名は次のうち少なくとも1つを含むテンプレート文字列でなければなりません。 -- `[{p}]`:はページ番号に置き換えられます +- `[{p}]`はページ番号に置き換えられます - `[{0p}]`:は(すべての番号が同じ長さになるように) ゼロ埋めされたページ番号に置き換えられます - `[{t}]`は総ページ数に置き換えられます From 0e1bf176b7b469b8b1e9eead7f8af70352d60ba5 Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Sat, 27 Sep 2025 20:33:24 +0900 Subject: [PATCH 5/7] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/reference/export/svg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/export/svg.md b/docs/reference/export/svg.md index 5c117e548..a42b15d77 100644 --- a/docs/reference/export/svg.md +++ b/docs/reference/export/svg.md @@ -28,7 +28,7 @@ SVGは透明な背景を持つことができます。 文書が複数ページからなる場合、Typstは複数の画像ファイルを生成します。 このとき、出力ファイル名は次のうち少なくとも1つを含むテンプレート文字列でなければなりません。 - `[{p}]`はページ番号に置き換えられます -- `[{0p}]`:は(すべての番号が同じ長さになるように) +- `[{0p}]`は(すべての番号が同じ長さになるように) ゼロ埋めされたページ番号に置き換えられます - `[{t}]`は総ページ数に置き換えられます From 91abcad774b2dec3c7882458e607a4bd4745746e Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Wed, 1 Oct 2025 10:12:34 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> --- docs/reference/export/svg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/export/svg.md b/docs/reference/export/svg.md index a42b15d77..e88c4c8e0 100644 --- a/docs/reference/export/svg.md +++ b/docs/reference/export/svg.md @@ -34,7 +34,7 @@ SVGは透明な背景を持つことができます。 SVG形式でエクスポートする際には、以下の設定オプションが指定可能です。 -- `--pages` の後に、カンマ区切りのページ番号またはダッシュによる番号範囲を指定することで、エクスポートするページを指定します。 +- `--pages`の後に、カンマ区切りのページ番号またはダッシュによる番号範囲を指定することで、エクスポートするページを指定します。 範囲指定は半開区間にすることもできます。 例:`2,3,7-9,11-`。 From 3cf418a53f833ecf27f1329a220099cdc079962d Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Thu, 2 Oct 2025 20:29:50 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=E6=9C=AB=E5=B0=BE=E3=81=AB=E5=8F=A5?= =?UTF-8?q?=E7=82=B9=E3=82=92=E3=81=A4=E3=81=91=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Shunsuke KIMURA --- docs/reference/export/svg.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/export/svg.md b/docs/reference/export/svg.md index e88c4c8e0..4d37de3e2 100644 --- a/docs/reference/export/svg.md +++ b/docs/reference/export/svg.md @@ -27,10 +27,10 @@ SVGは透明な背景を持つことができます。 文書が複数ページからなる場合、Typstは複数の画像ファイルを生成します。 このとき、出力ファイル名は次のうち少なくとも1つを含むテンプレート文字列でなければなりません。 -- `[{p}]`はページ番号に置き換えられます +- `[{p}]`はページ番号に置き換えられます。 - `[{0p}]`は(すべての番号が同じ長さになるように) - ゼロ埋めされたページ番号に置き換えられます -- `[{t}]`は総ページ数に置き換えられます + ゼロ埋めされたページ番号に置き換えられます。 +- `[{t}]`は総ページ数に置き換えられます。 SVG形式でエクスポートする際には、以下の設定オプションが指定可能です。