vdrhtc / InLaTeXbot

Customizable LaTeX bot for Telegram messenger
http://t.me/InLaTeXbot
GNU General Public License v3.0
211 stars 11 forks source link

Let the user choose which colors to use #12

Open ghost opened 4 years ago

ghost commented 4 years ago

Having only a pure white background, and a black text, is very bad. I like to write long expressions, with several lines (and usually more than one image). Having to look at those whitish things for sometime is really eye tiring.

If this cannot be done in pure LaTeX source, let it be in a command before the LaTeX source is sent to the robot.

vdrhtc commented 4 years ago

I'll look into that!

ghost commented 4 years ago

Great! (:

After i opened this, I tried to find what could be done in LaTeX. I found https://en.wikibooks.org/wiki/LaTeX/Colors . With colors and xcolor packages, we can do a few tricks with fonts and background for what is written, but this do not let us to change the paper color, just the font color and, at most the background. I found this:

https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX

Which give us the example:

\pagecolor{black} \color{white}

And comments that: "The command \pagecolor{black} set the page colour to black. This is a switch command, meaning it will take effect in the entire document unless another switch command is used to revert it. \nopagecolor will change the background back to normal. "

I tried \pagecolor{black} in the robot, but it gives "Undefined control sequence" with it.

vdrhtc commented 4 years ago

@duritia Actually, your all-latex solution works to some extent. You have made only one mistake -- you did not use the custom preamble functionality of the bot: изображение with the \usepackage{xcolor} command

Unfortunately, it seems that the current version of the bot can't deal with black background when cropping the page, though. I think I'll have to finally change the algorithm to use the standalone document class...