Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/reference/model/emph/の翻訳 #95

Merged
merged 4 commits into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions crates/typst/src/model/emph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ use crate::engine::Engine;
use crate::foundations::{elem, Content, Packed, Show, StyleChain};
use crate::text::{ItalicToggle, TextElem};

/// Emphasizes content by toggling italics.
/// イタリック体への切り替えによるコンテンツの強調。
///
/// - If the current [text style]($text.style) is `{"normal"}`, this turns it
/// into `{"italic"}`.
/// - If it is already `{"italic"}` or `{"oblique"}`, it turns it back to
/// `{"normal"}`.
/// - 現在の[テキストスタイル]($text.style)`{"normal"}`の場合、これを
/// `{"italic"}`に変更します。
/// - 現在のテキストスタイルが既に`{"italic"}`あるいは`{"oblique"}`の場合、
/// `{"normal"}`に戻します。
///
/// # Example
/// #
/// ```example
/// This is _emphasized._ \
/// This is #emph[too.]
Expand All @@ -22,13 +22,13 @@ use crate::text::{ItalicToggle, TextElem};
/// This is _emphasized_ differently.
/// ```
///
/// # Syntax
/// This function also has dedicated syntax: To emphasize content, simply
/// enclose it in underscores (`_`). Note that this only works at word
/// boundaries. To emphasize part of a word, you have to use the function.
/// # 構文
/// この関数には専用の構文もあります。
/// コンテンツを強調するには、単にアンダースコア(`_`)で囲みます。ただし、これは単語の区切りにおいてのみ機能します。
/// 単語の一部を強調する場合は、この関数を使用する必要があります。
#[elem(title = "Emphasis", keywords = ["italic"], Show)]
pub struct EmphElem {
/// The content to emphasize.
/// 強調するコンテンツ。
#[required]
pub body: Content,
}
Expand Down