diff options
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/matrix.rs | 20 | ||||
| -rw-r--r-- | library/src/math/mod.rs | 20 | ||||
| -rw-r--r-- | library/src/math/style.rs | 16 |
3 files changed, 48 insertions, 8 deletions
diff --git a/library/src/math/matrix.rs b/library/src/math/matrix.rs index 2d32f4b5..21294b71 100644 --- a/library/src/math/matrix.rs +++ b/library/src/math/matrix.rs @@ -1,6 +1,8 @@ use super::*; /// A column vector. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -52,17 +54,19 @@ pub enum Delimiter { castable! { Delimiter, - Expected: "type of bracket or bar", - Value::Str(s) => match s.as_str() { - "(" => Self::Paren, - "[" => Self::Bracket, - "{" => Self::Brace, - "|" => Self::Bar, - _ => Err("expected \"(\", \"[\", \"{\", or \"|\"")?, - }, + /// Delimit matrices with parentheses. + "(" => Self::Paren, + /// Delimit matrices with brackets. + "[" => Self::Bracket, + /// Delimit matrices with curly braces. + "{" => Self::Brace, + /// Delimit matrices with vertical bars. + "|" => Self::Bar, } /// A case distinction. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 59c621e8..41cdb9f5 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -15,6 +15,8 @@ use crate::prelude::*; use crate::text::{FontFamily, LinebreakNode, SpaceNode, SymbolNode, TextNode}; /// A piece of a mathematical formula. +/// +/// Tags: math. #[func] #[capable(Show, Layout, Inline, Texify)] #[derive(Debug, Clone, Hash)] @@ -244,6 +246,8 @@ impl Texify for Content { } /// An atom in a math formula: `x`, `+`, `12`. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -283,6 +287,8 @@ impl Texify for AtomNode { } /// An accented node. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -358,6 +364,8 @@ impl Texify for AccNode { } /// A fraction. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -389,6 +397,8 @@ impl Texify for FracNode { } /// A binomial. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -420,6 +430,8 @@ impl Texify for BinomNode { } /// A sub- and/or superscript. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -456,6 +468,8 @@ impl Texify for ScriptNode { } /// A math alignment point: `&`, `&&`. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -471,6 +485,8 @@ impl Texify for AlignPointNode { } /// A square root. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -493,6 +509,8 @@ impl Texify for SqrtNode { } /// A floored expression. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -515,6 +533,8 @@ impl Texify for FloorNode { } /// A ceiled expression. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] diff --git a/library/src/math/style.rs b/library/src/math/style.rs index 0fdff740..444b1fb4 100644 --- a/library/src/math/style.rs +++ b/library/src/math/style.rs @@ -1,6 +1,8 @@ use super::*; /// Serif (roman) font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -23,6 +25,8 @@ impl Texify for SerifNode { } /// Sans-serif font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -45,6 +49,8 @@ impl Texify for SansNode { } /// Bold font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -67,6 +73,8 @@ impl Texify for BoldNode { } /// Italic font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -89,6 +97,8 @@ impl Texify for ItalNode { } /// Calligraphic font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -111,6 +121,8 @@ impl Texify for CalNode { } /// Fraktur font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -133,6 +145,8 @@ impl Texify for FrakNode { } /// Monospace font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] @@ -155,6 +169,8 @@ impl Texify for MonoNode { } /// Blackboard bold (double-struck) font style. +/// +/// Tags: math. #[func] #[capable(Texify)] #[derive(Debug, Hash)] |
