Skip to content

Instantly share code, notes, and snippets.

@jeremyforan
Last active June 18, 2025 18:11
Show Gist options
  • Save jeremyforan/96df2e32b1488a288f5f51389dc5ef10 to your computer and use it in GitHub Desktop.
Save jeremyforan/96df2e32b1488a288f5f51389dc5ef10 to your computer and use it in GitHub Desktop.
#let img1 = sys.inputs.at("imageOne", default: "top.jpg")
#let img2 = sys.inputs.at("imageTwo", default: "middle.jpg")
#let img3 = sys.inputs.at("imageThree", default: "bottom.jpg")
#let img4 = sys.inputs.at("imageFour", default: "top.jpg")
// CONFIGURATION ///////////////////////////////////////
#let pageHeight = 6in
#let pageWidth = 4in
// the ratio is the native aspect ratio of the images
#let ratio = 1.5
#let corner = 1pt
#let imgWidth = 1.65in
#let imgHeight = imgWidth / ratio
#let yPadding = ((pageWidth / 2) - (imgWidth)) / 2 - 3mm
#let xPadding = ((pageWidth / 2) - (imgWidth)) / 2
#let middle_buffer = 3mm
// FUNCTIONS ///////////////////////////////////////////
#let photo(img) = {
box(
image(img, width: imgWidth, height: imgHeight),
clip: true,
radius: corner,
)
}
#let images = (
photo(img1),
photo(img2),
photo(img3),
photo(img4),
)
#let imageColumn = block(
grid(
columns: 1,
rows: 4,
gutter: yPadding,
..images,
),
)
// LAYOUT ///////////////////////////////////////////////
#set page(
background: image("assets/background3_double.png"),
height: pageHeight,
width: pageWidth,
margin: 0in,
)
#set align(center)
// Left Column
#place(
dx: xPadding - middle_buffer,
dy: yPadding + 0.4in,
)[
#imageColumn
]
// Right Column
#place(
dx: xPadding + pageWidth / 2 + middle_buffer,
dy: yPadding + 0.4in,
)[
#grid(
imageColumn
)
]
#let char_set = {
image("assets/characters_only.png", width: 50%)
}
#place(dx: 0in, dy: 4.8in)[#char_set]
#place(dx: 2in, dy: 4.8in)[#char_set]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment