机器可读的 LaTeX 命令和符号列表

机器可读的 LaTeX 命令和符号列表

我正在寻找一个 LaTeX 符号和命令列表,该列表采用良好的机器可读格式 (json/xml/csv)。类似于综合 LaTeX 符号列表。有人能告诉我哪里可以找到类似的东西或者自己构建它吗?

答案1

CW 来自评论

puenc.def该文件包中的文件是一个很好的来源oberdiek,它包含大约 2000 行,例如

\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

[...]

再加上LaTeX 符号综合列表texdoc symbols)能解决大部分对应问题。

答案2

包裹unicode-math有很长的数学符号列表,由包定义。TeX 数据文件unicode-math-table.tex可以解析并包含 Unicode 代码点。该文件的前几行:

\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}%

相关内容