pub struct Radical { /* private fields */ }
Expand description
The radical elements construct an expression with a root symbol √
with a line over the content.
The msqrt element is used for square roots, while the mroot element is used to draw radicals
with indices, e.g. a cube root.
The msqrt
and mroot
elements accept the global Attribute
s.
The msqrt
and mroot
elements sets math-shift to compact. The mroot
element increments
scriptlevel by 2, and sets displaystyle to false
in all but its first child. The user agent
stylesheet must contain the following rule in order to implement that behavior:
mroot > :not(:first-child) {
math-depth: add(2);
math-style: compact;
}
mroot, msqrt {
math-shift: compact;
}
Implementations§
source§impl Radical
impl Radical
sourcepub fn builder() -> RadicalsBuilder<Uninit, Uninit>
pub fn builder() -> RadicalsBuilder<Uninit, Uninit>
Create a builder for the Radical
element.
sourcepub fn index(&self) -> &Elements
pub fn index(&self) -> &Elements
Get a reference to the index of the radical. e.g. “2” for the square root.
sourcepub fn content(&self) -> &[Element]
pub fn content(&self) -> &[Element]
Get a reference to the inner content of the Radical
element.
sourcepub fn attributes(&self) -> &[Attribute]
pub fn attributes(&self) -> &[Attribute]
Get a reference to all attributes of the Radical
element.
Trait Implementations§
source§impl IntoElements for Radical
impl IntoElements for Radical
source§fn into_elements(self) -> Elements
fn into_elements(self) -> Elements
source§impl Ord for Radical
impl Ord for Radical
source§impl PartialEq for Radical
impl PartialEq for Radical
source§impl PartialOrd for Radical
impl PartialOrd for Radical
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more