Is there an easy method to compile a LaTeX document ignoring contents of \begin{figure} ... \end{figure} blocks altogether?

I am looking for an equivalent for draft and demo options (as in \documentclass[demo]{article} or \usepackage[draft]{graphics}) that will ignore figure environment completely. Specifically, don't want to see any placeholders nor figure captions, just continuous text.

Is there a way to do the same thing for table environments?

  • 2
    You don't want to keep any space there?
    – Sigur
    Jan 26, 2015 at 11:58
  • Maybe try: \renewenvironment{figure}{}{} Jan 26, 2015 at 12:16
  • @Sigur No, not really. It is for purpose of text editing - I have quite some figures in my paper and it would be a great option to save both on ink and paper.
    – Klara
    Jan 26, 2015 at 12:26
  • @BenjaminMcKay It would have worked if figures had no captions, but it just throws a bunch of errors: Package caption Error: \caption outside float. \caption
    – Klara
    Jan 26, 2015 at 12:28
  • I believe that Memoir has an MSS (or similarly named) option which duplicates a typewritten manuscript --- it may also turn off all graphics (or maybe it moves them all to the end).
    – WillAdams
    Jan 26, 2015 at 12:44

1 Answer 1


You can use endfloat, telling it that it shouldn't process the delayed floats:


%%% Remove the next two lines if you want the figures at their place    

\usepackage{lipsum}% mock text







A table



If you want to also omit tables, remove the figuresonly option.

  • Thanks for this answer, that is exactly the kind of solution I was looking for. I was not not familiar with endfloat package at all.
    – Klara
    Jan 26, 2015 at 13:56
  • This doesn't seem to remove longtabu environment Nov 24, 2017 at 17:50
  • @raffamaiden This excludes figure and table environments, yours is a different problem.
    – egreg
    Nov 24, 2017 at 17:53
  • @egreg how can I remove longtabu and longtable environments? \renewenvironment{longtabu}{}{} does not work. The table is still there but badly formatted Nov 24, 2017 at 17:58
  • @raffamaiden Look at the comment package.
    – egreg
    Nov 24, 2017 at 18:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .