This commit is contained in:
parent
23440a4b3c
commit
3ffaed4bde
3 changed files with 252 additions and 1 deletions
|
|
@ -38,6 +38,37 @@ pirat-color.red,
|
|||
}
|
||||
]
|
||||
|
||||
#let highlight-color = pirat-color.blue.lighten(40%)
|
||||
|
||||
/* don't work ? at least for raw block?
|
||||
#let scale-down-to-page(body) = {
|
||||
layout(size => {
|
||||
let size_body = measure(body)
|
||||
let ratio = if size_body.width == 0pt and size_body.height == 0pt {
|
||||
none
|
||||
} else if size_body.width == 0pt {
|
||||
size.height / size_body.height
|
||||
} else if size_body.height == 0pt {
|
||||
size.width / size_body.width
|
||||
} else {
|
||||
let r_x = size.width / size_body.width
|
||||
let r_y = size.height / size_body.height
|
||||
calc.max(r_x, r_y)
|
||||
}
|
||||
if ratio == none or ratio >= 1 {
|
||||
body
|
||||
} else {
|
||||
scale(ratio * 100%, body)
|
||||
}
|
||||
repr(size)
|
||||
linebreak()
|
||||
repr(size_body)
|
||||
linebreak()
|
||||
repr(ratio*100%)
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
#let ghost(
|
||||
img, x: 0pt,
|
||||
y: 0pt,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue