I do not know why \adjustbox seems to scale down an equation, when there is no need to do that, as the equation can fit in the text without scaling.
My understanding is that using \adjustbox{max width=\textwidth} will only make it scale down/resize, if the current size is too large to fit. This is from the manual
So I do not know what Am I doing wrong here. As it is making the equation smaller compared to when not using \adjustbox.
I want \adjustbox to scale the equation only if it is too wide to fit into the textwidth. How to do that?
MWE. ps the actual equations are autogenerated. I just add the adjustbox around them
\documentclass[12pt]{article} \usepackage{amsmath} \usepackage{adjustbox} \usepackage{mleftright} \mleftright \begin{document} \begin{equation*} \adjustbox{max width=\textwidth}{% $y \left(x \right) = \frac{\left(-4 x c_{2}+2 c_{1}\right) \sin \left(2 x \right)-4 \left(c_{1} x +\frac{c_{2}}{2}\right) \cos \left(2 x \right)}{\cos \left(2 x \right) c_{1}+\sin \left(2 x \right) c_{2}}$} \end{equation*} \begin{equation*} \adjustbox{max width=\pagewidth}{% $y \left(x \right) = \frac{\left(-4 x c_{2}+2 c_{1}\right) \sin \left(2 x \right)-4 \left(c_{1} x +\frac{c_{2}}{2}\right) \cos \left(2 x \right)}{\cos \left(2 x \right) c_{1}+\sin \left(2 x \right) c_{2}}$} \end{equation*} \begin{equation*} \adjustbox{max size={\pagewidth}{\pageheight}}{% $y \left(x \right) = \frac{\left(-4 x c_{2}+2 c_{1}\right) \sin \left(2 x \right)-4 \left(c_{1} x +\frac{c_{2}}{2}\right) \cos \left(2 x \right)}{\cos \left(2 x \right) c_{1}+\sin \left(2 x \right) c_{2}}$} \end{equation*} \begin{equation*} y \left(x \right) = \frac{\left(-4 x c_{2}+2 c_{1}\right) \sin \left(2 x \right)-4 \left(c_{1} x +\frac{c_{2}}{2}\right) \cos \left(2 x \right)}{\cos \left(2 x \right) c_{1}+\sin \left(2 x \right) c_{2}} \end{equation*} \end{document} I tried few things above. Here is the output, compiled using lualatex
TL 2020 after OCT update. On Linux.



