From da761b7fac109492dfac9203bb7305e9680b93d5 Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Sun, 20 Apr 2025 11:34:32 +0900 Subject: [PATCH 01/10] =?UTF-8?q?`docs/reference/model/link/`=E3=81=AE?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3=E9=96=8B=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index ea85aa945..1c50cce57 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -13,7 +13,7 @@ use crate::introspection::Location; use crate::layout::Position; use crate::text::TextElem; -/// Links to a URL or a location in the document. +/// URLや文書中の位置へのリンク。 /// /// By default, links do not look any different from normal text. However, /// you can easily apply a style of your choice with a show rule. From 1a5fe3afff5a0034731cf0937f137cd7deccd92b Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Mon, 21 Apr 2025 02:24:12 +0900 Subject: [PATCH 02/10] =?UTF-8?q?=E3=80=8C=E6=A7=8B=E6=96=87=E3=80=8D?= =?UTF-8?q?=E3=82=BB=E3=82=AF=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=BE=E3=81=A7?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/model/link.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index 1c50cce57..14bc8a9d3 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -15,10 +15,10 @@ use crate::text::TextElem; /// URLや文書中の位置へのリンク。 /// -/// By default, links do not look any different from normal text. However, -/// you can easily apply a style of your choice with a show rule. +/// デフォルトでは、リンクの外見は通常のテキストと変わりません。 +/// しかし、showルールを使うことで、簡単に任意のスタイルを適用できます。 /// -/// # Example +/// # 例 /// ```example /// #show link: underline /// @@ -30,14 +30,14 @@ use crate::text::TextElem; /// ] /// ``` /// -/// # Hyphenation -/// If you enable hyphenation or justification, by default, it will not apply to -/// links to prevent unwanted hyphenation in URLs. You can opt out of this -/// default via `{show link: set text(hyphenate: true)}`. +/// # ハイフネーション +/// ハイフネーションや両端揃えを有効にしていても、意図しないURL中のハイフネーションを防ぐため、 +/// デフォルトではリンクには適用されません。 +/// これを無効化するには、`{show link: set text(hyphenate: true)}`を使用します。 /// -/// # Syntax -/// This function also has dedicated syntax: Text that starts with `http://` or -/// `https://` is automatically turned into a link. +/// # 構文 +/// この関数には専用の構文もあります。 +/// `http://`や`https://`で始まるテキストは、自動的にリンクに変換されます。 #[elem(Show)] pub struct LinkElem { /// The destination the link points to. From a2237ced2f0ee64569b33def2455aca67dd36acf Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Mon, 21 Apr 2025 12:18:46 +0900 Subject: [PATCH 03/10] =?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 --- crates/typst-library/src/model/link.rs | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index 14bc8a9d3..8ee75f3e8 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -40,25 +40,25 @@ use crate::text::TextElem; /// `http://`や`https://`で始まるテキストは、自動的にリンクに変換されます。 #[elem(Show)] pub struct LinkElem { - /// The destination the link points to. + /// リンクの遷移先。 /// - /// - To link to web pages, `dest` should be a valid URL string. If the URL - /// is in the `mailto:` or `tel:` scheme and the `body` parameter is - /// omitted, the email address or phone number will be the link's body, - /// without the scheme. + /// - Webページにリンクする場合、`dest`は有効なURL文字列である必要があります。 + /// `mailto:`または `tel:`スキームを含むURLが指定され、 + /// かつ`body`パラメータが省略された場合、 + /// スキームを除いたメールアドレスまたは電話番号がリンクの本文になります。 /// - /// - To link to another part of the document, `dest` can take one of three - /// forms: - /// - A [label] attached to an element. If you also want automatic text - /// for the link based on the element, consider using a - /// [reference]($ref) instead. + /// - 文書中の別の部分にリンクする場合、 + ///  `dest`には次の3つのうちいずれかの形式を用いることができます。 + /// - 要素に付与された[label]。 + /// 要素に基づいて自動的にリンクの本文を生成したい場合は、 + /// [reference]($ref)を使用することを検討してください。 /// - /// - A [`location`] (typically retrieved from [`here`], [`locate`] or - /// [`query`]). + /// - [`location`] (通常は`here`]や[`locate`]、 + /// [`query`]から取得される)。 /// - /// - A dictionary with a `page` key of type [integer]($int) and `x` and - /// `y` coordinates of type [length]. Pages are counted from one, and - /// the coordinates are relative to the page's top left corner. + /// - [integer]($int)型の`page`キーと[length]型の`x`座標、`y`座標を持つ辞書。 + /// ページは1から数えられ、 + /// 座標はページの左上隅からの相対位置です。 /// /// ```example /// = Introduction @@ -75,10 +75,10 @@ pub struct LinkElem { )] pub dest: LinkTarget, - /// The content that should become a link. + /// リンクとして表示する内容。 /// - /// If `dest` is an URL string, the parameter can be omitted. In this case, - /// the URL will be shown as the link. + /// `dest`がURL文字列の場合、このパラメーターは省略可能です。 + /// この場合、URLがリンクとして表示されます。 #[required] #[parse(match &dest { LinkTarget::Dest(Destination::Url(url)) => match args.eat()? { From 3573693f5c616be4743ea7ef5549825117263017 Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Mon, 21 Apr 2025 12:39:42 +0900 Subject: [PATCH 04/10] =?UTF-8?q?=E4=B8=B8=E6=8B=AC=E5=BC=A7=E3=81=8C?= =?UTF-8?q?=E5=8D=8A=E8=A7=92=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=82=82=E3=81=AE=E3=82=92=E5=85=A8=E8=A7=92=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/model/link.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index 8ee75f3e8..e098fed1e 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -53,8 +53,8 @@ pub struct LinkElem { /// 要素に基づいて自動的にリンクの本文を生成したい場合は、 /// [reference]($ref)を使用することを検討してください。 /// - /// - [`location`] (通常は`here`]や[`locate`]、 - /// [`query`]から取得される)。 + /// - [`location`](通常は`here`]や[`locate`]、 + /// [`query`]から取得される)。 /// /// - [integer]($int)型の`page`キーと[length]型の`x`座標、`y`座標を持つ辞書。 /// ページは1から数えられ、 From 53f9674b0fda1c6b91189bbf51598e1e6c789184 Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Mon, 21 Apr 2025 12:42:42 +0900 Subject: [PATCH 05/10] =?UTF-8?q?=E8=AA=A4=E3=81=A3=E3=81=A6=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=97=E3=81=9F=E6=8B=AC=E5=BC=A7=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index e098fed1e..beac773a8 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -53,7 +53,7 @@ pub struct LinkElem { /// 要素に基づいて自動的にリンクの本文を生成したい場合は、 /// [reference]($ref)を使用することを検討してください。 /// - /// - [`location`](通常は`here`]や[`locate`]、 + /// - [`location`](通常は`[here`]や[`locate`]、 /// [`query`]から取得される)。 /// /// - [integer]($int)型の`page`キーと[length]型の`x`座標、`y`座標を持つ辞書。 From 2af06aa0fe0bcbdc042a18b65c596a2e793680e7 Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Mon, 21 Apr 2025 12:45:37 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=E3=83=90=E3=83=83=E3=82=AF=E3=82=AF?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=88=E3=81=AE=E4=BD=8D=E7=BD=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index beac773a8..2a0117276 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -53,7 +53,7 @@ pub struct LinkElem { /// 要素に基づいて自動的にリンクの本文を生成したい場合は、 /// [reference]($ref)を使用することを検討してください。 /// - /// - [`location`](通常は`[here`]や[`locate`]、 + /// - [`location`](通常は[`here`]や[`locate`]、 /// [`query`]から取得される)。 /// /// - [integer]($int)型の`page`キーと[length]型の`x`座標、`y`座標を持つ辞書。 From 801d133c5b77b76ef544fca51f109161afedffe0 Mon Sep 17 00:00:00 2001 From: gomazarashi Date: Mon, 21 Apr 2025 12:47:07 +0900 Subject: [PATCH 07/10] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index 2a0117276..5d981f510 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -48,7 +48,7 @@ pub struct LinkElem { /// スキームを除いたメールアドレスまたは電話番号がリンクの本文になります。 /// /// - 文書中の別の部分にリンクする場合、 - ///  `dest`には次の3つのうちいずれかの形式を用いることができます。 + /// `dest`には次の3つのうちいずれかの形式を用いることができます。 /// - 要素に付与された[label]。 /// 要素に基づいて自動的にリンクの本文を生成したい場合は、 /// [reference]($ref)を使用することを検討してください。 From 418609f61c0f9d3496aa99c40868aa71415b4499 Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Thu, 24 Apr 2025 09:28:52 +0900 Subject: [PATCH 08/10] =?UTF-8?q?=E8=AA=A4=E3=81=A3=E3=81=A6=E9=95=B7?= =?UTF-8?q?=E9=9F=B3=E3=82=92=E7=9C=81=E7=95=A5=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E7=AE=87=E6=89=80=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Shunsuke KIMURA --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index 5d981f510..8f9890c92 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -44,7 +44,7 @@ pub struct LinkElem { /// /// - Webページにリンクする場合、`dest`は有効なURL文字列である必要があります。 /// `mailto:`または `tel:`スキームを含むURLが指定され、 - /// かつ`body`パラメータが省略された場合、 + /// かつ`body`パラメーターが省略された場合、 /// スキームを除いたメールアドレスまたは電話番号がリンクの本文になります。 /// /// - 文書中の別の部分にリンクする場合、 From c22917b6f81cbe13c5927efb4a9c333f30d9edbf Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Thu, 24 Apr 2025 09:29:20 +0900 Subject: [PATCH 09/10] Update crates/typst-library/src/model/link.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit URLスキームに関する表現を修正 Co-authored-by: Shunsuke KIMURA --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index 8f9890c92..b8b133ca7 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -43,7 +43,7 @@ pub struct LinkElem { /// リンクの遷移先。 /// /// - Webページにリンクする場合、`dest`は有効なURL文字列である必要があります。 - /// `mailto:`または `tel:`スキームを含むURLが指定され、 + /// `mailto:`や`tel:`のURLスキームを含むURLが指定され、 /// かつ`body`パラメーターが省略された場合、 /// スキームを除いたメールアドレスまたは電話番号がリンクの本文になります。 /// From 9734322917337358ae694e0948987c1855726ccf Mon Sep 17 00:00:00 2001 From: gomazarashi <60730277+gomazarashi@users.noreply.github.com> Date: Thu, 24 Apr 2025 09:29:48 +0900 Subject: [PATCH 10/10] =?UTF-8?q?URL=E3=82=B9=E3=82=AD=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E8=A1=A8=E7=8F=BE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Shunsuke KIMURA --- crates/typst-library/src/model/link.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/link.rs b/crates/typst-library/src/model/link.rs index b8b133ca7..5829df70b 100644 --- a/crates/typst-library/src/model/link.rs +++ b/crates/typst-library/src/model/link.rs @@ -45,7 +45,7 @@ pub struct LinkElem { /// - Webページにリンクする場合、`dest`は有効なURL文字列である必要があります。 /// `mailto:`や`tel:`のURLスキームを含むURLが指定され、 /// かつ`body`パラメーターが省略された場合、 - /// スキームを除いたメールアドレスまたは電話番号がリンクの本文になります。 + /// URLスキームを除いたメールアドレスまたは電話番号がリンクの本文になります。 /// /// - 文書中の別の部分にリンクする場合、 /// `dest`には次の3つのうちいずれかの形式を用いることができます。