mirror of
https://github.com/typst/typst
synced 2025-05-18 11:05:28 +08:00
Fix a bunch of typos + broken link (#1453)
This commit is contained in:
parent
c58a8fbd1d
commit
7049a45634
@ -317,7 +317,7 @@ fn export(document: &Document, command: &CompileSettings) -> StrResult<()> {
|
||||
Err("cannot export multiple PNGs without `{n}` in output path")?;
|
||||
}
|
||||
|
||||
// Find a number width that accomodates all pages. For instance, the
|
||||
// Find a number width that accommodates all pages. For instance, the
|
||||
// first page should be numbered "001" if there are between 100 and
|
||||
// 999 pages.
|
||||
let width = 1 + document.pages.len().checked_ilog10().unwrap_or(0) as usize;
|
||||
|
@ -122,7 +122,7 @@ enum FlowItem {
|
||||
/// Fractional spacing between other items.
|
||||
Fractional(Fr),
|
||||
/// A frame for a layouted block, how to align it, whether it sticks to the
|
||||
/// item after it (for orphan preventation), and whether it is movable
|
||||
/// item after it (for orphan prevention), and whether it is movable
|
||||
/// (to keep it together with its footnotes).
|
||||
Frame { frame: Frame, aligns: Axes<Align>, sticky: bool, movable: bool },
|
||||
/// An absolutely placed frame.
|
||||
|
@ -1013,7 +1013,7 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec<L
|
||||
/// Install icu4x-datagen with `cargo install icu4x-datagen`.
|
||||
static ICU_DATA: &[u8] = include_bytes!("../../../assets/data/icudata.postcard");
|
||||
|
||||
/// Gnerated by the following command:
|
||||
/// Generated by the following command:
|
||||
///
|
||||
/// ```sh
|
||||
/// icu4x-datagen --locales zh ja --keys segmenter/line@1 --format blob \
|
||||
|
@ -253,7 +253,7 @@ enum NumberingKind {
|
||||
Hebrew,
|
||||
SimplifiedChinese,
|
||||
// TODO: Pick the numbering pattern based on languages choice.
|
||||
// As the `1st` numbering character of Chinese (Simplifed) and
|
||||
// As the `1st` numbering character of Chinese (Simplified) and
|
||||
// Chinese (Traditional) is same, we are unable to determine
|
||||
// if the context is Simplified or Traditional by only this
|
||||
// character.
|
||||
|
@ -126,7 +126,7 @@ pub struct OutlineElem {
|
||||
/// - `{auto}`: Indents the numbering of the nested entry with the title of
|
||||
/// its parent entry. This only has an effect if the entries are numbered
|
||||
/// (e.g., via [heading numbering]($func/heading.numbering)).
|
||||
/// - [Relative length]($type/relative): Indents the item by this length
|
||||
/// - [Relative length]($type/relative-length): Indents the item by this length
|
||||
/// multiplied by its nesting level. Specifying `{2em}`, for instance,
|
||||
/// would indent top-level headings (not nested) by `{0em}`, second level
|
||||
/// headings by `{2em}` (nested once), third-level headings by `{4em}`
|
||||
@ -135,7 +135,7 @@ pub struct OutlineElem {
|
||||
/// with a function. That function receives the nesting level as a
|
||||
/// parameter (starting at 0 for top-level headings/elements) and can
|
||||
/// return a relative length or content making up the indent. For example,
|
||||
/// `{n => n * 2em}` would be equivalent to just specifiying `{2em}`,
|
||||
/// `{n => n * 2em}` would be equivalent to just specifying `{2em}`,
|
||||
/// while `{n => [→ ] * n}` would indent with one arrow per nesting
|
||||
/// level.
|
||||
///
|
||||
|
@ -254,7 +254,7 @@ cast! {
|
||||
/// Marks an element as being able to be referenced. This is used to implement
|
||||
/// the `@ref` element.
|
||||
pub trait Refable {
|
||||
/// The supplement, if not overriden by the reference.
|
||||
/// The supplement, if not overridden by the reference.
|
||||
fn supplement(&self) -> Content;
|
||||
|
||||
/// Returns the counter of this element.
|
||||
|
@ -168,7 +168,7 @@ fn create_cmap(
|
||||
// prefer them over pre-existing text mappings from the document. Only
|
||||
// things that don't have a corresponding codepoint (or only a private-use
|
||||
// one) like the "Th" in Linux Libertine get the text of their first
|
||||
// occurances in the document instead.
|
||||
// occurrences in the document instead.
|
||||
for subtable in ttf.tables().cmap.into_iter().flat_map(|table| table.subtables) {
|
||||
if !subtable.is_unicode() {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user