I'm having a lot of trouble using resizebox with equations in Latex for certain templates. I have the following code:
\documentclass[%
aip,%
jmp,%
% cp,%
amsmath,amssymb,%
%preprint,%
reprint,%
groupedaddress,
%author-year,%
%author-numerical,%
]{revtex4-1}
\begin{document}
\begin{equation} \label{eq:Field_x}
\resizebox{.9\hsize}{!}{$\hat{x} =0$} \\
\end{equation}
\end{document}
Using a IEEE format file and the most recent version of Latex, it works perfectly fine. However if I want to compile it to AIP publishing standards which uses REVTEX 4.1, I get the following errors:
! LaTeX Error: There's no line here to end.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \resizebox{.9\hsize}{!}{$\hat{x} =0$} \\
! Missing $ inserted.<inserted text>$ \resizebox{.9\hsize}{!}{$\hat{x} =0$} \\
! Display math should end with $$.<to be read again>\par \resizebox{.9\hsize}{!}{$\hat{x} =0$} \\
I've tried so much and I can't seem to figure out what's wrong. Why would it compile fine using the standard compiler, but not ok using REVTEX4.1? Does anyone have any ideas for what I'm doing wrong and/or if there is a workaround?
\\in yourequation. Why is it there in the first place? – Werner Oct 16 '16 at 04:40