# Figures generate improper text spacing/breaking with IEEEtran and latexrelease package after MiKTeX update

After updating MiKTeX on 23-April-2015, compilation of my TeX files that use the fixltx2e.sty package was broken. According to the LaTeX News Issue 22 article, the fixltx2e package has become obsolete and the functionality has been integrated into the LaTeX kernel. To fix my compilation problems I followed the suggestions in the LaTeX News Issue 22 article by including \RequirePackage[2015/01/01]{latexrelease} before \documentclass. However, this seems to introduce text spacing/breaking problems with IEEEtran.cls document class when the TeX file has figures in it.

Here is a MWE. The problem occurs for both one column and two column documents with conference or journal class options. I am including only the example for a two column journal, because the problem appears for a shorter document.

\RequirePackage[2015/01/01]{latexrelease}    % Comment this for old MiKTeX
%\RequirePackage{fixltx2e}                   % Uncomment this for old MiKTeX
\documentclass[10pt,final,twocolumn]{IEEEtran}

\RequirePackage[demo,final]{graphicx}
\RequirePackage[cmex10]{amsmath}
\interdisplaylinepenalty=2500
\RequirePackage{amsthm}
\RequirePackage{algorithm}
\RequirePackage[english]{babel}             % Without this new MiKTeX throws -- Package babel Error: Unknown language english'. Comment out for old MiKTeX
\RequirePackage{blindtext}

\newtheorem{remark}{Remark}
\newtheorem{theorem}{Theorem}

\begin{document}
\title{ABC DEF}
\author{\IEEEauthorblockN{Author~1, Author~2 and Author~3}\\
\IEEEauthorblockA{Dept. of XYZ, University of UVW\\
Email: \{author1,author2,author3\}@uvw.edu}}
\maketitle

\begin{abstract}
\blindtext
\end{abstract}

\section{Introduction}
\label{sec:intro}
\Blindtext[7]

\section{System Model}
\label{sec:system-model}
\blindtext
$$asd = fgh$$
\blindtext

\blindtext
$$asd = fgh$$
\blindtext

\section{Problem Description}
\label{sec:prob-descrip}
\blindtext
$$asd = fgh$$
\blindtext

\begin{figure}
\centering
\includegraphics[width=0.9\linewidth,height=0.7\linewidth]{}
\caption{random text random text\textsubscript{random}, $ghi$, random text. Here $abc$ and $def$.}
\label{fig:cspectrum}
\end{figure}

Random text
$$abc = def = ghi$$
$$\begin{split} abc & = def \\ & = ghi \end{split}$$
\blindtext

\section{Algorithm}
\blindtext
\begin{figure}
\begin{algorithm}[H]
\caption{random caption}
\textbf{Input:}
\blindenumerate
\textbf{Output:} random text\\
\textbf{Steps:}
\begin{enumerate}
\item   random text
\item   random text
\blindenumerate
\item   random text
\end{enumerate}
\label{alg:random-ALG}
\end{algorithm}
\end{figure}

\begin{remark}
\blindtext
$$abc \geq def \geq ghi$$
\end{remark}

\begin{theorem}
\label{thm:random}
random text
\begin{align}
abc & = def \\
ghi & = jkl
\end{align}
\end{theorem}

\begin{IEEEproof}
\blindtext
\end{IEEEproof}

\section{Conclusions}
\label{sec:conclusion}
\blindtext
\end{document}


The first line of my log file reads:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2015.2.11)

The second page of the document produced by compiling the above example looks like For this short example, moving the figure around in the TeX file might solve the spacing issues (purely a matter of luck). But for larger documents with many figures, this becomes a serious problem.

I have verified that the problem did not occur before the MiKTeX update, i.e. when the fixltx2e.sty package was required for patching the LaTeX kernel. Compiling the file under old MiKTeX with the changes suggested in the MWE comments give the correct text spacing/breaking with the second page looking like For old MiKTeX, the first line of my log file reads

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2013.8.10)

Is there a good way to fix this issue without too much tinkering in the preamble of the example file?

Note: A related problem was discussed in Figures and Tables 'push down' text in the right column in this forum about the interplay of IEEEtran.cls document class and fixltx2e.sty package, with the claim that certain versions of IEEEtran.cls are not compatible with fixltx2e.sty. But this was a while ago and both IEEEtran and fixltx2e have undergone major changes since then, so not sure if that post is still relevant.

• looks ok for me. But your format seems to be to old (2015.2.11), miktex updated the latex kernel only some days ago. Recreate the formats in miktex-settings. – Ulrike Fischer Apr 29 '15 at 9:44
• You should not need (and probably should not add) \RequirePackage[2015/01/01]{latexrelease}  to your documents, it will make no difference to documents using the 2015 format, but it will force any future formats to run in 2015 compatibility mode. So for most people, most of the time they will want an updated version with any bug fixes – David Carlisle Apr 29 '15 at 10:51
• The output looks correct to me using a current texlive 2015 – David Carlisle Apr 29 '15 at 10:53
• @Ulrike Fischer ... Recreating the formats did correct the spacing problems in the MWE. But I still face the same issues for a larger document I am trying to compile (working on a better MWE). Also, I don't see any available updates on running the update wizard in MiKTeX. – codemasters Apr 29 '15 at 10:55
• @DavidCarlisle ... I didn't try compiling with TeXLive 2015. With MiKTeX on my system, MWE fails to compile on commenting out \RequirePackage[2015/01/01]{latexrelease}. Error reported on command \textsubscript{}` as undefined control sequence. – codemasters Apr 29 '15 at 10:59