We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
有些时候我们想在自己的文章中插入一些数学公式, 比如
我们唯一需要知道的就是怎么用TeX语法来写数学公式.
准备你要写的数学公式
f(x)=x^2
获取resource location
$ curl -X POST \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept: application/json' \ --data-urlencode 'q=f(x)=x^2' \ -i -s https://wikimedia.org/api/rest_v1/media/math/check/tex \ | grep x-resource-location | awk '{print $2}' 611e35cb6f8d4fd5ce4b43c16363a9f5b7e65464
获取link
![f(x)=x^2](https://wikimedia.org/api/rest_v1/media/math/render/svg/611e35cb6f8d4fd5ce4b43c16363a9f5b7e65464)
我们可以写下面这个脚本来一步实现.
#! /bin/bash res=$(curl -X POST \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Accept: application/json' \ --data-urlencode "q=$1" \ -i -s \ https://wikimedia.org/api/rest_v1/media/math/check/tex | grep x-resource-location | awk '{print $2}') echo "https://wikimedia.org/api/rest_v1/media/math/render/svg/${res}"
The text was updated successfully, but these errors were encountered:
真6!然而放在wikipedia不会被删吧?
Sorry, something went wrong.
@SmilingSun 应该不会的, 毕竟wikipedia也是这么用的..
No branches or pull requests
目的
有些时候我们想在自己的文章中插入一些数学公式, 比如
前提
我们唯一需要知道的就是怎么用TeX语法来写数学公式.
操作
准备你要写的数学公式
获取resource location
获取link
总结
我们可以写下面这个脚本来一步实现.
参考
The text was updated successfully, but these errors were encountered: