TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a thesis with floats at the end of each chapter. endfloat lets me keep the figs/tables near their first callouts while writing so the order is correct, but I don't want to use the poorly-customizable sectioning endfloat provides. I circumvented it to some extent, but now my headers, configured with memoir, are messed up at the Floats and Tables sections.

How can I prevent this from happening?

Here's a MWE showing my problem (headers go bad at page 3):

%%%%%%%%%%%%  FLOATS AND TABLES  %%%%%%%%%%%%

%%%%%%%%%%%%  FORMAT HEADERS  %%%%%%%%%%%%
\createmark{section}{right}{nonumber}{}{. \ }
\createmark{chapter}{left}{shownumber}{Chapter }{: \ }}

%%%%%%%%%%%%  MWE TEXT  %%%%%%%%%%%%

\section{First Intro Section}
\lipsum[1] See~\fref{fig1}.

\caption{Vivamus vehicula dolor laoreet neque imperdiet consequat} \label{fig1}


\section{Second Intro Section}

\caption{Vivamus vehicula dolor laoreet neque imperdiet consequat} \label{fig2}


    Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\
    Morbi in turpis faucibus, sollicitudin sem eu, condimentum nibh. \\
    Quisque pharetra nunc volutpat purus venenatis, ut cursus purus consectetur. \\
    Fusce suscipit massa eu libero blandit, a facilisis risus pharetra. \\
  \caption{ia nostra, per inceptos himenaeos. }


share|improve this question
The example doesn't compile because \end{figure} must start at column 1. – egreg Jun 17 '13 at 19:26
that's odd, it compiles for me. I will edit it so other people can use it without errors. – DocBuckets Jun 17 '13 at 21:25
up vote 5 down vote accepted

The package endfloat issues a \markboth command without any option for disabling it.

You can remove it with the following trick after loading endfloat:


We change \markboth into \@gobbletwo which simply gobbles the two arguments originally for \markboth.

Here's the top of your page 3

enter image description here

share|improve this answer
Awesome. I will have to keep this in mind if there are other packages with problematic commands in them. – DocBuckets Jun 17 '13 at 21:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.