I get the Extra \fi error for the \end{equation} line in the following code.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{savetrees}
\usepackage{amsmath}
\begin{document}
\begin{equation}
2+2=4
\end{equation}
\end{document}
Why is that? How do I fix it?
The filelist:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
inputenc.sty 2008/03/30 v1.1d Input encoding file
utf8.def 2008/04/05 v1.1m UTF-8 support for inputenc
t1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
ot1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
omsenc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
savetrees.sty 2011/05/14 v2.0 Pack as much text as possible onto each page
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
titlesec.sty 2011/12/15 v2.10.0 Sectioning titles
geometry.sty 2010/09/12 v5.6 Page Geometry
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
microtype.sty 2010/01/10 v2.4 Micro-typography with pdfTeX (RS)
microtype.cfg 2010/01/10 v2.4 microtype main configuration file (RS)
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
mt-cmr.cfg 2009/11/09 v2.0 microtype config. file: Computer Modern Roman (RS)
\[and\], but don't know what the problem is withequationenvironment. – Peter Grill Mar 22 at 4:49inputencpackage does not seem to cause the problem. No error occurs if theequationenvironment is replaced by\[ 2+2=4 \]. There must be a package clash betweenamsmathandsavetrees. Sinceamsmathis so useful, I advise you to forget aboutsavetreesfor the time being (until the issue gets fixed). – Jubobs Mar 22 at 4:51\listfilesto the start of your input, and edit into the question the*File List*that appears in the log. For me with an up-to-date TeX Live 2012 there seems to be no issue. – Joseph Wright♦ Mar 22 at 8:19alignenvironment is used instead ofequation. – g.kov Mar 22 at 9:51