mirror of https://github.com/stelzo/typst.git
Disable line numbers for block equations (#5163)
This commit is contained in:
parent
b7725a7442
commit
9ee80762a5
|
|
@ -17,7 +17,7 @@ use crate::layout::{
|
|||
use crate::math::{
|
||||
scaled_font_size, MathContext, MathRunFrameBuilder, MathSize, MathVariant,
|
||||
};
|
||||
use crate::model::{Numbering, Outlinable, ParElem, Refable, Supplement};
|
||||
use crate::model::{Numbering, Outlinable, ParElem, ParLine, Refable, Supplement};
|
||||
use crate::syntax::Span;
|
||||
use crate::text::{
|
||||
families, variant, Font, FontFamily, FontList, FontWeight, LocalName, TextElem,
|
||||
|
|
@ -180,6 +180,7 @@ impl ShowSet for Packed<EquationElem> {
|
|||
if self.block(styles) {
|
||||
out.set(AlignElem::set_alignment(Alignment::CENTER));
|
||||
out.set(BlockElem::set_breakable(false));
|
||||
out.set(ParLine::set_numbering(None));
|
||||
out.set(EquationElem::set_size(MathSize::Display));
|
||||
} else {
|
||||
out.set(EquationElem::set_size(MathSize::Text));
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 428 B |
|
|
@ -247,3 +247,12 @@ Line 3
|
|||
[DDD], [DDD],
|
||||
[This is], move(dy: 3pt)[tough]
|
||||
)
|
||||
|
||||
--- line-numbers-equation-number ---
|
||||
#set page(margin: (left: 2.5em))
|
||||
#set par.line(numbering: "1")
|
||||
#set math.equation(numbering: "(1)")
|
||||
|
||||
A
|
||||
$ x $
|
||||
B
|
||||
|
|
|
|||
Loading…
Reference in New Issue