Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow for setting the background #10

Open
panbroggi opened this issue Jan 21, 2022 · 1 comment
Open

Allow for setting the background #10

panbroggi opened this issue Jan 21, 2022 · 1 comment

Comments

@panbroggi
Copy link

It would be a great addition to have the possibility of adding a background to produced images.
When inserting formulas into emails, the fully transparent background makes it impossible to read formulas with dark mode enabled.

Since the output is a png image, a good choice could be to have a 50% opacity background that makes the resulting image readable even in dark mode, maybe setting a dark grey font color. Readability example here

Thank you for this neat and useful add-on!

@panbroggi
Copy link
Author

To add some info, I can generate a png with the desired background using
convert -density 300 file.pdf -background "rgba(255,255,255,0.5)" -flatten -colorspace RGB file.png
where file.pdf is the compiled version of

%% file.tex
\documentclass{standalone}
\begin{document}
$\displaystyle
\frac{d}{dt} e^x = e^x
$
\end{document}

giving the following output
file

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant