texbot
v1.0.0
Published
a Slack bot that utilizes QuickLaTeX to translate LaTeX into images
Downloads
8
Readme
Texbot is a Slack bot that generates LaTeX rendered images using the QuickLaTeX site.
Usage
Once invited to a room, texbot listens for the command !tex
. For example, the following command:
!tex \begin{eqnarray}
y &=& x^4 + 4 \nonumber \\
&=& (x^2+2)^2 -4x^2 \nonumber \\
&\le&(x^2+2)^2
\end{eqnarray}
Produces the following render:
Token
In order for texbot to function properly, you must first add a bot to the list of custom configurations. Once you have a bot, you must replace <token>
in bin/texbot.js
with the API Token for that bot.
Please note: Be careful when using GitHub and API Tokens. These are sensitive values that should not be pushed to public repositories. If you plan to use texbot in a repository you should use the fs
npm module and store this token in a file that does not get pushed to the public repository.
Packages
texbot includes the following LaTeX packages by default:
- amsmath
- amsfonts
- amssymb
- graphicx
- mhchem
But you can easily change which packages are included by editing the preamble
inside of bin/texbot.js
. Keep in mind that QuickLaTeX does not support all packages.
Credit for the LaTeX icon goes to kafi2007 on Deviant Art :smile: