The redefinitions of \begin and \end introduce spurious white space
due to missing % at ends of lines, this can prevent figures fitting on
a line and have other bad effects.
Lines 571 and 577 each miss a %
\SaveBegEnd{#1}
}
\def\end#1{%
% execute code before \end{environment}
\IfUnDef{BeforeEnd#1}\else\csname BeforeEnd#1\endcsname\fi%
% close this environment
\EndEnvironment{#1}
\SaveBegEnd{#1}%<<<<<<<<<<<<<<<
}
\def\end#1{%
% execute code before \end{environment}
\IfUnDef{BeforeEnd#1}\else\csname BeforeEnd#1\endcsname\fi%
% close this environment
\EndEnvironment{#1}%<<<<<<<<<<<<<<<<<<<
Note that in current latex you should not need to redefine \begin and
\end you can insert code at these points using the environment hooks
see texdoc lthooks
As a test file these two minipage should be side by side but come one above the other as the spurious space forces the line to be too wide and introduces a breakpoint
\documentclass[]{aastex631}
\begin{document}
Some text here
\begin{figure}[ht]
\centering
\begin{minipage}[b]{.5\linewidth}
x\dotfill x
\end{minipage}\hfill
\begin{minipage}[b]{.5\linewidth}
x\dotfill x
\end{minipage}
\end{figure}
\end{document}
This was already reported by email to the address in teh file but I just saw this github so reporting in public here.
As noted at
https://tex.stackexchange.com/a/614364/1090
The redefinitions of \begin and \end introduce spurious white space due to missing % at ends of lines, this can prevent figures fitting on a line and have other bad effects.
Lines 571 and 577 each miss a %
Note that in current latex you should not need to redefine \begin and \end you can insert code at these points using the environment hooks see texdoc lthooks
As a test file these two minipage should be side by side but come one above the other as the spurious space forces the line to be too wide and introduces a breakpoint