Files
Hochschulmathematik/Band1/definitionen.typ
2026-03-09 05:12:48 +01:00

111 lines
2.9 KiB
Typst

#import "@preview/cetz:0.4.2" //Grafiken
#import "@preview/marge:0.1.0": sidenote
#let pfeil_mit_xy(x,y) = {
cetz.canvas({
import cetz.draw: *
// Das Grid (Hintergrund)
//grid((0, -1), (4, 2), step: 0.5, stroke: gray + 0.2pt) // Hauptlinien alle 0.5 Einheiten
//grid((-1, -1), (3, 2), step: 0.1, stroke: gray.lighten(50%) + 0.1pt) // Sehr feine Linien alle 0.1
line((0.5,1),(3,1), name: "top", mark: ( end: "stealth", fill: black) ) // Obere Gerade
content((rel: (1em, 0), to: "top.end"),
box(fill: white, inset: 0pt)[#y],
anchor: "center")
content((rel: (0, 0), to: "top.mid"),
box(fill: white, inset: 0pt)[#x],
anchor: "center")
}) }
#let pfeil_mit_x(x) = {
cetz.canvas({
import cetz.draw: *
// Das Grid (Hintergrund)
//grid((0, -1), (4, 2), step: 0.5, stroke: gray + 0.2pt) // Hauptlinien alle 0.5 Einheiten
//grid((-1, -1), (3, 2), step: 0.1, stroke: gray.lighten(50%) + 0.1pt) // Sehr feine Linien alle 0.1
line((0.5,1),(3,1), name: "top", mark: ( end: "stealth", fill: black) ) // Obere Gerade
content((rel: (1em, 0), to: "top.end"),
box(fill: white, inset: 0pt)[#x],
anchor: "center")
})}
#let pfeilrueck_mit_x(x) = {
cetz.canvas({
import cetz.draw: *
// Das Grid (Hintergrund)
//grid((0, -1), (4, 2), step: 0.5, stroke: gray + 0.2pt) // Hauptlinien alle 0.5 Einheiten
//grid((-1, -1), (3, 2), step: 0.1, stroke: gray.lighten(50%) + 0.1pt) // Sehr feine Linien alle 0.1
line((0.5,1),(3,1), name: "top") // Obere Gerade
arc((3,1), start:270deg, stop: 90deg, radius: -0.5)
line((3,0),(1.5,0), mark: ( end: "stealth", fill: black))
content("top.mid",
box(fill: white, inset: 2pt)[#x],
anchor: "center")
})}
#pfeilrueck_mit_x("y")
#let pfeilrueck_mit_xy(x, y) = {
cetz.canvas({
import cetz.draw: *
// Das Grid (Hintergrund)
//grid((0, -1), (4, 2), step: 0.5, stroke: gray + 0.2pt) // Hauptlinien alle 0.5 Einheiten
//grid((-1, -1), (3, 2), step: 0.1, stroke: gray.lighten(50%) + 0.1pt) // Sehr feine Linien alle 0.1
line((0.5,1),(3,1), name: "top") // Obere Gerade
arc((3,1), start:270deg, stop: 90deg, radius: -0.5)
line((3,0),(1.5,0), mark: ( end: "stealth", fill: black),name: "bottom")
content("top.mid",
box(fill: white, inset: 2pt)[#x],
anchor: "center")
content((rel: (-.5em, 0), to: "bottom.end"),
box(fill: white, inset: 0pt)[#y],
anchor: "center")
}) }
#let nonumber(body) = {
set heading(numbering: none)
body
}
#show heading.where(level: 1): it => {
set text(size: 16pt, font: "Lato", tracking: 0.0em)
block(spacing: 1.3em)[
#it
#v(-0.5em)
//#line(length: 100%, stroke: 0.5pt + gray)
]
}
//#show heading: set block(above: 2em, below: 1em)
//#show heading.where(level: 1): set block(spacing: 2em)
#set heading(numbering: "1.")
#let einruecken(abstand, inhalt) = pad(left: abstand, inhalt)
#let hrule = {box}(line(length: 100%, stroke: 3pt))
//#(line(length: 100%, stroke: 3pt))