-
Notifications
You must be signed in to change notification settings - Fork 1.1k
prinzipien:0.1.1 #5242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Entze
wants to merge
1
commit into
typst:main
Choose a base branch
from
Entze:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
prinzipien:0.1.1 #5242
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| Boost Software License - Version 1.0 - August 17th, 2003 | ||
|
|
||
| Permission is hereby granted, free of charge, to any person or organization | ||
| obtaining a copy of the software and accompanying documentation covered by | ||
| this license (the "Software") to use, reproduce, display, distribute, | ||
| execute, and transmit the Software, and to prepare derivative works of the | ||
| Software, and to permit third-parties to whom the Software is furnished to | ||
| do so, all subject to the following: | ||
|
|
||
| The copyright notices in the Software and this entire statement, including | ||
| the above license grant, this restriction and the following disclaimer, | ||
| must be included in all copies of the Software, in whole or in part, and | ||
| all derivative works of the Software, unless such copies or derivative | ||
| works are solely in the form of machine-executable object code generated by | ||
| a source language processor. | ||
|
|
||
| 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
| SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
| FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
| ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| DEALINGS IN THE SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # prinzipien | ||
|
|
||
| [](https://typst.app/universe/package/prinzipien) | ||
| [](LICENSE.txt) | ||
| [](https://touying-typ.github.io/) | ||
|
|
||
| Prinzipien is a [Typst](https://typst.app) theme for | ||
| [Touying](https://touying-typ.github.io/) presentations, built on the design | ||
| principles of Jean-luc Doumont's _Trees, maps, and theorems_: **one message per | ||
| slide**. Each slide states a single, full-sentence message as its title, set | ||
| flush against a wide left margin, and a single accent colour — with tints | ||
| derived from it — does all the visual work. | ||
|
|
||
| - **One message per slide** — the slide title is a full sentence stating the takeaway. | ||
| - **A wide, Doumont-style left margin** that structures every slide. | ||
| - **A single accent colour**, with tints derived automatically for emphasis and de-emphasis. | ||
| - **Automatic overview slides** — `preview`, section `transition`s, and `review` build a map of your points. | ||
| - **Batteries included** — a title slide, appendix numbering, and logo support. | ||
| - **Configured in one place** — aspect ratio, margin width, colours, and logo. | ||
|
|
||
| ## Showcase | ||
|
|
||
|  | ||
|
|
||
| The slides above come from the `examples/demo.typ` deck, which relies on the | ||
| theme's defaults; `examples/full-demo.typ` exercises every configuration option. | ||
| Both live in the [source repository](https://github.com/Entze/prinzipien). | ||
|
|
||
| ## Installation | ||
|
|
||
| Prinzipien is published on | ||
| [Typst Universe](https://typst.app/universe/package/prinzipien), so no manual | ||
| installation is required. To start a new presentation from the bundled template: | ||
|
|
||
| ```sh | ||
| typst init @preview/prinzipien | ||
| ``` | ||
|
|
||
| Or import the theme into an existing document: | ||
|
|
||
| ```typ | ||
| #import "@preview/prinzipien:0.1.1": * | ||
| ``` | ||
|
|
||
| ### Requirements | ||
|
|
||
| - Typst 0.15.0 or newer. | ||
| - The Noto Sans and Noto Sans Mono fonts (bundled with Typst). Override them | ||
| with your own `set text(font: ..)` rules after the theme's show rule if you | ||
| prefer different fonts. | ||
|
|
||
| ## Usage | ||
|
|
||
| Apply the theme with a show rule, then write one message per slide as a | ||
| level-2 heading: | ||
|
|
||
| ```typ | ||
| #import "@preview/prinzipien:0.1.1": * | ||
|
|
||
| #show: prinzipien-theme.with( | ||
| config-info( | ||
| title: [One sentence to remember], | ||
| author: [Ada Lovelace], | ||
| date: datetime.today(), | ||
| ), | ||
| ) | ||
|
|
||
| #title-slide() | ||
|
|
||
| == Give every slide a full-sentence message | ||
|
|
||
| The heading carries the takeaway; the body only supports it. | ||
| ``` | ||
|
|
||
| Highlight the words that matter with `#alert[..]`, mark the main points of your | ||
| talk with `#point[..]`, and let `#preview()` / `#review()` build the overview | ||
| maps automatically. See [`template/main.typ`](template/main.typ) for a complete | ||
| starting point, and the `examples/` directory in the | ||
| [repository](https://github.com/Entze/prinzipien) for fuller decks. | ||
|
|
||
| ### Configuration | ||
|
|
||
| `prinzipien-theme` takes a handful of options, all with sensible defaults: | ||
|
|
||
| | Option | Default | Description | | ||
| | --- | --- | --- | | ||
| | `aspect-ratio` | `"16-9"` | Slide aspect ratio (`"16-9"` or `"4-3"`). | | ||
| | `margin` | `33%` | Width of the reserved left margin (a ratio of the slide width, or a length). | | ||
| | `background` | `#ffffff` | Background colour. | | ||
| | `foreground` | `#221f21` | Text (foreground) colour. | | ||
| | `accent` | `#f9ab1a` | The one accent colour. | | ||
| | `suppressed` | `#7a7d80` | Colour for muted / de-emphasised content. | | ||
| | `accent-tint` | `auto` | Tint of the accent, used behind `#alert`; derived from `accent` by default. | | ||
| | `logo-square` | `auto` | Square logo shown beside the slide title; derived from `config-info`'s `logo` by default. | | ||
|
|
||
| ## Contributing | ||
|
|
||
| Contributions are welcome. This repository uses | ||
| [mise](https://mise.jdx.dev) to pin tool versions and | ||
| [hk](https://hk.jdx.dev) to run formatters and checks: | ||
|
|
||
| ```sh | ||
| mise install # install the pinned tools (Typst, hk, typstyle, ..) | ||
| mise exec -- hk run fix # format and auto-fix | ||
| mise exec -- hk run check # run checks that cannot be auto-fixed | ||
| mise exec -- hk run lint # verify package-submission compliance | ||
| ``` | ||
|
|
||
| Please run the formatters before opening a pull request, and open an issue for | ||
| larger changes first. Bug reports and feature requests go to the | ||
| [issue tracker](https://github.com/Entze/prinzipien/issues). | ||
|
|
||
| ## Authors and Acknowledgment | ||
|
|
||
| - **Lukas Grassauer** — author and maintainer (<lukas@grassauer.eu>). | ||
|
|
||
| Prinzipien builds on [Touying](https://touying-typ.github.io/) and follows the | ||
| design principles of Jean-luc Doumont's _Trees, maps, and theorems_ (2009). | ||
|
|
||
| Parts of this project — code, examples, and documentation — were written with | ||
| the assistance of an AI coding agent (Anthropic's Claude Code) under the | ||
| author's direction and review. If you would like to audit the prompts see | ||
| [`plans`](plans/). | ||
|
|
||
| ## License | ||
|
|
||
| Distributed under the Boost Software License 1.0 (BSL-1.0). | ||
| See [`LICENSE.txt`](LICENSE.txt) for the full text. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @book{doumont2009, | ||
| author = {Doumont, Jean-luc}, | ||
| title = {Trees, Maps, and Theorems: Effective Communication for | ||
| Rational Minds}, | ||
| publisher = {Principiae}, | ||
| address = {Kraainem, Belgium}, | ||
| year = {2009}, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| // A small but complete deck following Doumont's canonical structure: | ||
| // attention getter -> need -> task -> main message -> preview -> | ||
| // points with transitions -> review -> conclusion -> close, | ||
| // plus backmatter (Q&A, references). | ||
|
|
||
| #import "../lib.typ": * | ||
|
|
||
| // Placeholder wordmark standing in for a real logo image. | ||
| #let acme-logo = box({ | ||
| box( | ||
| width: .8em, | ||
| height: .8em, | ||
| baseline: 12.5%, | ||
| fill: rgb("#f9ab1a"), | ||
| radius: .15em, | ||
| ) | ||
| h(.35em) | ||
| text(weight: "bold")[ACME] | ||
| }) | ||
|
|
||
| #show: prinzipien-theme.with( | ||
| config-info( | ||
| title: [Effective slides carry one message each], | ||
| author: [John Doe], | ||
| date: datetime.today(), | ||
| logo: acme-logo, | ||
| ), | ||
| ) | ||
|
|
||
| #title-slide() | ||
|
|
||
| // Attention getter. | ||
| == A slide everyone has seen: six bullets, none remembered | ||
|
|
||
| Think of the last talk you attended — which slide can you still recall? | ||
|
|
||
| // Need: the gap between actual and desired situation. | ||
| == Audiences forget slides that compete with their own titles | ||
|
|
||
| Listeners keep one sentence per slide at most; \ | ||
| decks offer them ten. | ||
|
|
||
| // Task. | ||
| == This deck walks through a design that fixes the mismatch | ||
|
|
||
| Every device shown here is from Doumont's | ||
| _Trees, maps, and theorems_ @doumont2009. | ||
|
|
||
| // Main message: the one sentence to remember. | ||
| == State one message per slide, and design everything around it | ||
|
|
||
| The rest of this deck develops three points that make it work. | ||
|
|
||
| // Preview: the map of the body. | ||
| #preview() | ||
|
|
||
| #point(substatement: [Everything is set flush against it])[ | ||
| A wide left margin structures the slide | ||
| ] | ||
|
|
||
| == The content sits flush against the margin edge | ||
|
|
||
| All sizes derive from a small set of shared dimensions. | ||
|
|
||
| == The margin holds labels \ for the image on the right | ||
|
|
||
| #slide(margin-content: [ | ||
| #set text(size: .7em) | ||
| #v(2em) | ||
| A label in the margin | ||
|
|
||
| #v(4em) | ||
| Another label, further down | ||
| ])[ | ||
| // Placeholder for an image, drawn in tints of the accent colour. | ||
| #rect( | ||
| width: 100%, | ||
| height: 80%, | ||
| fill: tint(rgb("#f9ab1a"), saturation: 15%), | ||
| stroke: none, | ||
| align(center + horizon, circle(radius: 3em, fill: tint(rgb("#f9ab1a")))), | ||
| ) | ||
| ] | ||
|
|
||
| == The margin and the content areas share one horizon | ||
|
|
||
| #slide(margin-content: block( | ||
| width: 100%, | ||
| height: 40%, | ||
| fill: tint(rgb("#f9ab1a")), | ||
| stroke: rgb("#221f21") + 1pt, | ||
| align(center + horizon)[margin \ (accent tint)], | ||
| ))[ | ||
| #block( | ||
| width: 100%, | ||
| height: 80%, | ||
| fill: rgb("#f9ab1a"), | ||
| stroke: rgb("#221f21") + 1pt, | ||
| align(center + horizon)[content \ (accent)], | ||
| ) | ||
| ] | ||
|
|
||
| #point(substatement: [Tints of it are enough for everything else])[ | ||
| One accent colour marks what matters | ||
| ] | ||
|
|
||
| == The accent colour carries the emphasis | ||
|
|
||
| Use #alert[one accent colour] only, plus tints derived from it. | ||
|
|
||
| #point(substatement: [One full sentence, optimally broken])[ | ||
| The message is the slide title | ||
| ] | ||
|
|
||
| == A full sentence makes the takeaway explicit | ||
|
|
||
| The audience reads the title and knows what to remember. | ||
|
|
||
| // Review: the map again, leading to the conclusion. | ||
| #review() | ||
|
|
||
| // Conclusion: what it means to the audience. | ||
| == One message per slide is a design decision, not a writing tip | ||
|
|
||
| Margin, colour, and title only work because they serve the message. | ||
|
|
||
| // Close. | ||
| == Your next deck can start from this template | ||
|
|
||
| Take the structure, keep your message, drop the bullets. | ||
|
|
||
| // Backmatter: numbered with roman numerals, excluded from the total. | ||
| #show: appendix | ||
|
|
||
| == Questions are welcome | ||
|
|
||
| Ask away — or write to john\@example.org. | ||
|
|
||
| == References | ||
|
|
||
| #bibliography("demo.bib", title: none) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| @book{doumont2009, | ||
| author = {Doumont, Jean-luc}, | ||
| title = {Trees, Maps, and Theorems: Effective Communication for | ||
| Rational Minds}, | ||
| publisher = {Principiae}, | ||
| address = {Kraainem, Belgium}, | ||
| year = {2009}, | ||
| } | ||
|
|
||
| @article{miller1956, | ||
| author = {Miller, George A.}, | ||
| title = {The Magical Number Seven, Plus or Minus Two: Some Limits on | ||
| Our Capacity for Processing Information}, | ||
| journal = {Psychological Review}, | ||
| volume = {63}, | ||
| number = {2}, | ||
| pages = {81--97}, | ||
| year = {1956}, | ||
| } | ||
|
|
||
| @online{touying, | ||
| author = {{Touying contributors}}, | ||
| title = {Touying: A Powerful Package for Creating Presentation Slides | ||
| in Typst}, | ||
| url = {https://github.com/touying-typ/touying}, | ||
| year = {2024}, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import should use the package specification, not a relative path.