#How to separate two lines the same length as if an extra line was in between?

36 messages · Page 1 of 1 (latest)

thin geode
#

?r

Hello \
#text(fill: rgb("313338"))[Whats' good?] \
Bye
dim pollen
#

you want a white rectangle between the two? I'm not sure I get what you're aiming for

thin geode
#

?r

Hello \ \ Bye
slender tendonBOT
thin geode
#

dont worry

dim pollen
#

use the v function instead of using linebreaks like that

thin geode
#

why?

dim pollen
#

?r ```
line 1
#v(1em)
line 2

slender tendonBOT
hexed cairn
#

That being said, I smell an xy problem

#

What is your actual goal @thin geode ?

thin geode
#

a just want to keep the exact same spacing when i want

#

for example see this:

hexed cairn
#

??

thin geode
#

Why does this happen? The space isn't the same between the author and the title and between the author and body.

hexed cairn
#

That's impossible to say without knowing what your template looks like

dim pollen
#

it'd depend on your definition of base here

thin geode
hexed cairn
thin geode
#
#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                          
}
hexed cairn
#

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

thin geode
#

👌

thin geode
dim pollen
#

align is block-level

thin geode
#

@hexed cairn so i used #v(1em) instead of a double linelibreak but the space is way too large

#

idkw

hexed cairn
dim pollen
#

?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)

slender tendonBOT
thin geode
#

do you mind explaining what does the weak thingy?

dim pollen
#

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.

thin geode