-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
494 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Gaspard Lambrechts | ||
|
||
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. |
This file contains 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,76 @@ | ||
# Diatypst | ||
|
||
*easy slides in typst* | ||
|
||
Features: | ||
|
||
- easy delimiter for slides and sections (just use headings) | ||
- sensible styling | ||
- dot counter in upper right corner (like LaTeX beamer) | ||
- adjustable color-theme | ||
- default show rules for terms, code, lists, ... that match color-theme | ||
|
||
Example Presentation | ||
|
||
| Title Slide | Section | Content | Outline | | ||
| ----------------------------------------------- | --------------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | ||
|  |  |  |  | | ||
|
||
can be found in `example/example.typ`in the GitHub Repo | ||
|
||
|
||
## Usage | ||
|
||
To start a presentation, initialize it in your typst document: | ||
|
||
```typst | ||
#import "@preview/diatypst:0.2.0": * | ||
#show: slides.with( | ||
title: "Diatypst", // Required | ||
subtitle: "easy slides in typst", | ||
date: "01.07.2024", | ||
authors: ("John Doe"), | ||
) | ||
... | ||
``` | ||
|
||
Then, insert your content. | ||
|
||
- Level-one headings corresponds to new sections. | ||
- Level-two headings corresponds to new slides. | ||
|
||
```typst | ||
... | ||
= First Section | ||
== First Slide | ||
#lorem(20) | ||
``` | ||
|
||
## Options | ||
|
||
all available Options to initialize the template with | ||
|
||
| Keyword | Description | Default | | ||
| ------------- | ------------------------------------------------------------ | -------------------- | | ||
| *title* | Title of your Presentation, visible also in footer | `none` but required! | | ||
| *subtitle* | Subtitle, also visible in footer | `none` | | ||
| *date* | a normal string presenting your date | `none` | | ||
| *authors* | either string or array of strings | `none` | | ||
| *layout* | one of "small", "medium", "large", adjusts sizing of the elements on the slides | `"medium"` | | ||
| *ratio* | aspect ratio of the slides, e.g 16/9 | `4/3` | | ||
| *title-color* | Color to base the Elements of the Presentation on | `blue.darken(50%)` | | ||
| *count* | whether to display the dots for pages in upper right corner | `true` | | ||
| *footer* | whether to display the footer at the bottom | `true` | | ||
| *toc* | whether to display the table of contents | `true` | | ||
| *code-styling*| whether to style code elements in the presentation | `true` | | ||
|
||
|
||
|
||
## Inspiration | ||
|
||
this template is inspired by [slydst](https://github.com/glambrechts/slydst), and takes part of the code from it. If you want simpler slides, look here! | ||
|
||
The word *Diatypst* is inspired by the ease of use of a [**Dia**-projektor](https://de.wikipedia.org/wiki/Diaprojektor) (German for Slide Projector) and the [Diatype](https://en.wikipedia.org/wiki/Diatype_(machine)) |
This file contains 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,4 @@ | ||
# Diaquarto: Diatypst Extension for Quarto | ||
|
||
|
||
|
11 changes: 11 additions & 0 deletions
11
packages/preview/diatypst/0.2.0/diaquarto/_extensions/diaquarto/_extension.yml
This file contains 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,11 @@ | ||
title: Diaquarto | ||
author: martenwalksaway | ||
version: 1.0.0 | ||
quarto-required: ">=1.5.0" | ||
contributes: | ||
formats: | ||
typst: | ||
template-partials: | ||
- typst-show.typ | ||
- typst-template.typ | ||
|
45 changes: 45 additions & 0 deletions
45
packages/preview/diatypst/0.2.0/diaquarto/_extensions/diaquarto/typst-show.typ
This file contains 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,45 @@ | ||
// 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 | ||
|
||
#import "@preview/diatypst:0.1.0": slides | ||
|
||
#show: slides.with( | ||
$if(title)$ | ||
title: [$title$], | ||
$endif$ | ||
$if(subtitle)$ | ||
subtitle: [$subtitle$], | ||
$endif$ | ||
$if(date)$ | ||
date: [$date$], | ||
$endif$ | ||
$if(author)$ | ||
authors: "$author$", | ||
$endif$ | ||
$if(layout)$ | ||
layout: "$layout$", | ||
$endif$ | ||
$if(ratio)$ | ||
ratio: float($ratio$), | ||
$endif$ | ||
$if(title-color)$ | ||
title-color: rgb("#$title-color$"), | ||
$endif$ | ||
$if(counter)$ | ||
counter: [$counter$], | ||
$endif$ | ||
$if(footer)$ | ||
footer: [$footer$], | ||
$endif$ | ||
) |
3 changes: 3 additions & 0 deletions
3
packages/preview/diatypst/0.2.0/diaquarto/_extensions/diaquarto/typst-template.typ
This file contains 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,3 @@ | ||
#let horizontalrule = [ | ||
#pagebreak() | ||
] |
This file contains 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,34 @@ | ||
--- | ||
title: Untitled | ||
author: Author Name | ||
date: 01.07.2024 | ||
subtitle: easy slides in typst | ||
format: | ||
diaquarto-typst: | ||
layout: medium # small, medium, large | ||
ratio: 16/9 # any ratio possible | ||
title-color: "013220" # Hex code for the title color (without #) | ||
--- | ||
|
||
# First Section | ||
|
||
## First Slide | ||
|
||
This is the first slide. After here comes a Term and its Definition. | ||
|
||
Term | ||
~ Definition | ||
|
||
Now some code | ||
|
||
```python | ||
print("Hello World") | ||
``` | ||
|
||
--- | ||
|
||
BUmmmmmm | ||
|
||
## Second Slide | ||
|
||
This is the second slide. |
Binary file not shown.
This file contains 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,35 @@ | ||
#import "../lib.typ": * | ||
|
||
#show: slides.with( | ||
title: "Diatypst", // Required | ||
subtitle: "easy slides in typst", | ||
date: "01.07.2024", | ||
authors: ("Marten Walk"), | ||
layout: "medium", | ||
ratio: 16/9, | ||
toc: true, // New Option | ||
count: true, // Renamed from counter | ||
) | ||
|
||
= First Section | ||
|
||
== First Slide | ||
|
||
Terms created with ```typc / Term: Definition``` | ||
|
||
/ *Term*: Definition | ||
|
||
A code block | ||
|
||
```python | ||
// Example Code | ||
print("Hello World!") | ||
``` | ||
|
||
|
||
|
||
= Second Section | ||
|
||
== Summary | ||
|
||
#align(center+horizon)[_Le Fin_] |
Oops, something went wrong.