Skip to content

Commit 6739adb

Browse files
clean-ensam:0.1.0 (#3621)
1 parent f5b97d2 commit 6739adb

File tree

10 files changed

+248
-0
lines changed

10 files changed

+248
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Ahmed
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Clean Doc Template (Typst)
2+
3+
A simple, clean, and customizable template for ENSAM RABAT needs.
4+
5+
**Disclaimer**:
6+
This template is in **no way shape or form affiliated with UM5 or ENSAM RABAT**
7+
This is an **unofficial document** designed to help you quickly get up to speed with your work at ENSAM RABAT and is **in no way affiliated with the school.**
8+
9+
![Page de garde](images/thumbnail.png)
10+
11+
## Features
12+
13+
- Clean layout
14+
- Easy customization
15+
- Ready for articles, reports, and notes
16+
17+
### Usage
18+
19+
#### Quick start
20+
21+
```typ
22+
#import "@preview/clean-ensam:0.1.0": project
23+
24+
#show: project.with(
25+
title: "Etude d'une vulnérabilité critique",
26+
subtitle: "React2Shell (CVE-2025-55182)",
27+
authors: (
28+
"BAHLAOUI Ahmed",
29+
),
30+
supervisor: "Pr. X",
31+
department: "MAGI",
32+
program: "INDIA/SD",
33+
module: "Programmation web avancée",
34+
year: "2025-2026",
35+
)
36+
```
37+
38+
#### 1. Install Typst
39+
40+
Make sure you have Typst installed from https://typst.app
41+
42+
#### 2. You can use this template in the web-version of Typst
43+
44+
```bash
45+
typst init @preview/clean-ensam:0.1.0
46+
```
28.2 KB
Loading
18.8 KB
Loading
177 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#import "template.typ": *
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
// ============================================================================
2+
// ENSAM RABAT - Template File (template.typ)
3+
// ============================================================================
4+
// This file contains the template function that formats your document.
5+
// Import this in your main.typ file with: #import "template.typ": *
6+
// ============================================================================
7+
8+
#let project(
9+
title: "",
10+
authors: (),
11+
supervisor: "",
12+
department: "",
13+
program: "",
14+
module: "",
15+
year: "",
16+
subtitle: "Rapport de Projet Académique",
17+
body,
18+
) = {
19+
20+
// Set document properties
21+
set document(author: authors, title: title)
22+
23+
// Set page configuration
24+
set page(
25+
paper: "a4",
26+
margin: (top: 2.5cm, bottom: 1.5cm, left: 2.5cm, right: 2.5cm),
27+
footer: context [
28+
#set align(center)
29+
#set text(10pt)
30+
#counter(page).display("1")
31+
]
32+
)
33+
34+
// Set text defaults
35+
set text(
36+
font: "New Computer Modern",
37+
size: 12pt,
38+
lang: "fr",
39+
)
40+
41+
// Set paragraph defaults
42+
set par(justify: true)
43+
44+
// Set heading numbering
45+
set heading(numbering: "1.1")
46+
47+
// Format chapters
48+
show heading.where(level: 1): it => {
49+
if it.numbering != none {
50+
pagebreak(weak: true)
51+
v(1.5cm)
52+
text(size: 16pt, weight: "bold")[
53+
Chapitre #counter(heading).display() : #it.body
54+
]
55+
v(1cm)
56+
} else {
57+
pagebreak(weak: true)
58+
v(1.5cm)
59+
text(size: 16pt, weight: "bold")[#it.body]
60+
v(1cm)
61+
}
62+
}
63+
64+
// Configure links
65+
show link: underline
66+
67+
// ============================================================================
68+
// TITLE PAGE
69+
// ============================================================================
70+
71+
align(center)[
72+
#v(0.5cm)
73+
74+
#grid(
75+
columns: (1fr, 1fr),
76+
align: (left, right),
77+
image("images/logo_um5.png", width: 50%),
78+
image("images/logo_ensam.png", width: 50%),
79+
)
80+
81+
#v(1cm)
82+
83+
#text(size: 20pt, weight: "bold")[
84+
#title
85+
]
86+
87+
#v(0.5cm)
88+
89+
#text(size: 16pt)[#subtitle]
90+
91+
#v(1cm)
92+
93+
#grid(
94+
columns: (1fr, 1fr),
95+
align: (left, right),
96+
[
97+
#text(size: 13pt)[
98+
_Réalisé par :_\
99+
#for author in authors [
100+
*#author*\
101+
]
102+
]
103+
],
104+
[
105+
#text(size: 13pt)[
106+
_Encadré par :_\
107+
*#supervisor*
108+
]
109+
]
110+
)
111+
112+
#v(3cm)
113+
114+
#text(size: 13pt)[
115+
*Université Mohammed V de Rabat*\
116+
*École Nationale Supérieure d'Arts et Métiers*\
117+
*ENSAM RABAT*\
118+
*Département* : #department\
119+
*Filière* : #program\
120+
*Module* : #module\
121+
\
122+
*Année Académique* : #year
123+
]
124+
125+
#v(0.5cm)
126+
127+
#line(length: 100%, stroke: 0.5pt)
128+
129+
#v(0cm)
130+
131+
#datetime.today().display()
132+
]
133+
134+
135+
136+
// ============================================================================
137+
// TABLE OF CONTENTS
138+
// ============================================================================
139+
140+
outline(
141+
title: "Table des Matières",
142+
indent: auto,
143+
)
144+
145+
// ============================================================================
146+
// MAIN BODY
147+
// ============================================================================
148+
149+
body
150+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#import "@preview/clean-ensam:0.1.0": project
2+
3+
#show: project.with(
4+
title: "Etude d'une vulnérabilité critique",
5+
subtitle: "React2Shell (CVE-2025-55182)",
6+
authors: (
7+
"BAHLAOUI Ahmed",
8+
),
9+
supervisor: "Pr. X",
10+
department: "MAGI",
11+
program: "INDIA/SD",
12+
module: "Programmation web avancée",
13+
year: "2025-2026",
14+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "clean-ensam"
3+
version = "0.1.0"
4+
entrypoint = "lib.typ"
5+
authors = ["BAHLAOUI Ahmed <AhmedBahlaoui@outlook.com>"]
6+
license = "MIT"
7+
description = "Write academic reports for ENSAM Rabat."
8+
repository = "https://github.com/ahmed-bahlaoui/clean-ensam"
9+
categories = ["report"]
10+
11+
[template]
12+
path = "template"
13+
entrypoint = "main.typ"
14+
thumbnail = "images/thumbnail.png"

0 commit comments

Comments
 (0)