Skip to content

Commit

Permalink
Remove unnecessary style expressions. (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidTux authored Sep 24, 2024
1 parent 2f19735 commit 1cd65e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file modified physica-manual.pdf
Binary file not shown.
12 changes: 6 additions & 6 deletions physica.typ
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
#let bra(f) = $lr(angle.l #f|)$
#let ket(f) = $lr(|#f angle.r)$

#let braket(..sink) = style(styles => {
#let braket(..sink) = {
let args = sink.pos() // array

let bra = args.at(0, default: none)
Expand All @@ -474,21 +474,21 @@
let middle = args.at(1)
$ lr(angle.l bra#h(0pt)mid(|)#h(0pt)middle#h(0pt)mid(|)#h(0pt)ket angle.r) $
}
})
}

#let ketbra(..sink) = style(styles => {
#let ketbra(..sink) = {
let args = sink.pos() // array
assert(args.len() == 1 or args.len() == 2, message: "expecting 1 or 2 args")

let ket = args.at(0)
let bra = args.at(1, default: ket)

$ lr(|ket#h(0pt)mid(angle.r#h(0pt)angle.l)#h(0pt)bra|) $
})
}

#let matrixelement(n, M, m) = style(styles => {
#let matrixelement(n, M, m) = {
$ lr(angle.l #n#h(0pt)mid(|)#h(0pt)#M#h(0pt)mid(|)#h(0pt)#m angle.r) $
})
}

#let mel = matrixelement

Expand Down

0 comments on commit 1cd65e1

Please sign in to comment.