Carl Milsted, Jr on Dec 17 20:10:13
I've been working on extension to the eqn language for the past few days. Much has changed since eqn was created in the 70s! Once upon a time, you had to load special fonts for the different math symbols, with different meanings for character values depending on the font.
Today, we have the Unicode standard for thousands of different glyphs. A single font can theoretically support all the glyphs. Instead of changing fonts to get effects, you can use a different Unicode value. (Does not work with all fonts!)
Anyway, Unicode has code points for an astounding number of mathematical symbols.
I am not going to support everything automatically. Instead, you can use eqn's
define
command as follows:
.eqn define mysymbol "\[u1234]" ..eqn
Replace the 1234 with the hexadecimal value of your desired Unicode symbol. If there are less than four zeroes, use leading zeroes to get for digits.
But first, behold the additional symbols I now support!
For the first set of symbols, I took some tables from Leslie Lamport's LATEX, A Document Processing System and mapped the TeX symbols (minus the damnable backslashes! This is all about typing quickly!) to the Unicode values.
Some of the "new" symbols map to the existing symbols in the core eqn language. For example, you can now get a capital Greek letter by just capitalizing the first letter of the name, such as Gamma. This is one feature where TeX is easier to type than eqn. But not eqnx -- my name for extended GNU eqn. The GNU folks will be free to incorporate my extensions when I get done. Though I expect Not Invented Here syndrome will prevent them...
Behold, the results:
varepsilon | |
vartheta | |
varpi | |
varrho | |
varsigma | |
varphi | |
Gamma | |
Delta | |
Theta | |
Lambda | |
Xi | |
Pi | |
Sigma | |
Upsilon | |
Phi | |
Psi | |
Omega | |
pm | |
mp | |
div | |
ast | |
star | |
circ | |
bullet | |
cap | |
cup | |
uplus | |
sqcap | |
sqcup | |
vee | |
wedge | |
setminus | |
wr | |
diamond | |
bigtriangleup | |
bigtriangledown | |
triangleleft | |
triangleright | |
lhd | |
rhd | |
unlhd | |
unrhd | |
oplus | |
ominus | |
otimes | |
oslash | |
odot | |
bigcirc | |
dagger | |
ddagger | |
amalg | |
leq | |
prec | |
preceq | |
ll | |
subset | |
subseteq | |
sqsubset | |
sqsubseteq | |
in | |
vdash | |
geq | |
succ | |
succeq | |
gg | |
supset | |
supseteq | |
sqsupset | |
sqsupseteq | |
ni | |
dashv | |
equiv | |
sim | |
simeq | |
asymp | |
cong | |
neq | |
doteq | |
propto | |
models | |
perp | |
mid | |
parallel | |
bowtie | |
Join | |
smile | |
frown | |
leftarrow | |
Leftarrow | |
rightarrow | |
Rightarrow | |
leftrightarrow | |
Leftrightarrow | |
mapsto | |
hookleftarrow | |
leftharpoonup | |
leftharpoondown | |
rightleftharpoons | |
longleftarrow | |
Longleftarrow | |
longrightarrow | |
Longrightarrow | |
longleftrightarrow | |
Longleftrightarrow | |
longmapsto | |
hookrightarrow | |
rightharpoonup | |
rightharpoondown | |
leadsto | |
uparrow | |
Uparrow | |
downarrow | |
Downarrow | |
updownarrow | |
Updownarrow | |
nearrow | |
swarrow | |
swarrow | |
nwarrow | |
aleph | |
hbar | |
imath | |
jmath | |
ell | |
wp | |
Re | |
Im | |
mho | |
emptyset | |
nabla | |
surd | |
top | |
bot | |
angle | |
forall | |
exists | |
neg | |
flat | |
natural | |
sharp | |
infty | |
Box | |
Diamond | |
triangle | |
clubsuit | |
diamondsuit | |
heartsuit | |
spadesuit |
When looking at the above, I decided that some other symbols need to go along with them. Some of the operators need a negation. And what's the point of doing math logic if you don't have a therefore symbol!
And I threw in thorn and eth, because they are cool Viking letters which used to be part of the English language.
therefore | |
because | |
ratio | |
proportional | |
nsubset | |
nsupset | |
nsubseteq | |
nsupseteq | |
langle | |
rangle | |
bra | |
ket | |
nexists | |
nin | |
nni | |
ring | |
deg | |
anglert | |
thorn | |
Thorn | |
eth | |
Eth |
Some of the above are subject to change.
Should I use
anglert
for right angle or
rtangle
? And there are two different Unicode values for angle brackets. The look
pretty much the same on my browser. I'm not sure which code points are
the correct ones for doing Dirac bra and ket. I just guessed. How does this
look?
Carl Milsted, Jr on Dec 19, 2023 9:55 PM
in response to
comment_107_1
For the angle brackets, bra and langle are probably the exact same character for Mozilla under Linux. I ask the question in case people looking at the page with different browsers/OSs see something different.
(P.S. working on the bugs you found now. It is taking me a bit to fix as it involves repairing the database. Hope to have it fixed tomorrow.)
You need to be logged in to comment