{"id":6135,"date":"2024-09-18T01:02:36","date_gmt":"2024-09-17T17:02:36","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=6135"},"modified":"2025-01-24T21:01:43","modified_gmt":"2025-01-24T13:01:43","slug":"mathtranslate","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/ja\/mathtranslate\/","title":{"rendered":"MathTranslate\uff1a\u79d1\u5b66\u8bba\u6587LaTeX\u7ffb\u8bd1\u5de5\u5177"},"content":{"rendered":"<p>MathTranslate \u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u7ffb\u8bd1 LaTeX \u6587\u6863\u7684\u5728\u7ebf\u5de5\u5177\uff0c\u7279\u522b\u9002\u7528\u4e8e\u79d1\u5b66\u8bba\u6587\u7684\u7ffb\u8bd1\u3002\u8be5\u5de5\u5177\u80fd\u591f\u4fdd\u6301 LaTeX \u8868\u8fbe\u5f0f\uff08\u5982\u6570\u5b66\u8868\u8fbe\u5f0f\uff09\u4e0d\u53d8\uff0c\u5e76\u6700\u7ec8\u5c06 LaTeX \u6587\u6863\u7f16\u8bd1\u6210 PDF \u6587\u4ef6\u3002MathTranslate \u63d0\u4f9b\u4e86\u4e00\u4e2a\u63a5\u53e3\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165 arXiv \u8bba\u6587\u7f16\u53f7\u8fdb\u884c\u7ffb\u8bd1\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7 <a href=\"https:\/\/www.kdjingpai.com\/ja\/mathpix\/\">Mathpix<\/a> \u4ece PDF \u751f\u6210 LaTeX \u4ee3\u7801\u540e\u518d\u8fdb\u884c\u7ffb\u8bd1\u3002<\/p>\n<dl>\n<dt>\n<p><div style=\"width: 1059px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" title=\"MathTranslate\uff1a\u79d1\u5b66\u8bba\u6587LaTeX\u7ffb\u8bd1\u5de5\u5177-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/09\/b86fc33b2149c9b.png\" alt=\"MathTranslate\uff1a\u79d1\u5b66\u8bba\u6587LaTeX\u7ffb\u8bd1\u5de5\u5177-1\" width=\"1049\" height=\"774\" \/><p class=\"wp-caption-text\">\u6765\u6e90\uff1ahttp:\/\/mathtranslate.xyz\/<\/p><\/div><\/dt>\n<\/dl>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u5728\u7ebf\u7ffb\u8bd1 LaTeX \u6587\u6863<\/li>\n<li>\u652f\u6301\u591a\u8bed\u8a00\u7ffb\u8bd1<\/li>\n<li>\u4fdd\u6301\u6570\u5b66\u8868\u8fbe\u5f0f\u4e0d\u53d8<\/li>\n<li>\u5c06 LaTeX \u6587\u6863\u7f16\u8bd1\u6210 PDF \u6587\u4ef6<\/li>\n<li>\u652f\u6301 arXiv \u8bba\u6587\u7684\u76f4\u63a5\u7ffb\u8bd1<\/li>\n<li>\u63d0\u4f9b\u547d\u4ee4\u884c\u4f7f\u7528\u65b9\u5f0f<\/li>\n<li>\u652f\u6301\u6350\u8d60\u529f\u80fd<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u4e0e\u4f7f\u7528<\/h3>\n<p>MathTranslate \u63d0\u4f9b\u4e86\u4e24\u79cd\u4e3b\u8981\u7684\u4f7f\u7528\u65b9\u5f0f\uff1a\u7f51\u9875\u670d\u52a1\u5668\u548c\u547d\u4ee4\u884c\u4f7f\u7528\u3002<\/p>\n<h4>\u7f51\u9875\u670d\u52a1\u5668\uff08\u63a8\u8350\u7ed9\u521d\u5b66\u8005\uff09<\/h4>\n<ol>\n<li>\u8bbf\u95ee MathTranslate \u7684\u5728\u7ebf\u7ffb\u8bd1\u7f51\u7ad9\u3002<\/li>\n<li>\u8f93\u5165\u9700\u8981\u7ffb\u8bd1\u7684 arXiv \u8bba\u6587\u7f16\u53f7\uff0c\u6216\u4e0a\u4f20\u5305\u542b LaTeX \u4ee3\u7801\u7684\u6587\u4ef6\u3002<\/li>\n<li>\u70b9\u51fb\u7ffb\u8bd1\u6309\u94ae\uff0c\u7b49\u5f85\u7ffb\u8bd1\u7ed3\u679c\u751f\u6210\u3002<\/li>\n<li>\u4e0b\u8f7d\u751f\u6210\u7684 PDF \u6587\u4ef6\u3002<\/li>\n<\/ol>\n<h4>\u547d\u4ee4\u884c\u4f7f\u7528\uff08\u9002\u7528\u4e8e\u9ad8\u7ea7\u7528\u6237\uff09<\/h4>\n<ol>\n<li>\u5b89\u88c5 Python3 \u548c pip\uff1a\n<pre><code>sudo apt-get install python3 python3-pip\r\n<\/code><\/pre>\n<\/li>\n<li>\u5b89\u88c5 MathTranslate\uff1a\n<pre><code>pip install --upgrade mathtranslate\r\n<\/code><\/pre>\n<\/li>\n<li>\u5bf9\u4e8e Windows \u7528\u6237\uff0c\u53ef\u80fd\u9700\u8981\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c cmd \u6216 powershell\u3002<\/li>\n<\/ol>\n<h3>\u51c6\u5907\u6216\u751f\u6210\u4e00\u4e2a tex \u6587\u4ef6\u6216\u9879\u76ee<\/h3>\n<ol>\n<li>\u5bf9\u4e8e\u5927\u591a\u6570 arXiv \u8bba\u6587\uff0cLaTeX \u6e90\u4ee3\u7801\u662f\u516c\u5f00\u7684\u3002MathTranslate \u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355 API\uff0c\u53ef\u4ee5\u4ece arXiv number \u4e00\u952e\u7ffb\u8bd1\u6574\u4e2a\u9879\u76ee\u3002<\/li>\n<li>\u4f7f\u7528 Mathpix \u628a\u4f60\u60f3\u7ffb\u8bd1\u7684 PDF \u8f6c\u6210 LaTeX \u4ee3\u7801\u3002Mathpix \u53ef\u4ee5\u76f4\u63a5\u628a PDF \u6216\u622a\u56fe\u8f6c\u6362\u6210 LaTeX \u4ee3\u7801\uff0c\u4f46\u5728\u4f7f\u7528\u8d85\u8fc7\u4e00\u5b9a\u6570\u91cf\u4e4b\u540e\u9700\u8981\u6536\u8d39\u3002<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u817e\u8baf\u7ffb\u8bd1API<\/h3>\n<ol>\n<li>\u6ce8\u518c\u817e\u8baf\u7ffb\u8bd1API\u8d26\u53f7\uff0c\u5e76\u5728\u817e\u8baf\u63a7\u5236\u53f0\u4e2d\u83b7\u53d6 secret ID \u548c secret Key\u3002<\/li>\n<li>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b58\u50a8 API secretID \u548c secretKey\uff1a\n<pre><code>translate_tex --setkey\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u547d\u4ee4\u884c\u7ffb\u8bd1 tex \u6587\u4ef6\u6216\u9879\u76ee<\/h3>\n<ol>\n<li>\u7ffb\u8bd1\u5355\u4e2a\u6587\u4ef6\uff1a\n<pre><code>translate_tex input.tex -o output.tex\r\n<\/code><\/pre>\n<p>\u8fd9\u4f1a\u751f\u6210\u7ffb\u8bd1\u540e\u7684 tex \u6587\u4ef6 output.tex\u3002<\/li>\n<li>\u7ffb\u8bd1 arXiv \u9879\u76ee\uff1a\n<pre><code>translate_arxiv 2205.15510\r\n<\/code><\/pre>\n<p>\u8fd9\u4f1a\u751f\u6210\u7ffb\u8bd1\u540e\u7684 tex \u9879\u76ee 2205.15510.zip\u3002<\/li>\n<\/ol>\n<h3>\u7f16\u8bd1\u60a8\u7684 tex \u6587\u4ef6<\/h3>\n<ol>\n<li>\u5bf9\u4e8e\u5355\u4e2a\u6587\u4ef6\uff0c\u53ef\u4ee5\u7528 texlive \u7684\u547d\u4ee4 xelatex output.tex \u7f16\u8bd1\u3002\u4e2d\u6587\u7ffb\u8bd1\u9700\u8981 xeCJK \u5305\u3002<\/li>\n<li>\u5bf9\u4e8e arXiv \u9879\u76ee\uff0c\u5efa\u8bae\u628a\u5f97\u5230\u7684 .zip \u6587\u4ef6\u4e0a\u4f20\u5230 Overleaf \u5728\u7ebf\u7f16\u8bd1\uff08New Project &#8211; Upload Project\uff09\u3002\u6ce8\u610f\uff0c\u9700\u8981\u5728 Menu &#8211; Compiler \u4e2d\u8bbe\u7f6e\u6210 XeLatex \u7f16\u8bd1\u5668\u3002<\/li>\n<\/ol>\n<h3>\u66f4\u6539\u7ffb\u8bd1\u8bed\u8a00\u548c\u5f15\u64ce\u7684\u9ed8\u8ba4\u8bbe\u7f6e<\/h3>\n<ol>\n<li>\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u53c2\u6570 -engine\u3001-from\u3001-to \u66f4\u6539\u7ffb\u8bd1\u8bed\u8a00\u548c\u5f15\u64ce\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u3002\u4f8b\u5982\uff1a\n<pre><code>translate_tex -engine tencent input.tex -o output.tex\r\n<\/code><\/pre>\n<\/li>\n<li>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6c38\u4e45\u66f4\u6539\u8bbe\u7f6e\uff1a\n<pre><code>translate_tex --setdefault\r\n<\/code><\/pre>\n<\/li>\n<li>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u66f4\u591a\u7ec6\u8282\uff1a\n<pre><code>translate_tex --help\r\n<\/code><\/pre>\n<p>translate_arxiv \u4e5f\u63d0\u4f9b\u5b8c\u5168\u76f8\u540c\u7684\u547d\u4ee4\u884c\u53c2\u6570\uff0c\u5b83\u4eec\u7684\u6548\u679c\u662f\u4e00\u6837\u7684\u3002<\/li>\n<\/ol>\n<h3>\u81ea\u5b9a\u4e49\u547d\u4ee4<\/h3>\n<p>\u5728\u7ffb\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5185\u5bb9\u6ca1\u6709\u88ab\u7ffb\u8bd1\u51fa\u6765\uff0c\u8fd9\u4e00\u822c\u662f\u56e0\u4e3a\u6709\u4e00\u4e9b\u81ea\u5b9a\u4e49\u7684\u547d\u4ee4\u6ca1\u6709\u88ab\u8bc6\u522b\u5230\u5bfc\u81f4\u7684\u3002\u5728\u547d\u4ee4\u884c\u6a21\u5f0f\u4e2d\u63d0\u4f9b\u4e86\u81ea\u5b9a\u4e49\u547d\u4ee4\u7684\u529f\u80fd\uff0c\u60a8\u53ea\u9700\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\uff08\u4f8b\u5982 MT_additional_commands.txt\uff09\uff0c\u91cc\u9762\u5b9a\u4e49\u9700\u8981\u7ffb\u8bd1\u7684\u547d\u4ee4\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code># if you need more, just add lines with the same format (don't miss the \",\"!)\r\n# each line is in the format of (command_name, N, (n1, n2, ...)), \r\n# N is the total number of arguments, \r\n# n1, n2, ... are the index of arguments requiring translation (counting from 0)\r\nadditional_commands = [\r\n# latex: \\mycommand1{translation needed}\r\n('mycommand1', 1, (0, )),\r\n# latex: \\mycommand2{translation not needed}{translation needed}\r\n('mycommand2', 2, (1, )),\r\n# latex: \\mycommand3{translation needed}{translation not needed}\r\n('mycommand3', 2, (0, )),\r\n# latex: \\mycommand4{translation needed}{translation not needed}{translation needed}{translation not needed}\r\n('mycommand4', 4, (0, 2)),\r\n# practical example: \\textcolor{red}{Need translation here}\r\n('textcolor', 2, (1, )),\r\n]\r\n<\/code><\/pre>\n<p>\u4e4b\u540e\u52a0\u4e0a\u547d\u4ee4\u884c\u53c2\u6570 -commands MT_additional_commands.txt \u5373\u53ef\u7ffb\u8bd1\u81ea\u5b9a\u4e49\u7684\u547d\u4ee4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MathTranslate \u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u7ffb\u8bd1 LaTeX \u6587\u6863\u7684\u5728\u7ebf\u5de5\u5177\uff0c\u7279\u522b\u9002\u7528\u4e8e\u79d1\u5b66\u8bba\u6587\u7684\u7ffb\u8bd1\u3002\u8be5\u5de5\u5177\u80fd\u591f\u4fdd\u6301 LaTeX \u8868\u8fbe\u5f0f\uff08\u5982\u6570\u5b66\u8868\u8fbe\u5f0f\uff09\u4e0d\u53d8\uff0c\u5e76\u6700\u7ec8\u5c06 LaTeX \u6587\u6863\u7f16\u8bd1\u6210 PDF \u6587\u4ef6\u3002MathTranslate \u63d0\u4f9b\u4e86&#8230;<\/p>\n","protected":false},"author":1,"featured_media":60995,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,217,205],"class_list":["post-6135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aifanyi","tag-lunwen"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/6135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/comments?post=6135"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/6135\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media\/60995"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media?parent=6135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/categories?post=6135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/tags?post=6135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}