Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Typst日本語ドキュメント翻訳プロジェクトにご興味をお持ち

1. このGitHubリポジトリをフォークします。
2. ドキュメントの実体は、主にMarkdownファイルおよびコンパイラのソースコード内のコメントの2種類から構成されています。それぞれ、下記の注意書きに従って翻訳作業をお願いします。
1. `./crates/typst/src/`内の`.rs`ファイル群は、Typstのコンパイラのソースコードです。ソースコード内に含まれている、**既存のコメントを直接書き換えて翻訳してください**。
- 例1:[Reference > Foundations](https://typst.app/docs/reference/foundations/)を翻訳する際は、`./crates/typst/src/foundations/mod.rs`のコメントを編集してください。
- 例2:[Reference > Foundations > Arguments](https://typst.app/docs/reference/foundations/arguments/)を翻訳する際は、`./crates/typst/src/foundations/args.rs`のコメントを編集してください。
1. `./crates/typst-library/src/`内の`.rs`ファイル群は、Typstのコンパイラのソースコードです。ソースコード内に含まれている、**既存のコメントを直接書き換えて翻訳してください**。
- 例1:[Reference > Foundations](https://typst.app/docs/reference/foundations/)を翻訳する際は、`./crates/typst-library/src/foundations/mod.rs`のコメントを編集してください。
- 例2:[Reference > Foundations > Arguments](https://typst.app/docs/reference/foundations/arguments/)を翻訳する際は、`./crates/typst-library/src/foundations/args.rs`のコメントを編集してください。
2. `./docs`内のMarkdownファイル群は、Typstのチュートリアルや入門ガイドなど、言語リファレンス以外のページの本体です。**既存のMarkdownファイルを直接書き換えて翻訳してください**。
3. 翻訳の際の文体や表記は[翻訳ガイドライン](./TRANSLATING_GUIDELINES.md)を参照してください。ドキュメントの最新バージョンへの追従は管理者が一括で行っているため、日本語ドキュメントと公式ドキュメントのバージョンが異なる場合でも、日本語ドキュメントで管理されている原文を優先してください。
4. 翻訳作業の途中でも、Draft Pull Requestを作成して、翻訳の進捗状況を共有することができます。
Expand Down
79 changes: 34 additions & 45 deletions crates/typst-library/src/model/bibliography.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,33 @@ use crate::text::{
};
use crate::World;

/// A bibliography / reference listing.
/// 参考文献 / 引用文献リスト。
///
/// You can create a new bibliography by calling this function with a path
/// to a bibliography file in either one of two formats:
/// 次の2つの形式のどちらかの参考文献ファイルへのパスを指定してこの関数を呼び出すと、新しい引用文献リストを作成できます。
///
/// - A Hayagriva `.yml` file. Hayagriva is a new bibliography file format
/// designed for use with Typst. Visit its
/// [documentation](https://github.com/typst/hayagriva/blob/main/docs/file-format.md)
/// for more details.
/// - A BibLaTeX `.bib` file.
/// - Hayagriva `.yml` ファイル。
/// HayagrivaはTypstで使用するためにデザインされた新しい書誌ファイルフォーマットです。
/// 詳しくは[ドキュメント](https://github.com/typst/hayagriva/blob/main/docs/file-format.md)をご覧ください。
/// - BibLaTeX `.bib` ファイル。
///
/// As soon as you add a bibliography somewhere in your document, you can start
/// citing things with reference syntax (`[@key]`) or explicit calls to the
/// [citation]($cite) function (`[#cite(<key>)]`). The bibliography will only
/// show entries for works that were referenced in the document.
/// 文書内に参考文献を追加すると、参照構文(`[@key]`)や引用関数の明示的な呼び出し(`[#cite(<key>)]`)を使って[引用]($cite)を始めることができます。
/// 参考文献リストには、文書内で参照された作品の文献だけが表示されます。
///
/// # Styles
/// Typst offers a wide selection of built-in
/// [citation and bibliography styles]($bibliography.style). Beyond those, you
/// can add and use custom [CSL](https://citationstyles.org/) (Citation Style
/// Language) files. Wondering which style to use? Here are some good defaults
/// based on what discipline you're working in:
/// # スタイル
/// Typstは、内蔵の[引用と文献スタイル]($bibliography.style)を幅広く取り揃えています。
/// さらに、独自の[CSL](https://citationstyles.org/)(Citation Style Language)ファイルを追加して使用することもできます。
/// どのスタイルを使えばいいか迷う方のために、分野ごとによく使われるスタイルを以下の表にまとめています。
///
/// | Fields | Typical Styles |
/// | 分野 | Typical Styles |
/// |-----------------|--------------------------------------------------------|
/// | Engineering, IT | `{"ieee"}` |
/// | Psychology, Life Sciences | `{"apa"}` |
/// | Social sciences | `{"chicago-author-date"}` |
/// | Humanities | `{"mla"}`, `{"chicago-notes"}`, `{"harvard-cite-them-right"}` |
/// | Economics | `{"harvard-cite-them-right"}` |
/// | Physics | `{"american-physics-society"}` |
/// | 工学、IT | `{"ieee"}` |
/// | 心理学、ライフサイエンス | `{"apa"}` |
/// | 社会科学 | `{"chicago-author-date"}` |
/// | 人文学 | `{"mla"}`, `{"chicago-notes"}`, `{"harvard-cite-them-right"}` |
/// | 経済学 | `{"harvard-cite-them-right"}` |
/// | 物理学 | `{"american-physics-society"}` |
///
/// # Example
/// #
/// ```example
/// This was already noted by
/// pirates long ago. @arrgh
Expand All @@ -102,35 +96,30 @@ pub struct BibliographyElem {
)]
pub sources: Derived<OneOrMultiple<DataSource>, Bibliography>,

/// The title of the bibliography.
/// 参考文献のタイトル。
///
/// - When set to `{auto}`, an appropriate title for the
/// [text language]($text.lang) will be used. This is the default.
/// - When set to `{none}`, the bibliography will not have a title.
/// - A custom title can be set by passing content.
/// - `{auto}`に設定すると、[テキストの言語]($text.lang)に適したタイトルが表示されます。これがデフォルトです。
/// - `{none}`に設定すると、参考文献のタイトルは何も表示されません。
/// - 独自のタイトルはコンテンツで渡します。
///
/// The bibliography's heading will not be numbered by default, but you can
/// force it to be with a show-set rule:
/// 参考文献の見出しはデフォルトでは番号が振られませんが、show-setルールで強制的に見出し番号をつけることも可能です。
/// `{show bibliography: set heading(numbering: "1.")}`
pub title: Smart<Option<Content>>,

/// Whether to include all works from the given bibliography files, even
/// those that weren't cited in the document.
/// 文書内で引用されていないものも含めて、参考文献ファイルにあるすべての文献を出力するかどうか。
///
/// To selectively add individual cited works without showing them, you can
/// also use the `cite` function with [`form`]($cite.form) set to `{none}`.
/// 個々の引用文献を表示させずに追加するには、 [`form`]($cite.form) を `{none}`として [`cite`]($cite) 関数を使用します。
#[default(false)]
pub full: bool,

/// The bibliography style.
/// 参考文献スタイル。
///
/// This can be:
/// - A string with the name of one of the built-in styles (see below). Some
/// of the styles listed below appear twice, once with their full name and
/// once with a short alias.
/// - A path string to a [CSL file](https://citationstyles.org/). For more
/// details about paths, see the [Paths section]($syntax/#paths).
/// - Raw bytes from which a CSL style should be decoded.
/// 以下のいずれかの方法で指定します。
/// - 組み込みスタイル(下記参照)のいずれかの名前を持つ文字列。
/// 以下に挙げるスタイルのいくつかは、フルネームと短いエイリアスの2回表示されています。
/// - [CSL ファイル](https://citationstyles.org/)へのパスを示す文字列。
/// パスに関する詳細は[Pathセクション]($syntax/#paths)を参照してください。
/// - CSLスタイルがデコードされるべき生バイト。
#[parse(match args.named::<Spanned<CslSource>>("style")? {
Some(source) => Some(CslStyle::load(engine.world, source)?),
None => None,
Expand Down
Loading