Skip to content

Commit b29aaa7

Browse files
gomazarashiCopilot3w36zj6
authored
/docs/reference/png/の翻訳 (typst-jp#312)
Co-authored-by: Copilot <[email protected]> Co-authored-by: 3w36zj6 <[email protected]>
1 parent eb35bce commit b29aaa7

File tree

2 files changed

+62
-62
lines changed

2 files changed

+62
-62
lines changed

docs/reference/export/png.md

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
1-
Instead of creating a PDF, Typst can also directly render pages to PNG raster
2-
graphics. PNGs are losslessly compressed images that can contain one page at a
3-
time. When exporting a multi-page document, Typst will emit multiple PNGs. PNGs
4-
are a good choice when you want to use Typst's output in an image editing
5-
software or when you can use none of Typst's other export formats.
6-
7-
In contrast to Typst's other export formats, PNGs are bound to a specific
8-
resolution. When exporting to PNG, you can configure the resolution as pixels
9-
per inch (PPI). If the medium you view the PNG on has a finer resolution than
10-
the PNG you exported, you will notice a loss of quality. Typst calculates the
11-
resolution of your PNGs based on each page's physical dimensions and the PPI. If
12-
you need guidance for choosing a PPI value, consider the following:
13-
14-
- A value of 300 or 600 is typical for desktop printing.
15-
- Professional prints of detailed graphics can go up to 1200 PPI.
16-
- If your document is only viewed at a distance, e.g. a poster, you may choose a
17-
smaller value than 300.
18-
- If your document is viewed on screens, a typical PPI value for a smartphone is
19-
400-500.
20-
21-
Because PNGs only contain a pixel raster, the text within cannot be extracted
22-
automatically (without OCR), for example by copy/paste or a screen reader. If
23-
you need the text to be accessible, export a PDF or HTML file instead.
24-
25-
PNGs can have transparent backgrounds. By default, Typst will output a PNG with
26-
an opaque white background. You can make the background transparent using
27-
`[#set page(fill: none)]`. Learn more on the
28-
[`page` function's reference page]($page.fill).
29-
30-
# Exporting as PNG
31-
## Command Line
32-
Pass `--format png` to the `compile` or `watch` subcommand or provide an output
33-
file name that ends with `.png`.
34-
35-
If your document has more than one page, Typst will create multiple image files.
36-
The output file name must then be a template string containing at least one of
37-
- `[{p}]`, which will be replaced by the page number
38-
- `[{0p}]`, which will be replaced by the zero-padded page number (so that all
39-
numbers have the same length)
40-
- `[{t}]`, which will be replaced by the total number of pages
41-
42-
When exporting to PNG, you have the following configuration options:
43-
44-
- Which resolution to render at by specifying `--ppi` followed by a number of
45-
pixels per inch. The default is `144`.
46-
47-
- Which pages to export by specifying `--pages` followed by a comma-separated
48-
list of numbers or dash-separated number ranges. Ranges can be half-open.
49-
Example: `2,3,7-9,11-`.
50-
51-
## Web App
52-
Click "File" > "Export as" > "PNG" or click the downwards-facing arrow next to
53-
the quick download button and select "Export as PNG". When exporting to PNG, you
54-
have the following configuration options:
55-
56-
- The resolution at which the pages should be rendered, as a number of pixels
57-
per inch. The default is `144`.
58-
59-
- Which pages to export. Valid options are "All pages", "Current page", and
60-
"Custom ranges". Custom ranges are a comma-separated list of numbers or
61-
dash-separated number ranges. Ranges can be half-open. Example: `2,3,7-9,11-`.
1+
PDFを作成する代わりに、Typstはページを直接PNG形式のラスター画像にレンダリングすることもできます。
2+
PNGは可逆圧縮の画像形式で、1枚に1ページを含むことができます。
3+
複数ページの文書をエクスポートする場合、Typstは複数のPNGを出力します。
4+
PNGは、Typstの出力を画像編集ソフトウェアで編集したい場合や、
5+
Typstの他のエクスポート形式が使用できない場合に適しています。
6+
7+
Typstの他のエクスポート形式とは異なり、PNGの解像度は特定のものに固定されます。
8+
PNGにエクスポートする際、解像度をインチあたりのピクセル数(PPI)として設定できます。
9+
PNGを閲覧する媒体の解像度がエクスポートしたPNGの解像度を上回る場合、
10+
画質の低下が見て取れます。
11+
Typstは各ページの物理的な寸法とPPIに基づいてPNGの解像度を計算します。
12+
PPI値を選ぶ際の目安が必要であれば、以下を参考にしてください。
13+
14+
- デスクトップ印刷では、300または600の値が一般的です。
15+
- 精細なグラフィックの業務用印刷では1200PPIまで用いられることがあります。
16+
- ポスターなどの離れた距離のみから閲覧される文書の場合、
17+
300未満の値を選択してもよいでしょう。
18+
- 画面上で閲覧される文書の場合、
19+
スマートフォンの一般的なPPI値は400-500です。
20+
21+
PNGはピクセルのラスターのみを含むため、
22+
例えばコピー&ペーストやスクリーンリーダーなどでテキストを自動抽出することは(OCRを用いない限り)できません。
23+
テキストのアクセシビリティが必要な場合は、代わりにPDFまたはHTMLファイルをエクスポートしてください。
24+
25+
PNGは透明な背景を持つことができます。
26+
デフォルトでは、Typstは不透明な白背景のPNGを出力します。
27+
`[#set page(fill: none)]`を使用して背景を透明にすることができます。
28+
詳細は[`page`関数のリファレンスページ]($page.fill)を確認してください。
29+
30+
# PNG形式でのエクスポート
31+
## コマンドライン
32+
`compile`または`watch`サブコマンドで`--format png`を指定するか、
33+
`.png`で終わる出力ファイル名を指定してください。
34+
35+
文書が複数ページからなる場合、Typstは複数の画像ファイルを生成します。
36+
このとき、出力ファイル名は次のうち少なくとも1つを含むテンプレート文字列でなければなりません。
37+
- `[{p}]`:はページ番号に置き換えられます。
38+
- `[{0p}]`:は(すべての番号が同じ長さになるように)
39+
ゼロ埋めされたページ番号に置き換えられます。
40+
- `[{t}]`:は総ページ数に置き換えられます。
41+
42+
PNG形式でエクスポートする際には、以下の設定オプションが指定可能です。
43+
44+
- `--ppi`に続けて1インチあたりのピクセル数を指定することで、レンダリング解像度を指定します。
45+
デフォルトの値は`144`です。
46+
47+
- `--pages`の後に、カンマ区切りのページ番号またはダッシュによる番号範囲を指定することで、エクスポートするページを指定します。
48+
範囲指定は半開区間にすることもできます。
49+
例:`2,3,7-9,11-`
50+
51+
## Webアプリ
52+
File」>「Export as」>「PNG」をクリックするか、
53+
クイックダウンロードボタンの横にある下向き矢印をクリックして「Export as PNG」を選択します。
54+
PNG形式でエクスポートする際には、以下の設定項目を指定できます。
55+
56+
- 1インチあたりのピクセル数を指定することで、レンダリング解像度を指定します。
57+
デフォルトの値は`144`です。
58+
59+
- エクスポートするページ。有効なオプションは「All pages(全てのページ)」、「Current page(現在のページ)」、および「Custom ranges(カスタム範囲)」です。
60+
カスタム範囲は、カンマ区切りの番号リストまたはダッシュで区切られた番号範囲です。
61+
範囲は半開区間にすることもできます。例:`2,3,7-9,11-`

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"/docs/reference/html/": "translated",
165165
"/docs/reference/html/elem/": "translated",
166166
"/docs/reference/html/frame/": "translated",
167-
"/docs/reference/png/": "untranslated",
167+
"/docs/reference/png/": "translated",
168168
"/docs/reference/svg/": "translated",
169169
"/docs/guides/": "translated",
170170
"/docs/guides/guide-for-latex-users/": "untranslated",

0 commit comments

Comments
 (0)