diff --git a/physica-manual.pdf b/physica-manual.pdf index a245b37..fbef760 100644 Binary files a/physica-manual.pdf and b/physica-manual.pdf differ diff --git a/physica-manual.typ b/physica-manual.typ index a321e15..9a28df5 100644 --- a/physica-manual.typ +++ b/physica-manual.typ @@ -164,16 +164,16 @@ All symbols need to be used in *math mode* `$...$`. [`vb(a),vb(mu_1)` #sym.arrow $vb(a),vb(mu_1)$], [vector, bold], - [`vectorarrow(`_content_`)`], - [`va`], - [`va(a),va(mu_1)` #sym.arrow $va(a),va(mu_1)$], - [vector, arrow], - [`vectorunit(`_content_`)`], [`vu`], [`vu(a),vu(mu_1)` #sym.arrow $vu(a),vu(mu_1)$], [unit vector], + [`vectorarrow(`_content_`)`], + [`va`], + [`va(a),va(mu_1)` #sym.arrow $va(a),va(mu_1)$], + [vector, arrow \ #sub[(not bold: see ISO 80000-2:2019)]], + [`gradient`], [`grad`], [`grad f` #sym.arrow $grad f$], diff --git a/physica.typ b/physica.typ index 991083a..8c181f3 100644 --- a/physica.typ +++ b/physica.typ @@ -155,28 +155,36 @@ #let vectorbold(a) = $bold(italic(#a))$ #let vb = vectorbold -#let __vectoraccent(a, accent) = { - let bold_italic(e) = math.bold(math.italic(e)) +#let __vectoraccent(a, accent, be_bold) = { + let maybe_bold(e) = if be_bold { + math.bold(math.italic(e)) + } else { + math.italic(e) + } if type(a) == "content" and a.func() == math.attach { math.attach( - math.accent(bold_italic(a.base), accent), - t: if a.has("t") { math.bold(a.t) } else { none }, - b: if a.has("b") { math.bold(a.b) } else { none }, - tl: if a.has("tl") { math.bold(a.tl) } else { none }, - bl: if a.has("bl") { math.bold(a.bl) } else { none }, - tr: if a.has("tr") { math.bold(a.tr) } else { none }, - br: if a.has("br") { math.bold(a.br) } else { none }, + math.accent(maybe_bold(a.base), accent), + t: if a.has("t") { maybe_bold(a.t) } else { none }, + b: if a.has("b") { maybe_bold(a.b) } else { none }, + tl: if a.has("tl") { maybe_bold(a.tl) } else { none }, + bl: if a.has("bl") { maybe_bold(a.bl) } else { none }, + tr: if a.has("tr") { maybe_bold(a.tr) } else { none }, + br: if a.has("br") { maybe_bold(a.br) } else { none }, ) } else { - math.accent(bold_italic(a), accent) + math.accent(maybe_bold(a), accent) } } -#let vectorarrow(a) = __vectoraccent(a, math.arrow) -#let va = vectorarrow -#let vectorunit(a) = __vectoraccent(a, math.hat) +#let vectorunit(a) = __vectoraccent(a, math.hat, true) #let vu = vectorunit +// According to "ISO 80000-2:2019 Quantities and units — Part 2: Mathematics" +// the vector notation should be either bold italic or non-bold italic accented +// by a right arrow +#let vectorarrow(a) = __vectoraccent(a, math.arrow, false) +#let va = vectorarrow + #let gradient = $bold(nabla)$ #let grad = gradient