Bugs and Beefs

Your place to report bugs and complain in general

Current Post

More Equation Symbols!

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!

TeX Symbols

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

More Symbols

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?

A2=ψ|A2|ψ


Tags: eqn eqnx


2 COMMENTS
#1

Chris Price on Dec 19, 2023 9:39 PM


To the untrained eye? Perfectly impenetrable.


Replies:
#2

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.)


Replies:

You need to be logged in to comment


Drag the picture you want to upload into the large box below. You can use the controls to edit the picture to be uploaded. This will not affect the picture on your hard disk.

Or, if you are on a tablet or phone, or don't like Drag and Drop, you can select a picture using this

Get a modern browser to make picture uploads

Rotation:
Up Right Down Left

Brightness:
1.0

Color Balance:
Red: 1.0
Green: 1.0
Blue: 1.0
Gray: 1.0

Contrast:
0.0

Cropping:
Slide the boxes with triangles along the edges of the picture to crop.

(Picture below can be dragged if need be.)