Skip to content

Commit

Permalink
Update 1:
Browse files Browse the repository at this point in the history
- Updated outline appearance (second level was not good)
- Added Specifications and Summary chapters
- Added bibliography example
- Corrected some other appearance issue and things (I don't remeber all, I should commit more often)

Thanks for reading and if you encounter any issue, feel free to open an issue or suggest a PR.
  • Loading branch information
Leo Vaucher committed Apr 22, 2024
1 parent 60ea061 commit feb353e
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To get a fast preview and the ability to go from pdf to code, use the Typst prev

## Typst website

I didn't tried it yet but if you import all the files in a project on their editor on the website it should work.
Import all the files in a project on their editor on the website and it works! (Thanks to Florian for testing)

# Languages

Expand Down
5 changes: 5 additions & 0 deletions bibliography.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Typst:
type: Web
title: Typst
author: Typst guy
url: https://typst.app
Binary file modified main.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
= Théorie
#lorem(20)

Exemple de bibliographie @Typst

= Simulations
#lorem(40)

Expand All @@ -38,3 +40,5 @@

= Conclusion
#lorem(200)

#bibliography("bibliography.yml")
1 change: 1 addition & 0 deletions page/Specifications.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#lorem(20)
1 change: 1 addition & 0 deletions page/Summary.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#lorem(20)
55 changes: 51 additions & 4 deletions template-HEIG-tb-EN.typ
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,25 @@
lang: "en",
size: 12pt,)
set heading(numbering: "1.1 ")
show heading: it => [
show heading.where(
level: 1
): it => [
#set text(weight: 600, size: 20pt)
#block(v(4.5cm) + it.body + v(1cm))
]
show heading.where(
level: 2
): it => [
#set text(weight: 600, size: 15pt)
#block(v(0cm) + it + v(0.5cm))
]

// Table of contents.
show outline.entry.where(
level: 1
): it => {
v(12pt, weak: true)
text(weight: 550 ,v(0.3cm) + it)
text(weight: 550 ,v(0.1cm) + it)
}
show outline.entry.where(
level: 2
Expand Down Expand Up @@ -190,17 +198,56 @@
v(4cm)
text("Yverdon-les-Bains, " + date)

// Reset Firt title margin
show heading.where(
level: 1
): it => [
#set text(weight: 600, size: 20pt)
#block(v(0cm) + it.body + v(0.5cm))
]

pagebreak(to: "odd")

// CDC
heading(
numbering: none,
outlined: true,
"Specifications"
)

include "page/Specifications.typ"

pagebreak(to: "odd")

// Resume
heading(
numbering: none,
outlined: true,
"Summary"
)

include "page/Summary.typ"

pagebreak(to: "odd")

v(1cm)
outline(depth: 3, indent: true, title: v(-1cm) + "Table of contents")

pagebreak(to: "odd")

// Rest of document

show heading: it => [
show heading.where(
level: 1
): it => [
#set text(weight: 600, size: 20pt)
#block(v(1cm) + it.body + v(1cm))
#block(v(0.5cm) + it.body + v(0.5cm))
]
show heading.where(
level: 2
): it => [
#set text(weight: 600, size: 15pt)
#block(v(0cm) + it + v(0.5cm))
]

set page(
Expand Down
57 changes: 52 additions & 5 deletions template-HEIG-tb-FR.typ
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,25 @@
lang: "fr",
size: 12pt,)
set heading(numbering: "1.1 ")
show heading: it => [
show heading.where(
level: 1
): it => [
#set text(weight: 600, size: 20pt)
#block(v(4.5cm) + it.body + v(1cm))
#block(v(4.5cm) + it + v(1cm))
]
show heading.where(
level: 2
): it => [
#set text(weight: 600, size: 15pt)
#block(v(0cm) + it + v(0.5cm))
]

// Table of contents.
show outline.entry.where(
level: 1
): it => {
v(12pt, weak: true)
text(weight: 550 ,v(0.3cm) + it)
text(weight: 550 ,v(0.1cm) + it)
}
show outline.entry.where(
level: 2
Expand Down Expand Up @@ -190,17 +198,56 @@
v(4cm)
text("Yverdon-les-Bains, le " + date)

// Reset Firt title margin
show heading.where(
level: 1
): it => [
#set text(weight: 600, size: 20pt)
#block(v(0cm) + it.body + v(0.5cm))
]

pagebreak(to: "odd")

// CDC
heading(
numbering: none,
outlined: true,
"Cahier des charges"
)

include "page/Specifications.typ"

pagebreak(to: "odd")

// Resume
heading(
numbering: none,
outlined: true,
"Résumé"
)

include "page/Summary.typ"

pagebreak(to: "odd")

v(1cm)
outline(depth: 3, indent: true, title: v(-1cm) + "Table des matières")

pagebreak(to: "odd")

// Rest of document

show heading: it => [
show heading.where(
level: 1
): it => [
#set text(weight: 600, size: 20pt)
#block(v(1cm) + it.body + v(1cm))
#block(v(0.5cm) + it.body + v(0.5cm))
]
show heading.where(
level: 2
): it => [
#set text(weight: 600, size: 15pt)
#block(v(0cm) + it + v(0.5cm))
]

set page(
Expand Down

0 comments on commit feb353e

Please sign in to comment.