use quarto, not Pluto to render pages
This commit is contained in:
75
quarto/misc/unicode.qmd
Normal file
75
quarto/misc/unicode.qmd
Normal file
@@ -0,0 +1,75 @@
|
||||
# Usages of Unicode symbols
|
||||
|
||||
|
||||
```{julia}
|
||||
#| echo: false
|
||||
|
||||
import Logging
|
||||
Logging.disable_logging(Logging.Info) # or e.g. Logging.Info
|
||||
Logging.disable_logging(Logging.Warn)
|
||||
|
||||
import SymPy
|
||||
function Base.show(io::IO, ::MIME"text/html", x::T) where {T <: SymPy.SymbolicObject}
|
||||
println(io, "<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> ")
|
||||
println(io, "\\[")
|
||||
println(io, sympy.latex(x))
|
||||
println(io, "\\]")
|
||||
println(io, "</span>")
|
||||
end
|
||||
|
||||
# hack to work around issue
|
||||
import Markdown
|
||||
import CalculusWithJulia
|
||||
function CalculusWithJulia.WeaveSupport.ImageFile(d::Symbol, f::AbstractString, caption; kwargs...)
|
||||
nm = joinpath("..", string(d), f)
|
||||
u = ""
|
||||
Markdown.parse(u)
|
||||
end
|
||||
|
||||
nothing
|
||||
```
|
||||
|
||||
`Julia` allows the use of *Unicode* symbols to replace variable names and for function calls. Unicode operations are entered in this pattern `\name[tab]`. That is a slash, `\`, the name (e.g., `alpha`), and then a press of the `tab` key.
|
||||
|
||||
|
||||
In these notes, the following may appear as variable or function names
|
||||
|
||||
|
||||
| `\Name` | Symbol | Usage notes |
|
||||
|:-------- |:------ |:------------------------------- |
|
||||
| `\euler` | `ℯ` | The variable `e` |
|
||||
| `\pi` | `π` | |
|
||||
| `\alpha` | `α` | |
|
||||
| `\beta` | `β` | |
|
||||
| `\delta` | `δ` | |
|
||||
| `\Delta` | `Δ` | Change, as in `Δx` |
|
||||
| `\gamma` | `γ` | |
|
||||
| `\phi` | `ϕ` | |
|
||||
| `\Phi` | `Φ` | Used for parameterized surfaces |
|
||||
| `x\_1` | `x₁` | Subscripts |
|
||||
| `r\vec` | `r⃗` | Vector annotation |
|
||||
| `T\hat` | `T̂` | Unit vector annotation |
|
||||
|
||||
|
||||
The following are associated with derivatives
|
||||
|
||||
|
||||
| `\Name` | Symbol | Usage notes |
|
||||
|:---------- |:------ |:--------------------------- |
|
||||
| `\partial` | `∂` | |
|
||||
| `\nabla` | `∇` | del operator in CwJ package |
|
||||
|
||||
|
||||
The following are *infix* operators
|
||||
|
||||
|
||||
| `\Name` | Symbol | Usage notes |
|
||||
|:-------- |:------ |:------------- |
|
||||
| `\circ` | `∘` | composition |
|
||||
| `\cdot` | `⋅` | dot product |
|
||||
| `\times` | `×` | cross product |
|
||||
|
||||
|
||||
Infix operators may need parentheses due to precedence rules. For example, to call a composition, one needs `(f ∘ g)(x)` so that composition happens before function evaluation (`g(x)`).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user