# Exercise disappears after adding equation (exercise package)

I'm having a weird problem with the following document:

The preamble consist of

    \documentclass[11pt, letterpaper]{amsart}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{fullpage}
\usepackage{exercise}
\usepackage{enumitem}
\usepackage{mathrsfs}
\usepackage{xstring}
\usepackage{ifthen}
\usepackage{tikz-cd}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[style=alphabetic]{biblatex}
\usepackage{xcolor}
\usepackage{gauss}
\usepackage{bbm}
\usepackage{pdfsync}

\setlist[enumerate]{label=(\roman*)}
\setlength{\parindent}{0pt}

\newcommand{\set}{\ifthenelse{\equal{#2}{}}{\{ #1 \}}{\{ #1 \text{ } | \text{ } #2 \}}}

\title{Exam in Integration Theory \\ 2020-01-14}
\author{Jonathan Lindell}


Then I have

    \begin{document}
... some other exercises to get to this one.
\begin{Exercise}
Suppose that $$\set{a_n}{}$$ is a sequence of non-negative numbers and $$\set{E_n}{}$$ a sequence of Lebesgue measurable subsets of $$[0,1]$$. Supppose there exists $$\delta > 0$$ such that $$m(E_n) \geq \delta$$ and
\begin{align*}
\sum_{n}a_n\chi_{E_n}(x) < \infty
\end{align*}
for Lebesgue a.e. $$x$$. Prove that
\begin{align*}
\sum_{n} a_n < \infty
\end{align*}
\end{Exercise}
\end{document}


When I compile this, the whole exercise disappers. If I remove the last align the document compiles as normal.  I am using emacs to write the tex code in auctex. I have tried to compile it directly in the terminal using pdflatex, though no difference. If I compile just the code I have posted I get the same problem.

• Welcome to TEX.SE! As it stands there is no way of telling what is going wrong. Please provide a full minimal working example starting with \documentclass{...} and ending with \end{document}. – campa Jan 14 at 14:32
• Okay, I tried to add a minimal working example now. Hopefully it is enough. Thank you for your help! :) – user204878 Jan 14 at 15:23
• Drop the pdfsync package (since we got synctex build into the engine, this package have been irrelevant). BTW 1: make your MWE into a single piece of code not two sniplets. BTW 2: you are loading a lot of packages that are irrelevant for showing the issue. BTW 3: you might want to have a look at the \Set example in the mathtools manual, it provides a (IMO) better syntax for sets than a two arg macro. – daleif Jan 14 at 15:33
• Thank you very much for all your help :) it works if I just drop pdfsync. Thank you for all tips in general – user204878 Jan 14 at 15:38
• Some general comments about your code: (a) You appear to have considerable fondness for using align* environments. You should not use them to create single-line unnumbered displaymath environments; use $...$ instead. See the posting What are the differences between , \[, align, equation and displaymath? for more information on this topic. (b) The hyperref package should be loaded last. (c) The amsfonts package is loaded automatically by the amssymb package; hence, no need to load amsfonts explicitly. – Mico Jan 14 at 15:52

The issue goes away if you drop the pdfsync package. I have no idea what the problem is, but pdfsync have not been relevant for a very long time by now.