Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b025afd8c
|
No files matched your search
@@ -11,8 +11,6 @@ links below to their main page.
|
|||||||
- [**codly-languages**](https://typst.app/universe/package/codly-languages): A
|
- [**codly-languages**](https://typst.app/universe/package/codly-languages): A
|
||||||
set of language configurations for use with
|
set of language configurations for use with
|
||||||
[codly](https://typst.app/universe/package/codly).
|
[codly](https://typst.app/universe/package/codly).
|
||||||
- [easy-typography](https://typst.app/universe/package/easy-typography): Sets up
|
|
||||||
sensible typography defaults.
|
|
||||||
- [**glossy**](https://typst.app/universe/package/glossy): A very simple
|
- [**glossy**](https://typst.app/universe/package/glossy): A very simple
|
||||||
glossary system with easily customizable output.
|
glossary system with easily customizable output.
|
||||||
- [**rfc-vibe**](https://typst.app/universe/package/rfc-vibe): Bring RFC language
|
- [**rfc-vibe**](https://typst.app/universe/package/rfc-vibe): Bring RFC language
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
tests/**/out/
|
|
||||||
tests/**/diff/
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2025 Stephen Waits <steve@waits.net>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
# Easy Typography for Typst
|
|
||||||
|
|
||||||
A Typst package that simplifies professional typography by providing sensible
|
|
||||||
defaults and easy customization options. Focus on your content while ensuring
|
|
||||||
beautiful, readable documents.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
- 🎨 Precise heading scale with clear hierarchy
|
|
||||||
- 📏 Optimal line height and paragraph spacing
|
|
||||||
- 📖 Professional text justification and hyphenation
|
|
||||||
- ⚖️ Balanced vertical rhythm throughout
|
|
||||||
- ⚡ Simple configuration with reasonable defaults
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Basic usage with default settings:
|
|
||||||
|
|
||||||
```typst
|
|
||||||
#import "@preview/easy-typography:0.1.0": *
|
|
||||||
#show: easy-typography
|
|
||||||
|
|
||||||
= Your Document Title
|
|
||||||
Your content here...
|
|
||||||
```
|
|
||||||
|
|
||||||
Customized usage with specific fonts:
|
|
||||||
|
|
||||||
```typst
|
|
||||||
#show: easy-typography.with(
|
|
||||||
fonts: (
|
|
||||||
heading: "Source Sans Pro",
|
|
||||||
body: "Source Serif Pro"
|
|
||||||
),
|
|
||||||
body-size: 11pt,
|
|
||||||
paper: "a4",
|
|
||||||
margin: 2cm
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration Options
|
|
||||||
|
|
||||||
- `body-size`: Base size for body text (default: 10pt)
|
|
||||||
- `fonts`: Dictionary specifying heading and body fonts
|
|
||||||
- `heading`: Font for headings (default: "Libertinus Sans")
|
|
||||||
- `body`: Font for body text (default: "Libertinus Serif")
|
|
||||||
- `paper`: Paper size setting (optional)
|
|
||||||
- `margin`: Page margin setting (optional)
|
|
||||||
|
|
||||||
## Example Output
|
|
||||||
|
|
||||||
The package automatically handles:
|
|
||||||
|
|
||||||
- Heading sizes with natural visual hierarchy (H1-H5)
|
|
||||||
- Optimal spacing between elements
|
|
||||||
- Professional text justification
|
|
||||||
- Smart hyphenation
|
|
||||||
- Consistent vertical rhythm
|
|
||||||
|
|
||||||
See the [example output](thumbnail.png) for more information and a complete
|
|
||||||
example.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT License - See [LICENSE](LICENSE) for details.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#import "src/main.typ": easy-typography
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
// Constants
|
|
||||||
|
|
||||||
// space above H1
|
|
||||||
#let heading-above-max = 1.25em
|
|
||||||
|
|
||||||
// space above H5
|
|
||||||
#let heading-above-min = 0.80em
|
|
||||||
|
|
||||||
// space below H1
|
|
||||||
#let heading-below-max = 0.65em
|
|
||||||
|
|
||||||
// space below H5
|
|
||||||
#let heading-below-min = 0.55em
|
|
||||||
|
|
||||||
// font size for H1
|
|
||||||
#let heading-size-max = 1.10em
|
|
||||||
|
|
||||||
// font size for H5
|
|
||||||
#let heading-size-min = 1.00em
|
|
||||||
|
|
||||||
// default text weight -- light is best for reading, and printers are fine with
|
|
||||||
// it these days
|
|
||||||
#let body-weight = "light"
|
|
||||||
|
|
||||||
// line spacing -- tight; efficient but still readable with good fonts
|
|
||||||
#let line-spacing = 1.30
|
|
||||||
|
|
||||||
// paragraph spacing -- defaults to a double-space
|
|
||||||
#let paragraph-spacing = 1.70
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
#import "constants.typ": *
|
|
||||||
|
|
||||||
/// The main function for easy typography setup.
|
|
||||||
///
|
|
||||||
/// - body-size (): The size of body text (default 10pt).
|
|
||||||
/// - fonts (): A dictionary specifying heading/body fonts.
|
|
||||||
/// - paper (str): The paper size to use (none to skip).
|
|
||||||
/// - margin (): Margin for the page (none to skip).
|
|
||||||
/// -> content
|
|
||||||
#let easy-typography(
|
|
||||||
body-size: 10pt,
|
|
||||||
fonts: (heading: "Libertinus Sans", body: "Libertinus Serif"),
|
|
||||||
paper: none,
|
|
||||||
margin: none,
|
|
||||||
body
|
|
||||||
) = {
|
|
||||||
// Optional page setup
|
|
||||||
if paper != none {
|
|
||||||
set page(paper: paper)
|
|
||||||
}
|
|
||||||
if margin != none {
|
|
||||||
set page(margin: margin)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paragraphs
|
|
||||||
set par(
|
|
||||||
leading: line-spacing * 0.5em,
|
|
||||||
spacing: paragraph-spacing * 0.5em,
|
|
||||||
justify: true,
|
|
||||||
linebreaks: "optimized",
|
|
||||||
)
|
|
||||||
|
|
||||||
// Body text
|
|
||||||
set text(
|
|
||||||
font: fonts.body,
|
|
||||||
fallback: false,
|
|
||||||
style: "normal",
|
|
||||||
weight: body-weight,
|
|
||||||
stretch: 100%,
|
|
||||||
size: body-size,
|
|
||||||
tracking: 0pt,
|
|
||||||
spacing: 100% + 0pt,
|
|
||||||
baseline: 0pt,
|
|
||||||
overhang: true,
|
|
||||||
hyphenate: true,
|
|
||||||
kerning: true,
|
|
||||||
ligatures: true,
|
|
||||||
number-width: "proportional",
|
|
||||||
// number-type: "lining", // commented: intentionally left up to the font to choose
|
|
||||||
)
|
|
||||||
|
|
||||||
show table: set text(number-width: "tabular")
|
|
||||||
|
|
||||||
/// Top-heavy easing function for heading sizes/spacing.
|
|
||||||
///
|
|
||||||
/// `sqrt(t)` gives biggest decrease at top, gentlest at bottom.
|
|
||||||
///
|
|
||||||
/// - max (length): Biggest size (H1)
|
|
||||||
/// - min (length): Smallest size (H5)
|
|
||||||
/// - level (length): From 1 to 5
|
|
||||||
/// -> length
|
|
||||||
let compute-size(max, min, level) = {
|
|
||||||
if level <= 1 {
|
|
||||||
max
|
|
||||||
} else if level >= 5 {
|
|
||||||
min
|
|
||||||
} else {
|
|
||||||
let t = (level - 1) / 4
|
|
||||||
max - (max - min) * calc.sqrt(t)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Heading weight logic
|
|
||||||
let compute-weight(level) = {
|
|
||||||
if level <= 1 {
|
|
||||||
"bold"
|
|
||||||
} else if level == 2 {
|
|
||||||
"semibold"
|
|
||||||
} else if level == 3 {
|
|
||||||
"medium"
|
|
||||||
} else {
|
|
||||||
"regular"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show headings using computed size/spacing values
|
|
||||||
show heading: it => block(
|
|
||||||
breakable: false,
|
|
||||||
sticky: true,
|
|
||||||
above: compute-size(heading-above-max, heading-above-min, it.level),
|
|
||||||
below: compute-size(heading-below-max, heading-below-min, it.level),
|
|
||||||
text(
|
|
||||||
font: fonts.heading,
|
|
||||||
size: compute-size(heading-size-max, heading-size-min, it.level),
|
|
||||||
weight: compute-weight(it.level),
|
|
||||||
it
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
// Finally, render the body
|
|
||||||
body
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 769 KiB |
@@ -1,125 +0,0 @@
|
|||||||
#import "/lib.typ": *
|
|
||||||
|
|
||||||
#import "@preview/codly:1.2.0": *
|
|
||||||
#import "@preview/codly-languages:0.1.1": *
|
|
||||||
#show: codly-init.with()
|
|
||||||
#codly(languages: codly-languages)
|
|
||||||
|
|
||||||
#show: easy-typography.with(
|
|
||||||
fonts: (heading: "Source Sans 3", body: "Source Serif 4"),
|
|
||||||
)
|
|
||||||
|
|
||||||
= Introducing Easy Typography
|
|
||||||
|
|
||||||
#set heading(numbering: (..nums) => {
|
|
||||||
numbering("1.1.", ..nums.pos().slice(1))
|
|
||||||
})
|
|
||||||
|
|
||||||
The `easy-typography` package transforms complex typographic decisions into
|
|
||||||
simple choices, letting you focus on your content while ensuring professional
|
|
||||||
results. By adjusting the settings to match your specific needs, you can refine
|
|
||||||
the aesthetic or adapt your layout for everything from casual reading to formal
|
|
||||||
publication.
|
|
||||||
|
|
||||||
== Core Typography Features
|
|
||||||
|
|
||||||
The package manages:
|
|
||||||
|
|
||||||
#columns(2)[
|
|
||||||
- Precise heading scale with a clear hierarchy
|
|
||||||
- Optimal line height and paragraph spacing
|
|
||||||
#colbreak()
|
|
||||||
- Professional text justification and hyphenation
|
|
||||||
- Balanced vertical rhythm throughout
|
|
||||||
]
|
|
||||||
|
|
||||||
These features ensure that your document is both visually appealing and easy to
|
|
||||||
read.
|
|
||||||
|
|
||||||
=== Type Formatting
|
|
||||||
|
|
||||||
This package automatically adjusts line spacing, paragraph spacing, and
|
|
||||||
justification to maintain a clean layout. Headings are also carefully weighted
|
|
||||||
to balance them against the body text, so you can focus on content rather than
|
|
||||||
tweaking spacing and sizing. Standard formatting like *bold* and _italic_
|
|
||||||
integrates seamlessly with `easy-typography`'s approach.
|
|
||||||
|
|
||||||
=== Heading Levels
|
|
||||||
|
|
||||||
The heading scale gracefully steps down, ensuring that each level remains
|
|
||||||
distinct yet consistent. Behind the scenes, `easy-typography` calculates the
|
|
||||||
ideal size for each heading, preserving a cohesive visual hierarchy as your
|
|
||||||
document gets deeper. This approach supports manuals, academic papers, and any
|
|
||||||
long-form text where structure matters. It also helps in shorter documents,
|
|
||||||
guaranteeing a crisp layout with minimal effort.
|
|
||||||
|
|
||||||
== Why Typography Matters
|
|
||||||
|
|
||||||
Good typography isn't just about aesthetics. It's about effective communication.
|
|
||||||
Well-designed text:
|
|
||||||
|
|
||||||
#columns(2)[
|
|
||||||
- Improves reading comprehension
|
|
||||||
- Reduces eye strain
|
|
||||||
- Maintains reader engagement
|
|
||||||
#colbreak()
|
|
||||||
- Establishes visual hierarchy
|
|
||||||
- Conveys professionalism
|
|
||||||
]
|
|
||||||
|
|
||||||
Notice how this document's typography enhances readability. The justified text,
|
|
||||||
proper hyphenation, and optimized line breaks create a clean, professional
|
|
||||||
appearance. With each heading level, the user can quickly scan and digest
|
|
||||||
important information.
|
|
||||||
|
|
||||||
== Example Usage and Output
|
|
||||||
|
|
||||||
#set heading(numbering: none)
|
|
||||||
#show raw.where(block: true): set text(size: 7pt)
|
|
||||||
|
|
||||||
#grid(
|
|
||||||
columns: (55%, auto),
|
|
||||||
gutter: 1.0em,
|
|
||||||
[
|
|
||||||
// code
|
|
||||||
```typst
|
|
||||||
#import "@preview/easy-typography:0.1.0": *
|
|
||||||
#show: easy-typography.with(
|
|
||||||
fonts: (
|
|
||||||
heading: "Source Sans Pro",
|
|
||||||
body: "Source Serif Pro"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
#lorem(6)
|
|
||||||
= Level One
|
|
||||||
#lorem(6)
|
|
||||||
== Level Two
|
|
||||||
#lorem(6)
|
|
||||||
=== Level Three
|
|
||||||
#lorem(6)
|
|
||||||
==== Level Four
|
|
||||||
#lorem(6)
|
|
||||||
===== Level Five
|
|
||||||
#lorem(6)
|
|
||||||
```
|
|
||||||
],
|
|
||||||
box(
|
|
||||||
stroke: 0.5pt + silver,
|
|
||||||
inset: 0.5em,
|
|
||||||
radius: 0.2em,
|
|
||||||
[
|
|
||||||
#lorem(6)
|
|
||||||
= Level One
|
|
||||||
#lorem(6)
|
|
||||||
== Level Two
|
|
||||||
#lorem(6)
|
|
||||||
=== Level Three
|
|
||||||
#lorem(6)
|
|
||||||
==== Level Four
|
|
||||||
#lorem(6)
|
|
||||||
===== Level Five
|
|
||||||
#lorem(6)
|
|
||||||
]
|
|
||||||
) // box
|
|
||||||
)
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 306 KiB |
@@ -1,10 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "easy-typography"
|
|
||||||
version = "0.1.0"
|
|
||||||
entrypoint = "lib.typ"
|
|
||||||
authors = ["Stephen Waits <steve@waits.net>"]
|
|
||||||
license = "MIT"
|
|
||||||
description = "Sets up sensible typography defaults."
|
|
||||||
keywords = ["easy", "typography", "defaults"]
|
|
||||||
repository = "https://github.com/swaits/typst-collection"
|
|
||||||
exclude = ["thumbnail.png", "tests"]
|
|
||||||
@@ -15,7 +15,7 @@ education, experience, skills, and more.
|
|||||||
To use this template, import it with the version number and utilize the `resume` or `cv` function:
|
To use this template, import it with the version number and utilize the `resume` or `cv` function:
|
||||||
|
|
||||||
```typst
|
```typst
|
||||||
#import "@preview/finely-crafted-cv:0.1.0": *
|
#import "@preview/finely-crafted-cv:0.2.0": *
|
||||||
|
|
||||||
#show: resume.with(
|
#show: resume.with(
|
||||||
name: "Amira Patel",
|
name: "Amira Patel",
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
// Constants
|
// Constants
|
||||||
#let SIZE_HUGE = 1.3em
|
#let SIZE_HUGE = 1.5em
|
||||||
#let SIZE_LARGE = 1.1em
|
#let SIZE_LARGE = 1.1em
|
||||||
#let SIZE_NORMAL = 1em
|
#let SIZE_NORMAL = 1em
|
||||||
#let SIZE_SMALL = 0.9em
|
#let SIZE_SMALL = 0.9em
|
||||||
#let SIZE_TINY = 0.7em
|
#let SIZE_TINY = 0.7em
|
||||||
|
|
||||||
#let BODY_FONT = "Libertinus Serif"
|
#let BODY_FONT = "Source Serif Pro"
|
||||||
#let BODY_SIZE = 11pt
|
#let BODY_SIZE = 11pt
|
||||||
#let BODY_WEIGHT = "light"
|
#let BODY_WEIGHT = "light"
|
||||||
#let HEADING_FONT = "Libertinus Serif"
|
#let HEADING_FONT = "Source Sans Pro"
|
||||||
|
|
||||||
#let PAGE_MARGIN = 0.5in
|
#let PAGE_MARGIN = 0.5in
|
||||||
|
|
||||||
@@ -20,25 +20,28 @@
|
|||||||
#let FOOTER_TEXT_WEIGHT = "thin"
|
#let FOOTER_TEXT_WEIGHT = "thin"
|
||||||
|
|
||||||
#let HEADLINE_NAME_SIZE = SIZE_HUGE
|
#let HEADLINE_NAME_SIZE = SIZE_HUGE
|
||||||
#let HEADLINE_NAME_WEIGHT = "black"
|
#let HEADLINE_NAME_WEIGHT = "bold"
|
||||||
#let HEADLINE_HRULE_STROKE = 1pt + black
|
#let HEADLINE_HRULE_STROKE = 1pt + black
|
||||||
|
|
||||||
#let TAGLINE_SIZE = SIZE_NORMAL
|
#let TAGLINE_SIZE = SIZE_NORMAL
|
||||||
#let TAGLINE_STYLE = "italic"
|
#let TAGLINE_STYLE = "italic"
|
||||||
#let TAGLINE_WEIGHT = "regular"
|
#let TAGLINE_WEIGHT = "regular"
|
||||||
|
|
||||||
#let SECTION_HEADING_SIZE = 0.7em // TODO: this seems wrong, should be SIZE_NORMAL (etc)
|
#let SECTION_HEADING_SIZE = 0.8em // TODO: this seems wrong, should be SIZE_NORMAL (etc)
|
||||||
#let SECTION_HEADING_WEIGHT = "bold"
|
#let SECTION_HEADING_WEIGHT = "semibold"
|
||||||
#let SECTION_HEADING_HRULE_STROKE = 0.75pt + black.lighten(25%)
|
#let SECTION_HEADING_HRULE_STROKE = 0.75pt + navy.lighten(10%)
|
||||||
#let SECTION_HEADING_SPACE_ABOVE = 1em
|
#let SECTION_HEADING_SPACE_ABOVE = 1em
|
||||||
#let SECTION_HEADING_SPACE_BELOW = 0.5em
|
#let SECTION_HEADING_SPACE_BELOW = 0.5em
|
||||||
|
#let SECTION_HEADING_BLOCK_FILL = luma(100%) //gradient.linear(blue.lighten(99%), luma(100%))
|
||||||
|
#let SECTION_HEADING_BLOCK_RADIUS = 2pt
|
||||||
|
#let SECTION_HEADING_BLOCK_OUTSET = 0.2em
|
||||||
|
|
||||||
#let COMPANY_ICON_SIZE = SIZE_NORMAL
|
#let COMPANY_ICON_SIZE = SIZE_NORMAL
|
||||||
#let COMPANY_ICON_SPACING = 0.25em
|
#let COMPANY_ICON_SPACING = 0.25em
|
||||||
#let COMPANY_NAME_SIZE = SIZE_LARGE
|
#let COMPANY_NAME_SIZE = SIZE_LARGE
|
||||||
#let COMPANY_NAME_WEIGHT = "bold"
|
#let COMPANY_NAME_WEIGHT = "semibold"
|
||||||
#let COMPANY_DATE_SIZE = COMPANY_NAME_SIZE
|
#let COMPANY_DATE_SIZE = COMPANY_NAME_SIZE
|
||||||
#let COMPANY_DATE_WEIGHT = "bold"
|
#let COMPANY_DATE_WEIGHT = "semibold"
|
||||||
#let COMPANY_BLOCK_BELOW = 1.3em
|
#let COMPANY_BLOCK_BELOW = 1.3em
|
||||||
|
|
||||||
#let JOB_NAME_SIZE = SIZE_NORMAL
|
#let JOB_NAME_SIZE = SIZE_NORMAL
|
||||||
@@ -49,8 +52,9 @@
|
|||||||
#let JOB_LOCATION_WEIGHT = "light"
|
#let JOB_LOCATION_WEIGHT = "light"
|
||||||
#let JOB_BLOCK_ABOVE = 0.6em
|
#let JOB_BLOCK_ABOVE = 0.6em
|
||||||
#let JOB_BLOCK_BELOW = 1em
|
#let JOB_BLOCK_BELOW = 1em
|
||||||
|
#let EMPTY_JOB_NUDGE = -0.75em
|
||||||
|
|
||||||
#let TABLE_HEADER_COLOR = blue.lighten(60%)
|
#let TABLE_HEADER_COLOR = blue.lighten(70%)
|
||||||
#let TABLE_ZEBRA_COLOR_0 = green.lighten(85%)
|
#let TABLE_ZEBRA_COLOR_0 = green.lighten(85%)
|
||||||
#let TABLE_ZEBRA_COLOR_1 = green.lighten(95%)
|
#let TABLE_ZEBRA_COLOR_1 = green.lighten(95%)
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
header: context {
|
header: context {
|
||||||
if here().page() == 1 {
|
if here().page() == 1 {
|
||||||
text(
|
text(
|
||||||
|
font: heading-font,
|
||||||
size: HEADER_SIZE,
|
size: HEADER_SIZE,
|
||||||
grid(
|
grid(
|
||||||
columns: (1fr, auto, auto, auto, auto, auto),
|
columns: (1fr, auto, auto, auto, auto, auto),
|
||||||
@@ -79,12 +80,16 @@
|
|||||||
block(
|
block(
|
||||||
above: SECTION_HEADING_SPACE_ABOVE,
|
above: SECTION_HEADING_SPACE_ABOVE,
|
||||||
below: SECTION_HEADING_SPACE_BELOW,
|
below: SECTION_HEADING_SPACE_BELOW,
|
||||||
|
fill: SECTION_HEADING_BLOCK_FILL,
|
||||||
|
radius: SECTION_HEADING_BLOCK_RADIUS,
|
||||||
|
outset: SECTION_HEADING_BLOCK_OUTSET,
|
||||||
breakable: false,
|
breakable: false,
|
||||||
[
|
[
|
||||||
#text(size: SECTION_HEADING_SIZE, weight: SECTION_HEADING_WEIGHT, font: heading-font)[
|
#text(size: SECTION_HEADING_SIZE, weight: SECTION_HEADING_WEIGHT, font: heading-font)[
|
||||||
#context counter(heading).display()
|
#context counter(heading).display()
|
||||||
#upper(it.body)
|
#smallcaps(it.body)
|
||||||
]
|
]
|
||||||
|
#v(-0.25em)
|
||||||
#hrule(stroke: SECTION_HEADING_HRULE_STROKE)
|
#hrule(stroke: SECTION_HEADING_HRULE_STROKE)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@@ -103,6 +108,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
show table.cell.where(y: 0): set text(font: heading-font)
|
||||||
|
|
||||||
// Save our settings needed in other functions
|
// Save our settings needed in other functions
|
||||||
__set("heading-font", heading-font)
|
__set("heading-font", heading-font)
|
||||||
@@ -173,6 +179,12 @@
|
|||||||
#let school-heading = company-heading
|
#let school-heading = company-heading
|
||||||
|
|
||||||
#let job-heading(title, location: none, start: none, end: none, comment: none, body) = {
|
#let job-heading(title, location: none, start: none, end: none, comment: none, body) = {
|
||||||
|
// if we have an empty body, we need to nudge this up
|
||||||
|
let the-body = if repr(body) == "[]" {
|
||||||
|
v(EMPTY_JOB_NUDGE)
|
||||||
|
} else {
|
||||||
|
body
|
||||||
|
}
|
||||||
block(
|
block(
|
||||||
above: JOB_BLOCK_ABOVE,
|
above: JOB_BLOCK_ABOVE,
|
||||||
below: JOB_BLOCK_BELOW,
|
below: JOB_BLOCK_BELOW,
|
||||||
@@ -218,7 +230,7 @@
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
||||||
grid.cell(colspan: 5, body)
|
grid.cell(colspan: 5, the-body)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
#import "@preview/finely-crafted-cv:0.1.0": *
|
#import "@preview/finely-crafted-cv:0.2.0": *
|
||||||
|
|
||||||
#show: resume.with(
|
#show: resume.with(
|
||||||
name: "Amira Patel",
|
name: "Amira Patel",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 395 KiB After Width: | Height: | Size: 977 KiB |
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "finely-crafted-cv"
|
name = "finely-crafted-cv"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
entrypoint = "lib.typ"
|
entrypoint = "lib.typ"
|
||||||
authors = ["Stephen Waits <steve@waits.net>"]
|
authors = ["Stephen Waits <steve@waits.net>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
Reference in new issue
Block a user