Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unicode superscripts and subscripts to latex substitutions #6927

Merged
merged 5 commits into from
May 28, 2014
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions base/latex_symbols.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,53 @@ const latex_symbols = [
"\\cbrt" => "\u221B",
"\\female" => "♀",
"\\mars" => "♂",
"\\^0" => "⁰",
"\\^1" => "¹",
"\\^2" => "²",
"\\^3" => "³",
"\\^4" => "⁴",
"\\^5" => "⁵",
"\\^6" => "⁶",
"\\^7" => "⁷",
"\\^8" => "⁸",
"\\^9" => "⁹",
"\\^+" => "⁺",
"\\^-" => "⁻",
"\\^=" => "⁼",
"\\^(" => "⁽",
"\\^)" => "⁾",
"\\^n" => "ⁿ",
"\\^i" => "ⁱ",
"\\_0" => "₀",
"\\_1" => "₁",
"\\_2" => "₂",
"\\_3" => "₃",
"\\_4" => "₄",
"\\_5" => "₅",
"\\_6" => "₆",
"\\_7" => "₇",
"\\_8" => "₈",
"\\_9" => "₉",
"\\_+" => "₊",
"\\_-" => "₋",
"\\_=" => "₌",
"\\_(" => "₍",
"\\_)" => "₎",
"\\_a" => "ₐ",
"\\_e" => "ₑ",
"\\_o" => "ₒ",
"\\_x" => "ₓ",
"\\_schwa" => "ₔ",
"\\_h" => "ₕ",
"\\_k" => "ₖ",
"\\_l" => "ₗ",
"\\_m" => "ₘ",
"\\_n" => "ₙ",
"\\_p" => "ₚ",
"\\_s" => "ₛ",
"\\_t" => "ₜ",
"\\hbar" => "ħ",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are using the wrong codepoint here. This is U+0127, but \hbar should be U+210F.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have \hslash for U+210F. U+0127 looks better to me in upright text, to be honest, so it's not completely clear to me what we should use here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW Wikipedia always uses U+210F for Planck's constant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

U+0127 is also used in IPA, where it is called \textcrh or \crossh, depending upon the LaTeX package.

"\\del" => "∇",

# 732 symbols generated from unicode.xml
"\\textexclamdown" => "¡",
Expand Down