@@ -17,21 +17,21 @@ pub fn module() -> Module {
17
17
Module :: new ( "html" , html)
18
18
}
19
19
20
- /// An HTML element that can contain Typst content.
20
+ /// Typstのコンテンツを含むことができるHTML要素。
21
21
///
22
- /// Typst's HTML export automatically generates the appropriate tags for most
23
- /// elements. However, sometimes, it is desirable to retain more control. For
24
- /// example, when using Typst to generate your blog, you could use this function
25
- /// to wrap each article in an `<article>` tag.
22
+ /// TypstのHTMLエクスポートは、ほとんどの要素に対して適切なタグを自動的に生成します。
23
+ /// ただし、より細かく制御したい場合もあります。
24
+ /// 例えば、Typstを使ってブログを生成する場合、
25
+ /// この関数を用いると、それぞれの記事を `<article>`タグで囲めます。
26
26
///
27
- /// Typst is aware of what is valid HTML. A tag and its attributes must form
28
- /// syntactically valid HTML. Some tags, like `meta` do not accept content.
29
- /// Hence, you must not provide a body for them. We may add more checks in the
30
- /// future, so be sure that you are generating valid HTML when using this
31
- /// function.
27
+ /// Typstは有効なHTMLが何であるかを認識しています。
28
+ /// タグとその属性は、構文的に有効なHTMLを構成していなければなりません。
29
+ /// `meta`のようないくつかのタグはコンテンツを受け付けません。
30
+ /// したがって、それらに対して本文を提供してはいけません。
31
+ /// 将来的に、この機能に対して更に多くのチェックを追加する可能性があるため、この関数を使用する際は有効なHTMLを生成していることを確認してください。
32
32
///
33
- /// Normally, Typst will generate `html`, `head`, and `body` tags for you. If
34
- /// you instead create them with this function, Typst will omit its own tags.
33
+ /// 通常、Typstは `html`、 `head`、および `body`タグを生成します。
34
+ /// 代わりにこの関数でそれらを作成した場合、Typstは自身の生成するタグを省略します。
35
35
///
36
36
/// ```typ
37
37
/// #html.elem("div", attrs: (style: "background: aqua"))[
@@ -40,17 +40,17 @@ pub fn module() -> Module {
40
40
/// ```
41
41
#[ elem( name = "elem" ) ]
42
42
pub struct HtmlElem {
43
- /// The element's tag.
43
+ /// 要素のタグ。
44
44
#[ required]
45
45
pub tag : HtmlTag ,
46
46
47
- /// The element's HTML attributes.
47
+ /// 要素のHTML属性。
48
48
#[ borrowed]
49
49
pub attrs : HtmlAttrs ,
50
50
51
- /// The contents of the HTML element.
51
+ /// HTML要素の内容。
52
52
///
53
- /// The body can be arbitrary Typst content.
53
+ /// 本文には任意のTypstコンテンツを指定できます。
54
54
#[ positional]
55
55
#[ borrowed]
56
56
pub body : Option < Content > ,
@@ -64,19 +64,18 @@ impl HtmlElem {
64
64
}
65
65
}
66
66
67
- /// An element that lays out its content as an inline SVG.
67
+ /// コンテンツをインラインSVGとしてレイアウトする要素。
68
68
///
69
- /// Sometimes, converting Typst content to HTML is not desirable. This can be
70
- /// the case for plots and other content that relies on positioning and styling
71
- /// to convey its message.
69
+ /// TypstのコンテンツにはHTMLへの変換が不適切なものがあります。
70
+ /// グラフプロットや、意味を伝えるために位置決めやスタイルに依存するコンテンツが該当します。
72
71
///
73
- /// This function allows you to use the Typst layout engine that would also be
74
- /// used for PDF, SVG, and PNG export to render a part of your document exactly
75
- /// how it would appear when exported in one of these formats. It embeds the
76
- /// content as an inline SVG.
72
+ /// この関数を使用すると、
73
+ /// PDF、 SVG、およびPNGエクスポートにも使用されるTypstレイアウトエンジンを使用して、
74
+ /// 文書の一部を、これらの形式のいずれかでエクスポートした場合に表示されるのとまったく同じようにレンダリングできます。
75
+ /// この関数はコンテンツをインラインSVGとして埋め込みます。
77
76
#[ elem]
78
77
pub struct FrameElem {
79
- /// The content that shall be laid out.
78
+ ///レイアウト対象のコンテンツ。
80
79
#[ positional]
81
80
#[ required]
82
81
pub body : Content ,
0 commit comments