I am using chemmacros to write REDOX chemical reactions. I tried using "standalone" to create a file the size of the equation, but it didn't work.
how to solve this problem?
\documentclass[border=2pt]{standalone}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage[dvipsnames]{xcolor}
\usepackage{chemmacros}
\usechemmodule{all}
\begin{document}
\OX{a,Na} $\rightarrow$ \OX{b,Na}\pch
\redox(a,b)[->,red]{ox}
\redox(a,b)[<-,blue][-1]{red}
\end{document}


varwidthinstandaloneoptions helps, i.e.\documentclass[border=2pt,varwidth]{standalone}– Zarko Apr 04 '20 at 15:48