• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

vdrhtc/InLaTeXbot: Customizable LaTeX bot for Telegram messenger

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

vdrhtc/InLaTeXbot

开源软件地址(OpenSource Url):

https://github.com/vdrhtc/InLaTeXbot

开源编程语言(OpenSource Language):

Python 90.3%

开源软件介绍(OpenSource Introduction):

Inline LaTeX bot for Telegram messenger to send pictures with any LaTeX content to anyone from any device. Find it here: http://t.me/InLaTeXbot.

Description and general usage

This bot converts LaTeX expressions to .png images when called in inline mode (@inlatexbot <your expression>) and then shows you the image it has generated from your code. Everything happens live, so you can just gradually type and continuously monitor the result. When expression contains errors, they will be displayed instead of the image. Finally, when you are ready, click or tap the suggested picture to send it.

Since v2.0 the bot also supports direct conversion of LaTeX expressions in a conversation. You can send it messages containing the code, and it will respond with a .pdf file and an image containing the expression. This allows larger (than in the inline mode) expressions to be converted; moreover, .pdf file contains graphics in vector format, so further processing of the expression in a VG application, i.e. in Inkscape, is possible.

Customization

The main feature of the bot is the customizable preamble used in the document into which your expression will be inserted:

\documentclass{article}
\usepackage[T1]{fontenc}
...
%You can modify everything above this comment
\begin{document}
<your expression goes here>
\end{document}

This means you can inlude the packages that you need or define your own expressions and commands which will be afterwards available in the inline mode. The bot uses full installation of Texlive2016, so any of its packages should be within the bot's reach.

Additionally, it is possible to change how the messages will look like after they've been sent, i.e. include the raw expression in the caption of the image or not, or set the resolution of the picture to control its size.

The customization applies both to the inline and standard modes.

Limitations

The expression length is limited by the length of the inline query to approximately 250 characters (despite the statement in the API docs that inline queries can span up to 512 characters)

The preamble length is currently limited by 4000 characters as the longest messages that Telegram can send in one piece are of 4096 chars.

Bot should be currently online, so in case it's down it's either maintenance or some emergency. Also, feel free to open an issue if you find a bug or contact me directly in Telegram should you have any related questions.

Support the project

https://www.donationalerts.com/r/glebfedorov




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap