情報アイコン
情報 / Info
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「Typst Japan Community」がTypst v0.13.1の公式ドキュメントを翻訳したものです。誤訳や古い情報が含まれている可能性があるため、公式ドキュメントとの併用を推奨します。翻訳の改善やサイトの機能向上について、GitHubでのIssueやPull Requestを歓迎します。コミュニティにご興味のある方はDiscordサーバー「くみはんクラブ」にぜひご参加ください。
This site provides a Japanese translation of the Typst v0.13.1 documentation maintained by the "Typst Japan Community" with permission from Typst GmbH. We recommend using this alongside the official documentation. We welcome contributions through Issues and Pull Requests on our GitHub repository for both translation improvements and website enhancements. Feel free to join our Discord server "Kumihan Club".
言語アイコン
未翻訳

このページはまだ翻訳されていません。原文の内容が表示されています。

page
Element
ヘルプアイコン

Layouts its child onto one or multiple pages.

Although this function is primarily used in set rules to affect page properties, it can also be used to explicitly render its argument onto a set of pages of its own.

Pages can be set to use auto as their width or height. In this case, the pages will grow to fit their content on the respective axis.

The Guide for Page Setup explains how to use this and related functions to set up a document with many examples.

Example

#set page("us-letter")

There you go, US friends!
Preview

引数
ヘルプアイコン

paper
Settable
ヘルプアイコン

A standard paper size to set width and height.

This is just a shorthand for setting width and height and, as such, cannot be retrieved in a context expression.

使用可能な文字列値:
  • a0

    Produces a paper of the respective size.

  • a1

    Produces a paper of the respective size.

  • a2

    Produces a paper of the respective size.

  • a3

    Produces a paper of the respective size.

  • a4

    Produces a paper of the respective size.

  • a5

    Produces a paper of the respective size.

  • a6

    Produces a paper of the respective size.

  • a7

    Produces a paper of the respective size.

  • a8

    Produces a paper of the respective size.

  • a9

    Produces a paper of the respective size.

  • a10

    Produces a paper of the respective size.

  • a11

    Produces a paper of the respective size.

  • iso-b1

    Produces a paper of the respective size.

  • iso-b2

    Produces a paper of the respective size.

  • iso-b3

    Produces a paper of the respective size.

  • iso-b4

    Produces a paper of the respective size.

  • iso-b5

    Produces a paper of the respective size.

  • iso-b6

    Produces a paper of the respective size.

  • iso-b7

    Produces a paper of the respective size.

  • iso-b8

    Produces a paper of the respective size.

  • iso-c3

    Produces a paper of the respective size.

  • iso-c4

    Produces a paper of the respective size.

  • iso-c5

    Produces a paper of the respective size.

  • iso-c6

    Produces a paper of the respective size.

  • iso-c7

    Produces a paper of the respective size.

  • iso-c8

    Produces a paper of the respective size.

  • din-d3

    Produces a paper of the respective size.

  • din-d4

    Produces a paper of the respective size.

  • din-d5

    Produces a paper of the respective size.

  • din-d6

    Produces a paper of the respective size.

  • din-d7

    Produces a paper of the respective size.

  • din-d8

    Produces a paper of the respective size.

  • sis-g5

    Produces a paper of the respective size.

  • sis-e5

    Produces a paper of the respective size.

  • ansi-a

    Produces a paper of the respective size.

  • ansi-b

    Produces a paper of the respective size.

  • ansi-c

    Produces a paper of the respective size.

  • ansi-d

    Produces a paper of the respective size.

  • ansi-e

    Produces a paper of the respective size.

  • arch-a

    Produces a paper of the respective size.

  • arch-b

    Produces a paper of the respective size.

  • arch-c

    Produces a paper of the respective size.

  • arch-d

    Produces a paper of the respective size.

  • arch-e1

    Produces a paper of the respective size.

  • arch-e

    Produces a paper of the respective size.

  • jis-b0

    Produces a paper of the respective size.

  • jis-b1

    Produces a paper of the respective size.

  • jis-b2

    Produces a paper of the respective size.

  • jis-b3

    Produces a paper of the respective size.

  • jis-b4

    Produces a paper of the respective size.

  • jis-b5

    Produces a paper of the respective size.

  • jis-b6

    Produces a paper of the respective size.

  • jis-b7

    Produces a paper of the respective size.

  • jis-b8

    Produces a paper of the respective size.

  • jis-b9

    Produces a paper of the respective size.

  • jis-b10

    Produces a paper of the respective size.

  • jis-b11

    Produces a paper of the respective size.

  • sac-d0

    Produces a paper of the respective size.

  • sac-d1

    Produces a paper of the respective size.

  • sac-d2

    Produces a paper of the respective size.

  • sac-d3

    Produces a paper of the respective size.

  • sac-d4

    Produces a paper of the respective size.

  • sac-d5

    Produces a paper of the respective size.

  • sac-d6

    Produces a paper of the respective size.

  • iso-id-1

    Produces a paper of the respective size.

  • iso-id-2

    Produces a paper of the respective size.

  • iso-id-3

    Produces a paper of the respective size.

  • asia-f4

    Produces a paper of the respective size.

  • jp-shiroku-ban-4

    Produces a paper of the respective size.

  • jp-shiroku-ban-5

    Produces a paper of the respective size.

  • jp-shiroku-ban-6

    Produces a paper of the respective size.

  • jp-kiku-4

    Produces a paper of the respective size.

  • jp-kiku-5

    Produces a paper of the respective size.

  • jp-business-card

    Produces a paper of the respective size.

  • cn-business-card

    Produces a paper of the respective size.

  • eu-business-card

    Produces a paper of the respective size.

  • fr-tellière

    Produces a paper of the respective size.

  • fr-couronne-écriture

    Produces a paper of the respective size.

  • fr-couronne-édition

    Produces a paper of the respective size.

  • fr-raisin

    Produces a paper of the respective size.

  • fr-carré

    Produces a paper of the respective size.

  • fr-jésus

    Produces a paper of the respective size.

  • uk-brief

    Produces a paper of the respective size.

  • uk-draft

    Produces a paper of the respective size.

  • uk-foolscap

    Produces a paper of the respective size.

  • uk-quarto

    Produces a paper of the respective size.

  • uk-crown

    Produces a paper of the respective size.

  • uk-book-a

    Produces a paper of the respective size.

  • uk-book-b

    Produces a paper of the respective size.

  • us-letter

    Produces a paper of the respective size.

  • us-legal

    Produces a paper of the respective size.

  • us-tabloid

    Produces a paper of the respective size.

  • us-executive

    Produces a paper of the respective size.

  • us-foolscap-folio

    Produces a paper of the respective size.

  • us-statement

    Produces a paper of the respective size.

  • us-ledger

    Produces a paper of the respective size.

  • us-oficio

    Produces a paper of the respective size.

  • us-gov-letter

    Produces a paper of the respective size.

  • us-gov-legal

    Produces a paper of the respective size.

  • us-business-card

    Produces a paper of the respective size.

  • us-digest

    Produces a paper of the respective size.

  • us-trade

    Produces a paper of the respective size.

  • newspaper-compact

    Produces a paper of the respective size.

  • newspaper-berliner

    Produces a paper of the respective size.

  • newspaper-broadsheet

    Produces a paper of the respective size.

  • presentation-16-9

    Produces a paper of the respective size.

  • presentation-4-3

    Produces a paper of the respective size.

デフォルト値:

"a4"

width
Settable
ヘルプアイコン

The width of the page.

デフォルト値:

595.28pt

右矢印アイコン
例を表示
#set page(
  width: 3cm,
  margin: (x: 0cm),
)

#for i in range(3) {
  box(square(width: 1cm))
}
Preview

height
Settable
ヘルプアイコン

The height of the page.

If this is set to auto, page breaks can only be triggered manually by inserting a page break. Most examples throughout this documentation use auto for the height of the page to dynamically grow and shrink to fit their content.

デフォルト値:

841.89pt

flipped
Settable
ヘルプアイコン

Whether the page is flipped into landscape orientation.

デフォルト値:

false

右矢印アイコン
例を表示
#set page(
  "us-business-card",
  flipped: true,
  fill: rgb("f2e5dd"),
)

#set align(bottom + end)
#text(14pt)[*Sam H. Richards*] \
_Procurement Manager_

#set text(10pt)
17 Main Street \
New York, NY 10001 \
+1 555 555 5555
Preview

margin
Settable
ヘルプアイコン

The page's margins.

  • auto: The margins are set automatically to 2.5/21 times the smaller dimension of the page. This results in 2.5cm margins for an A4 page.
  • A single length: The same margin on all sides.
  • A dictionary: With a dictionary, the margins can be set individually. The dictionary can contain the following keys in order of precedence:
    • top: The top margin.
    • right: The right margin.
    • bottom: The bottom margin.
    • left: The left margin.
    • inside: The margin at the inner side of the page (where the binding is).
    • outside: The margin at the outer side of the page (opposite to the binding).
    • x: The horizontal margins.
    • y: The vertical margins.
    • rest: The margins on all sides except those for which the dictionary explicitly sets a size.

The values for left and right are mutually exclusive with the values for inside and outside.

デフォルト値:

auto

右矢印アイコン
例を表示
#set page(
 width: 3cm,
 height: 4cm,
 margin: (x: 8pt, y: 4pt),
)

#rect(
  width: 100%,
  height: 100%,
  fill: aqua,
)
Preview

binding
Settable
ヘルプアイコン

On which side the pages will be bound.

  • auto: Equivalent to left if the text direction is left-to-right and right if it is right-to-left.
  • left: Bound on the left side.
  • right: Bound on the right side.

This affects the meaning of the inside and outside options for margins.

デフォルト値:

auto

columns
Settable
ヘルプアイコン

How many columns the page has.

If you need to insert columns into a page or other container, you can also use the columns function.

デフォルト値:

1

右矢印アイコン
例を表示
#set page(columns: 2, height: 4.8cm)
Climate change is one of the most
pressing issues of our time, with
the potential to devastate
communities, ecosystems, and
economies around the world. It's
clear that we need to take urgent
action to reduce our carbon
emissions and mitigate the impacts
of a rapidly changing climate.
Preview

fill
Settable
ヘルプアイコン

The page's background fill.

Setting this to something non-transparent instructs the printer to color the complete page. If you are considering larger production runs, it may be more environmentally friendly and cost-effective to source pre-dyed pages and not set this property.

When set to none, the background becomes transparent. Note that PDF pages will still appear with a (usually white) background in viewers, but they are actually transparent. (If you print them, no color is used for the background.)

The default of auto results in none for PDF output, and white for PNG and SVG.

デフォルト値:

auto

右矢印アイコン
例を表示
#set page(fill: rgb("444352"))
#set text(fill: rgb("fdfdfd"))
*Dark mode enabled.*
Preview

numbering
Settable
ヘルプアイコン

How to number the pages.

If an explicit footer (or header for top-aligned numbering) is given, the numbering is ignored.

デフォルト値:

none

右矢印アイコン
例を表示
#set page(
  height: 100pt,
  margin: (top: 16pt, bottom: 24pt),
  numbering: "1 / 1",
)

#lorem(48)
Preview

supplement
Settable
ヘルプアイコン

A supplement for the pages.

For page references, this is added before the page number.

デフォルト値:

auto

右矢印アイコン
例を表示
#set page(numbering: "1.", supplement: [p.])

= Introduction <intro>
We are on #ref(<intro>, form: "page")!
Preview

number-align
Settable
ヘルプアイコン

The alignment of the page numbering.

If the vertical component is top, the numbering is placed into the header and if it is bottom, it is placed in the footer. Horizon alignment is forbidden. If an explicit matching header or footer is given, the numbering is ignored.

デフォルト値:

center + bottom

右矢印アイコン
例を表示
#set page(
  margin: (top: 16pt, bottom: 24pt),
  numbering: "1",
  number-align: right,
)

#lorem(30)
Preview

header
Settable
ヘルプアイコン

The page's header. Fills the top margin of each page.

  • Content: Shows the content as the header.
  • auto: Shows the page number if a numbering is set and number-align is top.
  • none: Suppresses the header.

デフォルト値:

auto

右矢印アイコン
例を表示
#set par(justify: true)
#set page(
  margin: (top: 32pt, bottom: 20pt),
  header: [
    #set text(8pt)
    #smallcaps[Typst Academy]
    #h(1fr) _Exercise Sheet 3_
  ],
)

#lorem(19)
Preview

header-ascent
Settable
ヘルプアイコン

The amount the header is raised into the top margin.

デフォルト値:

30% + 0pt

The page's footer. Fills the bottom margin of each page.

  • Content: Shows the content as the footer.
  • auto: Shows the page number if a numbering is set and number-align is bottom.
  • none: Suppresses the footer.

For just a page number, the numbering property typically suffices. If you want to create a custom footer but still display the page number, you can directly access the page counter.

デフォルト値:

auto

右矢印アイコン
例を表示
#set par(justify: true)
#set page(
  height: 100pt,
  margin: 20pt,
  footer: context [
    #set align(right)
    #set text(8pt)
    #counter(page).display(
      "1 of I",
      both: true,
    )
  ]
)

#lorem(48)
Preview

The amount the footer is lowered into the bottom margin.

デフォルト値:

30% + 0pt

background
Settable
ヘルプアイコン

Content in the page's background.

This content will be placed behind the page's body. It can be used to place a background image or a watermark.

デフォルト値:

none

右矢印アイコン
例を表示
#set page(background: rotate(24deg,
  text(18pt, fill: rgb("FFCBC4"))[
    *CONFIDENTIAL*
  ]
))

= Typst's secret plans
In the year 2023, we plan to take
over the world (of typesetting).
Preview

foreground
Settable
ヘルプアイコン

Content in the page's foreground.

This content will overlay the page's body.

デフォルト値:

none

右矢印アイコン
例を表示
#set page(foreground: text(24pt)[🥸])

Reviewer 2 has marked our paper
"Weak Reject" because they did
not understand our approach...
Preview

body
Required
ヘルプアイコン
Positional
ヘルプアイコン

The contents of the page(s).

Multiple pages will be created if the content does not fit on a single page. A new page with the page properties prior to the function invocation will be created after the body has been typeset.

検索