#How to separate two lines the same length as if an extra line was in between?
36 messages · Page 1 of 1 (latest)
you want a white rectangle between the two? I'm not sure I get what you're aiming for
?r
Hello \ \ Bye
dont worry
use the v function instead of using linebreaks like that
why?
?r ```
line 1
#v(1em)
line 2
On the contrary, linebreaks is exactly what they're looking for if they want the exact same spacing
That being said, I smell an xy problem
What is your actual goal @thin geode ?
i have a lil of OCD so my goal is lil strange
a just want to keep the exact same spacing when i want
for example see this:
??
Why does this happen? The space isn't the same between the author and the title and between the author and body.
That's impossible to say without knowing what your template looks like
it'd depend on your definition of base here
alr alr im sending it wait a moment
Instead of sending the whole thing, try to reduce your question down to a minimal example
#let base(
size: 11pt,
title: none,
authors: none,
doc
) = {
// Base
show heading: v => text(weight: "regular", size: size*1.5, smallcaps(v))
set text(font: "New Computer Modern", size: size)
show raw: set text(font: "Noto Sans Mono")
set math.equation(supplement: none)
set heading(numbering: "1.")
set par(justify: true)
// Specific
align(center)[
#text(size*2, title) \ \
#authors \ \
]
doc
}
well the spacing between the title and author is a single line, while the spacing with the document also has block spacing
I'd suggest not relying on linebreaks for spacing like this at all @thin geode
👌
which element took usage of the block?
align is block-level
@hexed cairn so i used #v(1em) instead of a double linelibreak but the space is way too large
idkw
then make it smaller than 1em?
?r ```
#let base(
size: 11pt,
title: none,
authors: none,
doc
) = {
// Base
show heading: v => text(weight: "regular", size: size*1.5, smallcaps(v))
set text(font: "New Computer Modern", size: size)
show raw: set text(font: "Noto Sans Mono")
set math.equation(supplement: none)
set heading(numbering: "1.")
set par(justify: true)
// Specific
align(center)[
#text(size*2, title) #v(size * 2, weak: true) #authors #v(size * 2, weak: true)
]
doc
}
#show: doc => base(
title: [Title],
authors: [Authors],
doc
)
#lorem(50)
do you mind explaining what does the weak thingy?
If true, the spacing collapses at the start or end of a flow. Moreover, from multiple adjacent weak spacings all but the largest one collapse. Weak spacings will always collapse adjacent paragraph spacing, even if the paragraph spacing is larger.
excellent, thats what i wanted, perfect spacing