mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
fix: revert making math elements Locatable
This commit is contained in:
parent
3c46056599
commit
e5e5fba418
@ -28,7 +28,6 @@ use typst_utils::singleton;
|
|||||||
use unicode_math_class::MathClass;
|
use unicode_math_class::MathClass;
|
||||||
|
|
||||||
use crate::foundations::{elem, Content, Module, NativeElement, Scope};
|
use crate::foundations::{elem, Content, Module, NativeElement, Scope};
|
||||||
use crate::introspection::Locatable;
|
|
||||||
use crate::layout::{Em, HElem};
|
use crate::layout::{Em, HElem};
|
||||||
use crate::text::TextElem;
|
use crate::text::TextElem;
|
||||||
|
|
||||||
@ -111,7 +110,7 @@ pub fn module() -> Module {
|
|||||||
pub trait Mathy {}
|
pub trait Mathy {}
|
||||||
|
|
||||||
/// A math alignment point: `&`, `&&`.
|
/// A math alignment point: `&`, `&&`.
|
||||||
#[elem(title = "Alignment Point", Mathy, Locatable)]
|
#[elem(title = "Alignment Point", Mathy)]
|
||||||
pub struct AlignPointElem {}
|
pub struct AlignPointElem {}
|
||||||
|
|
||||||
impl AlignPointElem {
|
impl AlignPointElem {
|
||||||
@ -138,7 +137,7 @@ impl AlignPointElem {
|
|||||||
///
|
///
|
||||||
/// $x loves y and y loves 5$
|
/// $x loves y and y loves 5$
|
||||||
/// ```
|
/// ```
|
||||||
#[elem(Mathy, Locatable)]
|
#[elem(Mathy)]
|
||||||
pub struct ClassElem {
|
pub struct ClassElem {
|
||||||
/// The class to apply to the content.
|
/// The class to apply to the content.
|
||||||
#[required]
|
#[required]
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
use typst_syntax::Span;
|
use typst_syntax::Span;
|
||||||
|
|
||||||
use crate::foundations::{elem, func, Content, NativeElement};
|
use crate::foundations::{elem, func, Content, NativeElement};
|
||||||
use crate::introspection::Locatable;
|
|
||||||
use crate::math::Mathy;
|
use crate::math::Mathy;
|
||||||
|
|
||||||
/// A square root.
|
/// A square root.
|
||||||
@ -23,7 +22,7 @@ pub fn sqrt(
|
|||||||
/// ```example
|
/// ```example
|
||||||
/// $ root(3, x) $
|
/// $ root(3, x) $
|
||||||
/// ```
|
/// ```
|
||||||
#[elem(Mathy, Locatable)]
|
#[elem(Mathy)]
|
||||||
pub struct RootElem {
|
pub struct RootElem {
|
||||||
/// Which root of the radicand to take.
|
/// Which root of the radicand to take.
|
||||||
#[positional]
|
#[positional]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user