Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 James Wrigley
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copyright (c) 2024 James Wrigley
Copyright (c) 2024-2025 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.
31 changes: 31 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/README.md
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
Copy link
Member

Choose a reason for hiding this comment

The 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 touying which should have a similar API and that is more actively maintained.

Copy link
Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Author

Choose a reason for hiding this comment

The 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.
21 changes: 21 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/logo.svg
Copy link
Member

Choose a reason for hiding this comment

The 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?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/subsubitem.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/template/presentation.typ
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.
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/theme.typ
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)

Check warning on line 3 in packages/preview/oh-my-euxfel/1.0.0/theme.typ

View check run for this annotation

Typst package check / @preview/oh-my-euxfel:1.0.0

packages/preview/oh-my-euxfel/1.0.0/theme.typ#L3

This value seems to be public. It is recommended to use kebab-case names.
#let xOrange = rgb(243, 146, 0)

Check warning on line 4 in packages/preview/oh-my-euxfel/1.0.0/theme.typ

View check run for this annotation

Typst package check / @preview/oh-my-euxfel:1.0.0

packages/preview/oh-my-euxfel/1.0.0/theme.typ#L4

This value seems to be public. It is recommended to use kebab-case names.
#let xLightBlue = rgb(85, 157, 187)

Check warning on line 5 in packages/preview/oh-my-euxfel/1.0.0/theme.typ

View check run for this annotation

Typst package check / @preview/oh-my-euxfel:1.0.0

packages/preview/oh-my-euxfel/1.0.0/theme.typ#L5

This value seems to be public. It is recommended to use kebab-case names.


#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
]
}
Binary file added packages/preview/oh-my-euxfel/1.0.0/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions packages/preview/oh-my-euxfel/1.0.0/typst.toml
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"
Loading