Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary style expressions. #34

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading