transfer from old repo

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-08-19 09:27:27 +02:00
commit 277e2b8cf3
No known key found for this signature in database
1111 changed files with 83736 additions and 0 deletions

View file

@ -0,0 +1,11 @@
title: Poster
author: Carlos Scheidegger
version: 1.0.0
quarto-required: ">=1.4.415"
contributes:
formats:
typst:
template-partials:
- typst-template.typ
- typst-show.typ

View file

@ -0,0 +1,74 @@
// Typst custom formats typically consist of a 'typst-template.typ' (which is
// the source code for a typst template) and a 'typst-show.typ' which calls the
// template's function (forwarding Pandoc metadata values as required)
//
// This is an example 'typst-show.typ' file (based on the default template
// that ships with Quarto). It calls the typst function named 'article' which
// is defined in the 'typst-template.typ' file.
//
// If you are creating or packaging a custom typst template you will likely
// want to replace this file and 'typst-template.typ' entirely. You can find
// documentation on creating typst templates here and some examples here:
// - https://typst.app/docs/tutorial/making-a-template/
// - https://github.com/typst/templates
#show: doc => poster(
$if(title)$ title: [$title$], $endif$
// TODO: use Quarto's normalized metadata.
$if(poster-authors)$ authors: [$poster-authors$], $endif$
$if(departments)$ departments: [$departments$], $endif$
$if(size)$ size: "$size$", $endif$
// Institution logo.
$if(institution-logo)$ univ_logo: "$institution-logo$", $endif$
// Footer text.
// For instance, Name of Conference, Date, Location.
// or Course Name, Date, Instructor.
$if(footer-text)$ footer_text: [$footer-text$], $endif$
// Any URL, like a link to the conference website.
$if(footer-url)$ footer_url: [$footer-url$], $endif$
// Emails of the authors.
$if(footer-emails)$ footer_email_ids: [$footer-emails$], $endif$
// Color of the footer.
$if(footer-color)$ footer_color: "$footer-color$", $endif$
// DEFAULTS
// ========
// For 3-column posters, these are generally good defaults.
// Tested on 36in x 24in, 48in x 36in, and 36in x 48in posters.
// For 2-column posters, you may need to tweak these values.
// See ./examples/example_2_column_18_24.typ for an example.
// Any keywords or index terms that you want to highlight at the beginning.
$if(keywords)$ keywords: ($for(keywords)$"$it$"$sep$, $endfor$), $endif$
// Number of columns in the poster.
$if(num-columns)$ num_columns: $num-columns$, $endif$
// University logo's scale (in %).
$if(univ-logo-scale)$ univ_logo_scale: $univ_logo_scale$, $endif$
// University logo's column size (in in).
$if(univ-logo-column-size)$ univ_logo_column_size: $univ_logo_column_size$, $endif$
// Title and authors' column size (in in).
$if(title-column-size)$ title_column_size: $title_column_size$, $endif$
// Poster title's font size (in pt).
$if(title-font-size)$ title_font_size: $title_font_size$, $endif$
// Authors' font size (in pt).
$if(authors-font-size)$ authors_font_size: $authors_font_size$, $endif$
// Footer's URL and email font size (in pt).
$if(footer-url-font-size)$ footer_url_font_size: $footer_url_font_size$, $endif$
// Footer's text font size (in pt).
$if(footer-text-font-size)$ footer_text_font_size: [$footer_text_font_size$], $endif$
doc,
)

View file

@ -0,0 +1,190 @@
#let poster(
// The poster's size.
size: "'36x24' or '48x36''",
// The poster's title.
title: "Paper Title",
// A string of author names.
authors: "Author Names (separated by commas)",
// Department name.
departments: "Department Name",
// University logo.
univ_logo: "Logo Path",
// Footer text.
// For instance, Name of Conference, Date, Location.
// or Course Name, Date, Instructor.
footer_text: "Footer Text",
// Any URL, like a link to the conference website.
footer_url: "Footer URL",
// Email IDs of the authors.
footer_email_ids: "Email IDs (separated by commas)",
// Color of the footer.
footer_color: "Hex Color Code",
// DEFAULTS
// ========
// For 3-column posters, these are generally good defaults.
// Tested on 36in x 24in, 48in x 36in, and 36in x 48in posters.
// For 2-column posters, you may need to tweak these values.
// See ./examples/example_2_column_18_24.typ for an example.
// Any keywords or index terms that you want to highlight at the beginning.
keywords: (),
// Number of columns in the poster.
num_columns: "3",
// University logo's scale (in %).
univ_logo_scale: "100",
// University logo's column size (in in).
univ_logo_column_size: "10",
// Title and authors' column size (in in).
title_column_size: "20",
// Poster title's font size (in pt).
title_font_size: "48",
// Authors' font size (in pt).
authors_font_size: "36",
// Footer's URL and email font size (in pt).
footer_url_font_size: "30",
// Footer's text font size (in pt).
footer_text_font_size: "40",
// The poster's content.
body
) = {
// Set the body font.
set text(font: "STIX Two Text", size: 16pt)
let sizes = size.split("x")
let width = int(sizes.at(0)) * 1in
let height = int(sizes.at(1)) * 1in
univ_logo_scale = int(univ_logo_scale) * 1%
title_font_size = int(title_font_size) * 1pt
authors_font_size = int(authors_font_size) * 1pt
num_columns = int(num_columns)
univ_logo_column_size = int(univ_logo_column_size) * 1in
title_column_size = int(title_column_size) * 1in
footer_url_font_size = int(footer_url_font_size) * 1pt
footer_text_font_size = int(footer_text_font_size) * 1pt
// Configure the page.
// This poster defaults to 36in x 24in.
set page(
width: width,
height: height,
margin:
(top: 1in, left: 2in, right: 2in, bottom: 2in),
footer: [
#set align(center)
#set text(32pt)
#block(
fill: rgb(footer_color),
width: 100%,
inset: 20pt,
radius: 10pt,
[
#text(font: "Courier", size: footer_url_font_size, footer_url)
#h(1fr)
#text(size: footer_text_font_size, smallcaps(footer_text))
#h(1fr)
#text(font: "Courier", size: footer_url_font_size, footer_email_ids)
]
)
]
)
// Configure equation numbering and spacing.
set math.equation(numbering: "(1)")
show math.equation: set block(spacing: 0.65em)
// Configure lists.
set enum(indent: 10pt, body-indent: 9pt)
set list(indent: 10pt, body-indent: 9pt)
// Configure headings.
set heading(numbering: "I.A.1.")
show heading: it => locate(loc => {
// Find out the final number of the heading counter.
let levels = counter(heading).at(loc)
let deepest = if levels != () {
levels.last()
} else {
1
}
set text(24pt, weight: 400)
if it.level == 1 [
// First-level headings are centered smallcaps.
#set align(center)
#set text({ 32pt })
#show: smallcaps
#v(50pt, weak: true)
#if it.numbering != none {
numbering("I.", deepest)
h(7pt, weak: true)
}
#it.body
#v(35.75pt, weak: true)
#line(length: 100%)
] else if it.level == 2 [
// Second-level headings are run-ins.
#set text(style: "italic")
#v(32pt, weak: true)
#if it.numbering != none {
numbering("i.", deepest)
h(7pt, weak: true)
}
#it.body
#v(10pt, weak: true)
] else [
// Third level headings are run-ins too, but different.
#if it.level == 3 {
numbering("1)", deepest)
[ ]
}
_#(it.body):_
]
})
// Arranging the logo, title, authors, and department in the header.
align(center,
grid(
rows: 2,
columns: (univ_logo_column_size, title_column_size),
column-gutter: 0pt,
row-gutter: 50pt,
image(univ_logo, width: univ_logo_scale),
text(title_font_size, title + "\n\n") +
text(authors_font_size, emph(authors) +
" (" + departments + ") "),
)
)
// Start three column mode and configure paragraph properties.
show: columns.with(num_columns, gutter: 64pt)
set par(justify: true, first-line-indent: 0em)
show par: set block(spacing: 0.65em)
// Display the keywords.
if keywords != () [
#set text(24pt, weight: 400)
#show "Keywords": smallcaps
*Keywords* --- #keywords.join(", ")
]
// Display the poster's contents.
body
}