I would like a way of producing high quality images optimised for sharing on Twitter. These images would likely contain a mixture of equations, text, tables, etc.
Ideally the output produced after compiling would:
- Produce an image in .png format;
- Be transparent (that is, have no background);
- Have a fixed width of 1024 pixels, and a maximum height of 1024;
- Contain reasonable margins, so the maths/text isn't right on the border.
Keeping in mind, Twitter shrinks images down to a width of 506 pixels when displayed in the timeline. If possible I would like to avoid using the command line.
So far what I have is:
\documentclass[preview]{standalone}
\usepackage{amsmath}
\usepackage{geometry}
\geometry{
paperwidth=506px,
paperheight=253px,
margin=0cm
}
\begin{document}
A \emph{group representation} is a group homomorphism
\[
\rho \colon G \longrightarrow GL(V)
\]
from the group $G$ to the general linear group $GL(V)$.
\end{document}
Best Answer
standalone
works OK if you read the documentation.You can then use
standalone
's conversion facilities to convert the pages on-the-fly to the format of your choice. The conversion may use either ImageMagick'sconvert
utility orghostscript
. See the manual for details of how to configure this throughstandalone
.The chances are good that
or
will do what you want, but you can fine-tune the process if required.
Here's the result I get with
png
: