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

georges-yetyp:0.1.0 #791

Merged
merged 3 commits into from
Jul 5, 2024
Merged
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
674 changes: 674 additions & 0 deletions packages/preview/georges-yetyp/0.1.0/LICENSE

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions packages/preview/georges-yetyp/0.1.0/README.fr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Georges Yétyp

[Version anglaise](README.md)

Modèle Typst pour les rapports de stage à Polytech (Grenoble).

[![Exemple de page de garde](thumbnail.png)](thumbnail.png)

## Utilisation

On peut soit passer par [l'application web Typst](https://typst.app/?template=georges-yetyp&version=0.1.0), ou utiliser la ligne de commande pour commencer un nouveau projet qui utilise ce modèle:

```bash
typst init @preview/georges-yetyp
```

Ensuite, il faut remplacer `logo.png` avec le logo de l'entreprise dans laquelle vous avez travailler, remplir les détails dans les paramètres de la fonction `rapport`, et commencer à écrire en dessous.

## Autres écoles

Supporter d'autres écoles du réseau Polytech devrait être relativement simple, si vous voulez réutiliser ce modèle. Il y a seulement besoin du logo de l'école (avec l'autorisation de l'utiliser). Les contributions sont les bienvenues.
21 changes: 21 additions & 0 deletions packages/preview/georges-yetyp/0.1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Georges Yétyp

[French version](README.fr.md)

Typst template for Polytech (Grenoble) internship reports.

[![Preview of the front page](thumbnail.png)](thumbnail.png)

## Usage

Either use this template [in the Typst web app](https://typst.app/?template=georges-yetyp&version=0.1.0), or use the command line to initialize a new project based on this template:

```bash
typst init @preview/georges-yetyp
```

Then, replace `logo.png` with the logo of the company you worked for, fill in all the details in the `rapport` parameters, and start writing below.

## Other schools

Adding support for other schools of the Polytech network would be fairly easy if you want to re-use this template. All that is needed is a copy of their logo (with the authorization to use it). Submissions are welcome.
192 changes: 192 additions & 0 deletions packages/preview/georges-yetyp/0.1.0/lib.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
#let rapport(
nom: none,
entreprise: (
nom: none,
adresse: none,
téléphone: none,
logo: none,
),
filière: "INFO",
année: 5,
titre: none,
référent: none,
responsable: none,
tuteur: none,
période: [25 Mars 2024 -- 25 Août 2024],
résumé: none,
fonte: "New Computer Modern",
glossaire: none,
lang: "fr",
body
) = {
set text(lang: lang, font: fonte, size: 12pt)
set par(justify: true, leading: 0.8em)
set heading(numbering: "I.1 -")
show heading: block.with(spacing: 1.5em)

if nom == none {
panic("`nom` doit être une chaîne de caractère (avec votre nom et prénom)")
}

if titre == none {
panic("`titre` doit être une chaîne de caractère (avec le titre du rapport)")
}

if type(entreprise) != dictionary {
panic("`entreprise` doit être un dictionnaire contenant `nom`, `adresse` et éventuellemenent `téléphone` et `logo`")
}

if entreprise.nom == none {
panic("`entreprise.nom` doit être une chaîne de caractères ou un bloc de contenu")
}

let entreprise-text-info = align(horizon + right, {
text(size: 14pt, entreprise.nom)
linebreak()
entreprise.adresse
})
let entreprise-info = if "logo" in entreprise and entreprise.logo != none {
(
align(
right + horizon,
entreprise.logo
),
[],
entreprise-text-info
)
} else {
(entreprise-text-info,)
}

grid(
columns: (1fr, 1fr),
column-gutter: 5em,
row-gutter: 1em,
align(horizon, image("logo-polytech.png")),
..entreprise-info
)

v(1fr)

align(center, [
#set text(size: 16pt)
#nom \
#filière \
Rapport de stage de #année#super[ème] année

#v(1fr)

#smallcaps(text(size: 20pt, titre))

#v(1fr)

Tome principal \ & \ Annexes

#v(1fr)

#let year = datetime.today().year()

Année universitaire #{year - 1}--#{year} \
#période
])


pagebreak()
{
set page(header: context {
let headings-after = query(
selector(heading.where(outlined: true)).after(here())
)
let heading = if headings-after.len() == 0 {
query(
selector(heading.where(outlined: true)).before(here())
).last()
} else {
headings-after.first()
}
grid(
columns: (1fr, auto),
emph(titre),
emph(heading.body)
)
}, numbering: "1")

show figure: it => align(center, block(spacing: 3em, it))

show raw.where(block: true): it => {
set text(font: "Fira Code")
block(
width: 110%,
stroke: 1pt + gray,
radius: 0.2em,
inset: (y: 1em, x: 5%),
align(left, it)
)
}

{
set page(header: none)
v(1fr)
align(center, heading(outlined: false, numbering: none, [Résumé]))
align(center, block(width: 80%, align(left, résumé)))
v(1fr)

pagebreak()

outline(indent: auto)
}

body

pagebreak()

set page(header: none)

heading(numbering: none, outlined: false, [Annexes])

if glossaire != none {
heading(numbering: none, outlined: false, level: 2, [Glossaire])
glossaire
}

heading(numbering: none, outlined: false, level: 2, [Table des figures])

outline(target: figure, title: none)
}

pagebreak()

show strong: it => text(size: 10pt, [#it \ ])
set table.cell(colspan: 2)
table(
columns: (1fr, 1fr),
gutter: 1em,
stroke: none,
table.cell(colspan: 1, [*Étudiant⋅e* #nom]),
table.cell(colspan: 1, align(right, [*Année d'étude dans la spécialité* #année#super[ème] année])),
[
*Entreprise* #entreprise.nom \
*Adresse* #entreprise.adresse \
#if "téléphone" in entreprise [
*Téléphone* #entreprise.téléphone
]
],
[
*Responsable administratif⋅ve* #responsable.nom, #responsable.fonction \
#responsable.téléphone \
#responsable.email
],
[
*Tuteur⋅ice de stage* #tuteur.nom \
#tuteur.téléphone \
#tuteur.email
],
[
*Enseignant⋅e référent⋅e* #référent.nom \
#référent.téléphone \
#référent.email
],
[*Titre* #titre],
[*Résumé* #résumé]
)
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions packages/preview/georges-yetyp/0.1.0/template/main.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#import "@preview/georges-yetyp:0.1.0": rapport

#show: rapport.with(
nom: "Georgette Lacourgette",
titre: "Titre du stage",
entreprise: (
nom: "Nom de l'entreprise",
adresse: [
12 rue de la Chartreuse, \
38000 Grenoble, \
France
],
logo: image("logo.png", height: 4em),
),
responsable: (
nom: "Jean Dupont",
fonction: "CTO",
téléphone: "+33 6 66 66 66 66",
email: "[email protected]"
),
tuteur: (
nom: "Marie Dumoulin",
téléphone: "+33 6 66 66 66 66",
email: "[email protected]"
),
référent: (
nom: "Dominique Dupré",
téléphone: "+33 6 66 66 66 66",
email: "[email protected]"
),
résumé: [
#lorem(100)

#lorem(20)
],
glossaire: [
/ Georges : Prénom de la mascotte de l'école.
]
)

= Introduction

== Présentation de l'entreprise

#lorem(30)

#lorem(50)

#figure(
image("logo.png"),
caption: [Le logo de l'entreprise]
)

#lorem(100)

== Mes missions

#lorem(50)

#figure(
```rust
fn main() {
println!("Hello world!");
}
```,
caption: [Le fameux programme "Hello world"]
)

#lorem(130)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions packages/preview/georges-yetyp/0.1.0/typst.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "georges-yetyp"
version = "0.1.0"
entrypoint = "lib.typ"
authors = [ "Ana Gelez <https://ana.gelez.xyz/>" ]
license = "GPL-3.0"
description = "Unofficial template for Polytech Grenoble internship reports"
repository = "https://github.com/elegaanz/georges-yetyp"
keywords = [ "polytech", "grenoble", "internship", "stage" ]
categories = [ "report" ]
disciplines = [ "engineering", "computer-science", "geology", "medicine" ]
compiler = "0.11.0"

[template]
path = "template"
entrypoint = "main.typ"
thumbnail = "thumbnail.png"
Loading