mirror of
https://github.com/typst/typst
synced 2025-05-20 20:15:29 +08:00
Minor docs fixes
This commit is contained in:
parent
f15b81e9a7
commit
de902d8775
@ -243,9 +243,7 @@ pub struct HighlightElem {
|
|||||||
#[default(Color::Rgba(RgbaColor::new(0xFF, 0xFF, 0x5F, 0xFF)).into())]
|
#[default(Color::Rgba(RgbaColor::new(0xFF, 0xFF, 0x5F, 0xFF)).into())]
|
||||||
pub fill: Paint,
|
pub fill: Paint,
|
||||||
|
|
||||||
/// The top end of the background rectangle. Note that top edge will update
|
/// The top end of the background rectangle.
|
||||||
/// to be always higher than the glyph's bounding box.
|
|
||||||
/// (default: "ascender")
|
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #set highlight(top-edge: "ascender")
|
/// #set highlight(top-edge: "ascender")
|
||||||
@ -257,9 +255,7 @@ pub struct HighlightElem {
|
|||||||
#[default(TopEdge::Metric(TopEdgeMetric::Ascender))]
|
#[default(TopEdge::Metric(TopEdgeMetric::Ascender))]
|
||||||
pub top_edge: TopEdge,
|
pub top_edge: TopEdge,
|
||||||
|
|
||||||
/// The bottom end of the background rectangle. Note that top edge will update
|
/// The bottom end of the background rectangle.
|
||||||
/// to be always lower than the glyph's bounding box.
|
|
||||||
/// (default: "descender")
|
|
||||||
///
|
///
|
||||||
/// ```example
|
/// ```example
|
||||||
/// #set highlight(bottom-edge: "descender")
|
/// #set highlight(bottom-edge: "descender")
|
||||||
|
@ -333,7 +333,8 @@ impl Func {
|
|||||||
args: Args,
|
args: Args,
|
||||||
/// The arguments to apply to the function.
|
/// The arguments to apply to the function.
|
||||||
#[external]
|
#[external]
|
||||||
arguments: Args,
|
#[variadic]
|
||||||
|
arguments: Vec<Args>,
|
||||||
) -> Func {
|
) -> Func {
|
||||||
let span = self.span;
|
let span = self.span;
|
||||||
Self { repr: Repr::With(Arc::new((self, args))), span }
|
Self { repr: Repr::With(Arc::new((self, args))), span }
|
||||||
@ -348,8 +349,9 @@ impl Func {
|
|||||||
/// The docs argument cannot be called `args`.
|
/// The docs argument cannot be called `args`.
|
||||||
args: Args,
|
args: Args,
|
||||||
/// The fields to filter for.
|
/// The fields to filter for.
|
||||||
|
#[variadic]
|
||||||
#[external]
|
#[external]
|
||||||
fields: Args,
|
fields: Vec<Args>,
|
||||||
) -> StrResult<Selector> {
|
) -> StrResult<Selector> {
|
||||||
let mut args = args;
|
let mut args = args;
|
||||||
let fields = args.to_named();
|
let fields = args.to_named();
|
||||||
|
@ -64,8 +64,8 @@ use super::*;
|
|||||||
///
|
///
|
||||||
/// # Fields
|
/// # Fields
|
||||||
/// On a `stroke` object, you can access any of the fields mentioned in the
|
/// On a `stroke` object, you can access any of the fields mentioned in the
|
||||||
/// dictionary format above. For example, `{(2pt + blue).thickness}` is `{2pt}`,
|
/// dictionary format above. For example, `{(2pt + blue).thickness}` is `{2pt}`.
|
||||||
/// `{(2pt + blue).miter-limit}` is `{4.0}` (the default), and so on.
|
/// Meanwhile, `{(2pt + blue).cap}` is `{auto}` because it's unspecified.
|
||||||
#[ty]
|
#[ty]
|
||||||
#[derive(Default, Clone, Eq, PartialEq, Hash)]
|
#[derive(Default, Clone, Eq, PartialEq, Hash)]
|
||||||
pub struct Stroke<T: Numeric = Length> {
|
pub struct Stroke<T: Numeric = Length> {
|
||||||
|
@ -7,7 +7,8 @@ description: |
|
|||||||
# Changelog
|
# Changelog
|
||||||
## Version 0.8.0 (September 13, 2023) { #v0.8.0 }
|
## Version 0.8.0 (September 13, 2023) { #v0.8.0 }
|
||||||
- Scripting
|
- Scripting
|
||||||
- Plugins (thanks to [@astrale-sharp](https://github.com/astrale-sharp))
|
- Plugins (thanks to [@astrale-sharp](https://github.com/astrale-sharp) and
|
||||||
|
[@arnaudgolfouse](https://github.com/arnaudgolfouse))
|
||||||
- Typst can now load [plugins]($plugin) that are compiled to WebAssembly
|
- Typst can now load [plugins]($plugin) that are compiled to WebAssembly
|
||||||
- Anything that can be compiled to WebAssembly can thus be loaded as a
|
- Anything that can be compiled to WebAssembly can thus be loaded as a
|
||||||
plugin
|
plugin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user