fix: revert making math elements Locatable

This commit is contained in:
Tobias Schmitz 2025-07-13 17:53:55 +02:00
parent 3c46056599
commit e5e5fba418
No known key found for this signature in database
2 changed files with 3 additions and 5 deletions

View File

@ -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]

View File

@ -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]