Hello everyone,
After seeing my pupils before their exams, I decided to create specific paper (based on the ones used during the exams) for them to use during my classes.
Since the layout is the same for all the pages except the first one, I used a loop.
This way I can print copies looking like I want, and it trains them to respect a certain way of doing things during exams.
But I also wanted to use those during fast exams. And I usually put the problems or questions with just the right amount of lines under for them to use.
Here is what I wrote :
#set page(
paper: "a4",
margin: (x: 1cm, y: 1cm),
flipped: false
)
#set text(lang:"fr", font: "Learning", size: 11pt,)
// =============================================================
#import "@preview/showybox:2.0.4": showybox
#import "@preview/cetz:0.3.4"
#import "@preview/cetz-plot:0.1.1"
// =============================================================
#show heading.where( level: 1 ): set text( font: "KG Second Chances Sketch", weight: "bold", size: 36pt,)
#show heading.where( level: 1 ): set block(above:0pt,below: 24pt)
#show heading.where( level: 2 ): set text(font: "Sketch Match", weight: "bold", size: 24pt,)
#show heading.where( level: 2 ): set block(above:12pt,below: 6pt)
#show heading.where( level: 3): set text(font: "School Book New", weight: "bold", size: 14pt,)
#show math.equation: set text(font: "STIX Two Math")
// =============================================================
//==============================================================================
// Configuration Echelle
//==============================================================================
#let echelle = 1
//==============================================================================
// Configuration du graphique
//==============================================================================
#let config = (
x_min: -10,
y_min: -10,
x_max: 10,
y_max: 10,
unite: 1cm,
grid_stroke: (paint: gray, thickness: .4pt * echelle),
axis_stroke: (paint: black, thickness: 1.6pt * echelle )
)
#showybox(
frame: (
body-color: gray.lighten(85%),
thickness: 0.5pt,radius: (top-left: 0pt, bottom-right: 0pt, rest: 0pt), body-inset :1em
)
)[
NOM : #box(width: 1fr, line(length: 80%, stroke: (paint: gray, thickness: 1pt, dash: "densely-dotted"))) \
PRENOM : #box(width: 1fr, line(length: 79%, stroke: (paint: gray, thickness: 1pt, dash: "densely-dotted"))) \
CLASSE : #box(width: 1fr, line(length: 79%, stroke: (paint: gray, thickness: 1pt, dash: "densely-dotted")))
#align(center)[=== Mathématiques]
#place(float:true, bottom + left,rect([
#align(top)[Appréciation :]
#align(bottom + right)[PPO : #h(.8cm)]
],stroke:.8pt,height:2cm,width:100%,radius:(top-left: 0pt,bottom-right: 0pt)))
#place(horizon + right, [
#rect(
stroke: 0.8pt,
height: 2cm,
width: 2cm,
radius: (top-left: 0pt, bottom-right: 0pt),
inset:0cm
)[
#place(clearance: 0em,
line(
start: (0cm, 2cm),
end: (2cm , 0cm),
stroke: 0.8pt
)
)
]
])
]
#cetz.canvas(
length: 1cm,
{
import cetz.draw: *
import cetz-plot: *
scale(echelle)
line((0,0),(0,-21.6),stroke:(none))
line((3,0),(3,-21.6),stroke:(black))
line((19,0),(19,-21.6),stroke:(black))
for y in range(28) {
line((3, -y * 0.8), (19, -y * 0.8), stroke: (paint: gray, thickness: .8pt, dash: "densely-dotted"))
}
}
)
#place(
bottom + right,
rect(
fill:white,
[
#align(top + center)[#text(8pt,[Pages / Nombre Total de pages])]
#align(bottom + center)[#text(18pt,[..... / .....])]
],
stroke:.8pt,
height:1.6cm,
width:4.2cm,
radius:(top-left: 0pt,bottom-right: 0pt)))
#place(
top+left,
dx:3.5cm,
dy:6.5cm,
[
#rect(
fill:white,
stroke: (paint: gray, thickness: 1pt),
height: 3cm,
width: 15cm,
[
Essai
]
)])
#for i in range(3){
pagebreak()
v(.5cm)
cetz.canvas(
length: 1cm,
{
import cetz.draw: *
import cetz-plot: *
scale(echelle)
line((0,0),(0,-.8 * 34),stroke:(none))
line((3,0),(3,-.8 * 34),stroke:(black))
line((19,0),(19,-.8 * 34),stroke:(black))
for y in range(35) {
line((3, -y * 0.8), (19, -y * 0.8), stroke: (paint: gray, thickness: .8pt, dash: "densely-dotted"))
}
}
)
place(
bottom + right,
rect(
fill:white,
[
#align(top + center)[#text(8pt,[Pages / Nombre Total de pages])]
#align(bottom + center)[#text(18pt,[..... / .....])]
],
stroke:.8pt,
height:1.6cm,
width:4.2cm,
radius:(top-left: 0pt,bottom-right: 0pt)))
}
#place(
top+left,
dx:3.5cm,
dy:6.5cm,
[
#rect(
fill:white,
stroke: (paint: gray, thickness: 1pt),
height: 3cm,
width: 15cm,
[
Essai
]
)])
As you can see, I put a rectangle that I intend to use for my exercices on the first page, and another one, but only on the last page.
I would like to be able to place those rectangles wherever I want.
Can someone help me ?
Thank you ;)