# Changes to LaTeX \\ shortcuts in REPL

**URL:** <https://discourse.julialang.org/t/changes-to-latex-shortcuts-in-repl/9110>\
**Category:** Internals & Design\
**Created:** [February 16, 2018, 1:24pm UTC](https://discourse.julialang.org/t/changes-to-latex-shortcuts-in-repl/9110 "2018-02-16T13:24:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [February 16, 2018, 1:24pm UTC](https://discourse.julialang.org/t/changes-to-latex-shortcuts-in-repl/9110/1 "2018-02-16T13:24:44Z")

</div>

For my [LaTeX\_Entities](https://github.com/JuliaString/LaTeX_Entities.jl) package, I build up the list of LaTeX entity names to use as shortcuts (which I use in my [StringLiterals](https://github.com/JuliaString/StringLiterals.jl) package) programmatically, from 3 sources,  
[Index of /2003/entities/2007xml](http://www.w3.org/2003/entities/2007xml/), [https://raw.githubusercontent.com/wspr/unicode-math/master/](https://raw.githubusercontent.com/wspr/unicode-math/master/), and a [local file](https://github.com/JuliaString/LaTeX_Entities.jl/blob/master/src/manual_latex.jl) 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:

```julia
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:

```julia
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)

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [February 16, 2018, 10:14pm UTC](https://discourse.julialang.org/t/changes-to-latex-shortcuts-in-repl/9110/2 "2018-02-16T22:14:19Z")

</div>

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:

```markdown
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`.

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [February 18, 2018, 9:58am UTC](https://discourse.julialang.org/t/changes-to-latex-shortcuts-in-repl/9110/3 "2018-02-18T09:58:06Z")

</div>

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](http://www.w3.org/2003/entities/2007xml/unicode.xml) file - although it might have been intentional, if the entity names back in darkest history were limited to 8 characters)

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

```

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