1

I am currently writing my thesis and it has a 200 page limit without figures and tables.

Is there some way I can turn off tables and figures from being output, so I can check my page count, but without removing them from the code?

Please find here the style file I am using:

https://www.maths.ox.ac.uk/members/it/faqs/latex/thesis-class

Mico
  • 506,678
Freeman
  • 337
  • 1
    You could use the endfloat package to print all figure and table environments on separate pages at the end of your document. Related: How can I remove the figures from a draft of my document? – leandriis Jun 22 '18 at 10:32
  • If you use the graphicx package you can set the draft flag. \usepackage[draft]{graphicx} – sporc Jun 22 '18 at 10:46
  • Just load the comment package and add the instructions \excludecomment{figure}, \excludecomment{table}, \let\endfigure\relax, and \let\endtable\relax in the preamble. – Mico Jun 22 '18 at 10:50
  • @Mico ah thanks! That looks great! Thanks for the help. – Freeman Jun 22 '18 at 10:52
  • @Mico: I'm doing as you suggest, but I'm getting a compile error! Is there an alternative method I could try? – Freeman Jun 22 '18 at 10:56
  • @Freeman - One more thing: The comment package does its thing by scanning for the strings \end{figure} and \end{table} (and all other excluded environments) at the start of a line. Hence, if one had the following input all on one line -- \begin{figure}[h!] FIGURE \end{figure} -- comment can't get its job done. Just a heads-up... – Mico Jun 22 '18 at 10:58
  • @Freeman - Please provide more information about the compiliation error(s) you say you're getting. – Mico Jun 22 '18 at 10:59
  • @Freeman - An excerpt from the user guide of the comment package: "The opening and closing commands [e.g., \begin{figure} and \end{table}] should appear on a line of their own. No starting spaces, nothing after it." – Mico Jun 22 '18 at 11:04
  • @Mico: Ah, all my figures start \begin{figure}[H], perhaps this is the cause of the error? This is the error, I have little idea what it means: https://pastebin.com/tyPL5GTq – Freeman Jun 22 '18 at 11:24
  • @Mico: Ah! I commented out everything in the file it mentioned and it worked! This is what is causing the problem - what on earth is the problem here? https://pastebin.com/qBYn4MXn – Freeman Jun 22 '18 at 11:29
  • @Mico: Fixed it! Removed the "\textbf{}" at the end of the file. Thanks SO much for your help, I could haven't done that without your patient explanations. Many thanks. – Freeman Jun 22 '18 at 11:32
  • 1
    @Freeman - The mysterious \textbf{} directives immediately after each \end{figure/table} definitely look like excellent candidates for removal... – Mico Jun 22 '18 at 11:47
  • 1
    @Freeman - If you're using the [H] placement specifier habitually, you're not using the LaTeX float mechanism properly; in fact, you're not using it at all. Do try to wean yourself off that habit, ì.e., use [H] only exceptionally. – Mico Jun 22 '18 at 11:53

0 Answers0