# Changes to LaTeX \ shortcuts in REPL

#1

For my LaTeX_Entities package, I build up the list of LaTeX entity names to use as shortcuts (which I use in my StringLiterals package) programmatically, from 3 sources,
http://www.w3.org/2003/entities/2007xml/, https://raw.githubusercontent.com/wspr/unicode-math/master/, and a local file with Julia specific additions such as xor.
The first two sources are the same as were originally used to produce the Julia latex_symbols.jl.
Using this technique, I was able to also automatically add some 1457 entities (in v0.6.2) that are not present in latex_symbols, such as: breve{A}, bar{A}, c{C}, and many other useful shortcuts for Unicode characters.
When finished, it reports only 4 entities that are different between latex_symbols.jl and my automatically built table:

Entities present in both tables, with different values: 4
⟧  27e7   〛 301b   openbracketright
⟦  27e6   〚 301a   openbracketleft
↿  21bf   ↾  21be   upharpoonright
↾  21be   ↿  21bf   upharpoonleft


These are because the files that latex_symbols.jl was based on had been updated (to fix the incorrect left/right designation of the upharpoon characters, for example).

The new latex_symbols.jl has the following replacements for the standard LaTeX entity prefixes:

const bold = "\\bf"
const italic = "\\it"
const bolditalic = "\\bi"
const blackboard = "\\bb"
const italicblackboard = "\\bbi"
const script = "\\scr"
const boldscript = "\\bscr"
const sans = "\\sans"
const boldsans = "\\bsans"
const italicsans = "\\isans"
const bolditalicsans = "\\bisans"
const frak = "\\frak"
const boldfrak = "\\bfrak"
const mono = "\\tt"


Would it be possible to annotate those with what the original “standard” prefixes were?
(and also annotate which ones were simply removed, like "APL")

I don’t want to have to make the exception table huge, if I can instead simply programmatically generate these new short forms. (which I think would be a good technique for Julia to use, instead of a huge manually maintained table that has to be compiled into Julia (now into stdlib/REPL)

#2

I think I’ve got things figured out, and I’d like to propose what I think would be easier to use Julia-specific shortcuts:

standard  | v7.0   | proposed | type
----------|--------|----------|------
mscr      | scr	   | sc       | script
msans     | sans   | ss       | sans-serif
Bbb       | bb	   | bb       | blackboard
mfrak     | frak   | fr       | fraktur
mtt	      | tt	   | tt       | mono
mit       | it	   | it       | italic
mitsans   | isans  | is       | italic sans-serif
mitBbb    | bbi    | ib       | italic blackboard
mbf	      | bf     | bd       | bold
mbfscr	  | bscr   | bc       | bold script
mbfsans   | bsans  | bs       | bold sans-serif
mbffrak   | bfrak  | bf       | bold fraktur
mbfit	  | bi	   | bi       | bold italic
mbfitsans | bisans | bis      | bold italic sans-serif


The proposal uses 2-letter prefixes for all things with just one or two traits, and 3 for the one that combines 3 (bold, italic, and sans-serif).
Also, instead of having 0-9 spelled out, for the short from I’d just have the digit 0-9, so
instead of mbfsanseight (as in v0.6 and earlier) or bsanseight as in v0.7, it would be simply bs8.

#3

I’ve noticed a few other issues as well - some mispellings have gotten picked up inadvertently (the misspellings seem to have been introduced in W3.org’s unicode.xml file - although it might have been intentional, if the entity names back in darkest history were limited to 8 characters)

    "\\bkarow" => "⤍",
"\\dbkarow" => "⤏",
"\\hksearow" => "⤥",
"\\hkswarow" => "⤦",


which I believe should be renamed to spell arrow correctly, and be consistent.