4

I am looking for a list of LaTeX symbols and commands which is in a nice machine readable format (json/xml/csv). Something similar to The Comprehensive LaTeX Symbol List. Can anyone point me in the direction where I could find something similar or perhaps build it up myself?

  • 7
    I'd be tempted to ask the guy who runs Detexify, as there must be some structured information for that site. – Joseph Wright Jan 4 '13 at 13:57
  • 2
    For a nice list of LaTeX symbols and their mapping to unicode points look at the file puenc.def from the hyperref bundle. – Stephan Lehmke Jan 4 '13 at 18:21
  • @StephanLehmke Please make your comment into an answer :-) – Joseph Wright Aug 5 '13 at 6:08
4

CW from comments

A good source for this correspondence is the file puenc.def in the oberdiek bundle; it consists of about 2000 lines like

\DeclareTextCommand{\`}{PU}[1]{#1\83\000}% U+0300
\DeclareTextCommand{\'}{PU}[1]{#1\83\001}% U+0301
\DeclareTextCommand{\^}{PU}[1]{#1\83\002}% U+0302
\DeclareTextCommand{\~}{PU}[1]{#1\83\003}% U+0303
\DeclareTextCommand{\=}{PU}[1]{#1\83\004}% U+0304
\DeclareTextCommand{\u}{PU}[1]{#1\83\006}% U+0306
\DeclareTextCommand{\U}{PU}[1]{#1\83\006}% U+0306
\DeclareTextCommand{\.}{PU}[1]{#1\83\007}% U+0307
\DeclareTextCommand{\"}{PU}[1]{#1\83\010}% U+0308
\DeclareTextCommand{\r}{PU}[1]{#1\83\012}% U+030A
\DeclareTextCommand{\H}{PU}[1]{#1\83\013}% U+030B
\DeclareTextCommand{\v}{PU}[1]{#1\83\014}% U+030C
\DeclareTextCommand{\G}{PU}[1]{#1\83\017}% U+030F
\DeclareTextCommand{\C}{PU}[1]{#1\83\017}% U+030F
\DeclareTextCommand{\textinvbreve}{PU}[1]{#1\83\021}% U+0311
\DeclareTextCommand{\d}{PU}[1]{#1\83\043}% U+0323
\DeclareTextCommand{\textsubumlaut}{PU}[1]{#1\83\044}% U+0324
\DeclareTextCommand{\textsubring}{PU}[1]{#1\83\045}% U+0325
\DeclareTextCommand{\c}{PU}[1]{#1\83\047}% U+0327
\DeclareTextCommand{\k}{PU}[1]{#1\83\050}% U+0328
\DeclareTextCommand{\textsubcircum}{PU}[1]{#1\83\055}% U+032D
\DeclareTextCommand{\textsubbreve}{PU}[1]{#1\83\056}% U+032E
\DeclareTextCommand{\textsubtilde}{PU}[1]{#1\83\060}% U+0330
\DeclareTextCommand{\b}{PU}[1]{#1\83\061}% U+0331
\DeclareTextCommand{\t}{PU}[1]{#1\83\141}% U+0361
\DeclareTextCommand{\textcircled}{PU}[1]{#1\9040\335}% U+20DD
\DeclareTextCommand{\textacutemacron}{PU}[1]{#1\83\001\83\004}% U+0301 U+0304
\DeclareTextCommand{\textgravemacron}{PU}[1]{#1\83\000\83\004}% U+0300 U+0304

[...]

\DeclareTextCommand{\CYRA}{PU}{\84\020}% U+0410
\DeclareTextCommand{\CYRB}{PU}{\84\021}% U+0411
\DeclareTextCommand{\CYRV}{PU}{\84\022}% U+0412
\DeclareTextCommand{\CYRG}{PU}{\84\023}% U+0413
\DeclareTextCommand{\CYRD}{PU}{\84\024}% U+0414
\DeclareTextCommand{\CYRE}{PU}{\84\025}% U+0415
\DeclareTextCommand{\CYRZH}{PU}{\84\026}% U+0416
\DeclareTextCommand{\CYRZ}{PU}{\84\027}% U+0417
\DeclareTextCommand{\CYRI}{PU}{\84\030}% U+0418
\DeclareTextCommand{\CYRISHRT}{PU}{\84\031}% U+0419
\DeclareTextCompositeCommand{\U}{PU}{\CYRI}{\84\031}% U+0419
\DeclareTextCommand{\CYRK}{PU}{\84\032}% U+041A
\DeclareTextCommand{\CYRL}{PU}{\84\033}% U+041B
\DeclareTextCommand{\CYRM}{PU}{\84\034}% U+041C
\DeclareTextCommand{\CYRN}{PU}{\84\035}% U+041D
\DeclareTextCommand{\CYRO}{PU}{\84\036}% U+041E
\DeclareTextCommand{\CYRP}{PU}{\84\037}% U+041F
\DeclareTextCommand{\CYRR}{PU}{\84\040}% U+0420
\DeclareTextCommand{\CYRS}{PU}{\84\041}% U+0421
\DeclareTextCommand{\CYRT}{PU}{\84\042}% U+0422
\DeclareTextCommand{\CYRU}{PU}{\84\043}% U+0423
\DeclareTextCommand{\CYRF}{PU}{\84\044}% U+0424
\DeclareTextCommand{\CYRH}{PU}{\84\045}% U+0425
\DeclareTextCommand{\CYRC}{PU}{\84\046}% U+0426
\DeclareTextCommand{\CYRCH}{PU}{\84\047}% U+0427
\DeclareTextCommand{\CYRSH}{PU}{\84\050}% U+0428

[...]

\DeclareTextCommand{\textguarani}{PU}{\9040\262}% U+20B2
\DeclareTextCommand{\textcelsius}{PU}{\9041\003}% U+2103
\DeclareTextCommand{\texthslash}{PU}{\9041\017}%* U+210F
\DeclareTextCommand{\textIm}{PU}{\9041\021}%* U+2111
\DeclareTextCommand{\textell}{PU}{\9041\023}%* U+2113
\DeclareTextCommand{\textnumero}{PU}{\9041\026}% U+2116
\DeclareTextCommand{\textcircledP}{PU}{\9041\027}% U+2117
\DeclareTextCommand{\textwp}{PU}{\9041\030}%* U+2118
\DeclareTextCommand{\textRe}{PU}{\9041\034}%* U+211C
\DeclareTextCommand{\textrecipe}{PU}{\9041\036}% U+211E
\DeclareTextCommand{\textservicemark}{PU}{\9041\040}% U+2120
\DeclareTextCommand{\texttrademark}{PU}{\9041\042}% U+2122

[...]

that, combined with the Comprehensive List of LaTeX Symbols (texdoc symbols) can solve most of the correspondence problems.

0

Package unicode-math has a long list of math symbols, defined by the package. The TeX data file unicode-math-table.tex can be parsed and includes the Unicode code points. The first lines of the file:

\UnicodeMathSymbol{"00021}{\mathexclam               }{\mathpunct}{exclamation mark}%
\UnicodeMathSymbol{"00023}{\mathoctothorpe           }{\mathord}{number sign}%
\UnicodeMathSymbol{"00024}{\mathdollar               }{\mathord}{dollar sign}%
\UnicodeMathSymbol{"00025}{\mathpercent              }{\mathord}{percent sign}%
\UnicodeMathSymbol{"00026}{\mathampersand            }{\mathord}{ampersand}%
\UnicodeMathSymbol{"00028}{\lparen                   }{\mathopen}{left parenthesis}%
\UnicodeMathSymbol{"00029}{\rparen                   }{\mathclose}{right parenthesis}%
\UnicodeMathSymbol{"0002B}{\mathplus                 }{\mathbin}{plus sign b:}%
\UnicodeMathSymbol{"0002C}{\mathcomma                }{\mathpunct}{comma}%
\UnicodeMathSymbol{"0002E}{\mathperiod               }{\mathord}{full stop, period}%
\UnicodeMathSymbol{"0002F}{\mathslash                }{\mathord}{solidus}%
\UnicodeMathSymbol{"0003A}{\mathcolon                }{\mathpunct}{colon}%
\UnicodeMathSymbol{"0003B}{\mathsemicolon            }{\mathpunct}{semicolon p:}%
\UnicodeMathSymbol{"0003C}{\less                     }{\mathrel}{less-than sign r:}%
\UnicodeMathSymbol{"0003D}{\equal                    }{\mathrel}{equals sign r:}%
\UnicodeMathSymbol{"0003E}{\greater                  }{\mathrel}{greater-than sign r:}%
\UnicodeMathSymbol{"0003F}{\mathquestion             }{\mathord}{question mark}%
\UnicodeMathSymbol{"00040}{\mathatsign               }{\mathord}{commercial at}%
\UnicodeMathSymbol{"0005B}{\lbrack                   }{\mathopen}{left square bracket}%
\UnicodeMathSymbol{"0005C}{\backslash                }{\mathord}{reverse solidus}%
\UnicodeMathSymbol{"0005D}{\rbrack                   }{\mathclose}{right square bracket}%
\UnicodeMathSymbol{"0007B}{\lbrace                   }{\mathopen}{left curly bracket}%
\UnicodeMathSymbol{"0007C}{\vert                     }{\mathfence}{vertical bar}%
\UnicodeMathSymbol{"0007D}{\rbrace                   }{\mathclose}{right curly bracket}%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.