-
Notifications
You must be signed in to change notification settings - Fork 444
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
oh-my-euxfel:1.0.0 #1563
base: main
Are you sure you want to change the base?
oh-my-euxfel:1.0.0 #1563
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 James Wrigley | ||
|
||
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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# An XFEL Polylux theme | ||
|
||
This is a [Polylux](https://polylux.dev/book/) theme for [European | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Polylux is not very actively maintained and the latest version is using deprecated functions. I would rather not merge a package that reports deprecation warnings as they will become hard errors with the next Typst release. I contacted the Polylux maintainer to ask them to make a new release to fix that, but it may take some time before they actually do it. If you would like to have your package released rapidly, I would suggest switching to another presentation package, like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see, I wasn't aware of that... I'll have a go at switching it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I already got an answer from them and they said they would make a release to fix this issue soon. So if you prefer to wait a few days, it should not be that long. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Polylux 0.4.0 was just released, updating it should fix the issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the reminder, I forgot about this 😅 I have heard good things about touying though so I'll have another look at that before proceeding, will try to finish this this week. |
||
XFEL](https://xfel.eu) presentations. | ||
|
||
Here's a quick demo: | ||
```typst | ||
#import "@preview/oh-my-euxfel:1.0.0": * | ||
|
||
// Default options are shown commented out | ||
#show: euxfel-theme.with( | ||
title: "Optimising treat delivery", | ||
author: "F. D. C. Willard", | ||
// title-page-header: true, | ||
// font: "New Computer Modern Sans" | ||
) | ||
|
||
#slide("Introduction")[ | ||
- Humans are increasingly stingy, leading to catastrophic decreases in treat delivery from 172.8$mu$Hz to 86.4$mu$Hz. | ||
- Caused in part by economic effects. | ||
- The author blames dogs. | ||
] | ||
``` | ||
|
||
Producing: | ||
![](theme-demo.png) | ||
|
||
## Acknowledgements | ||
|
||
Many thanks to the original authors of XFEL's Beamer template, from which I took | ||
both inspiration and some SVG files. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume that this is the official logo and that you didn't design it yourself. If that's true, can you please add a note in your README and/or LICENSE file stating under which license it is distributed? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#import "@preview/oh-my-euxfel:1.0.0": * | ||
|
||
// Default options are shown commented out | ||
#show: euxfel-theme.with( | ||
title: "Optimising treat delivery", | ||
author: "F. D. C. Willard", | ||
// title-page-header: true, | ||
// font: "New Computer Modern Sans" | ||
) | ||
|
||
#slide("Introduction")[ | ||
- Humans are increasingly stingy, leading to catastrophic decreases in treat delivery from 172.8$mu$Hz to 86.4$mu$Hz. | ||
- Caused in part by economic effects. | ||
- The author blames dogs. | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#import "@preview/polylux:0.3.1": * | ||
|
||
#let xDarkBlue = rgb(11, 21, 70) | ||
#let xOrange = rgb(243, 146, 0) | ||
#let xLightBlue = rgb(85, 157, 187) | ||
|
||
|
||
#let euxfel-theme(aspect-ratio: "16-9", | ||
title: "Title", author: "Author", | ||
title-page-header: true, | ||
font: "New Computer Modern Sans", | ||
body) = { | ||
let item-rect(fill-color) = [#rect(width: 30pt, height: 15pt, fill: fill-color)] | ||
set list(marker: ([#item-rect(xOrange)], | ||
[#item-rect(xLightBlue)], | ||
[#image("subsubitem.svg")])) | ||
set text(size: 18pt, font: font) | ||
|
||
set page( | ||
paper: "presentation-" + aspect-ratio, | ||
margin: (top: 70pt), | ||
header: context { | ||
if title-page-header or counter(page).get().first() > 1 { | ||
set text(size: 12pt) | ||
|
||
grid(columns: (1fr, 1fr), column-gutter: 50pt, | ||
{line(length: 100%); title}, | ||
{stack(dir: ltr, | ||
align(left)[#line(length: 100%); #author], | ||
align(right)[#counter(page).display()] | ||
)} | ||
) | ||
} | ||
}, | ||
footer: [ | ||
#set text(size: 15pt) | ||
|
||
#stack(dir: ltr, spacing: 5pt, | ||
rect(width: 80pt, height: 10pt, fill: xDarkBlue), | ||
rect(width: 30pt, height: 10pt, fill: xDarkBlue), | ||
rect(width: 15pt, height: 10pt, fill: xOrange), | ||
[*European XFEL*] | ||
) | ||
] | ||
) | ||
|
||
polylux-slide[ | ||
#align(horizon)[ | ||
#grid( | ||
columns: (3fr, 1fr), | ||
column-gutter: 50pt, | ||
|
||
align(left)[ | ||
#set text(size: 22pt) | ||
= #title | ||
|
||
#author | ||
], | ||
|
||
align(right)[ | ||
#image("logo.svg") | ||
] | ||
) | ||
] | ||
] | ||
|
||
body | ||
} | ||
|
||
#let slide(title, body) = { | ||
polylux-slide[ | ||
== #title | ||
|
||
#v(15pt) | ||
|
||
#body | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "oh-my-euxfel" | ||
version = "1.0.0" | ||
entrypoint = "theme.typ" | ||
authors = ["James Wrigley <@JamesWrigley>"] | ||
license = "MIT" | ||
description = "A Polylux theme for European XFEL presentations." | ||
repository = "https://github.com/JamesWrigley/euxfel-polylux-theme" | ||
keywords = ["euxfel", "xfel", "polylux"] | ||
categories = ["presentation"] | ||
exclude = ["*.png"] | ||
|
||
[template] | ||
path = "template" | ||
entrypoint = "presentation.typ" | ||
thumbnail = "thumbnail.png" |
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.