LaTeX forum ⇒ Graphics, Figures & Tables\tableofcontents & \listoffigures: Remove blank pages 2 & 6 Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Michael_590
Posts: 51
Joined: Wed Aug 06, 2014 6:59 pm

\tableofcontents & \listoffigures: Remove blank pages 2 & 6

Postby Michael_590 » Fri Aug 22, 2014 9:49 pm

With \tableofcontents and \listoffigures, I get two blank pages (2 and 6). Can you post an example of how to get rid of the two blank pages.

There are other blank pages in the document, but I can live with them.

  1. \documentclass{book}
  2. \usepackage{caption}
  3. \usepackage{graphicx}
  4. \begin{document}
  5.  
  6. \chapter{One}
  7. \tableofcontents
  8.  
  9. \chapter{Two}
  10. \listoffigures
  11.  
  12. \bigbreak
  13.  
  14. \chapter{Three}
  15.  
  16. This is the third chapter in the story.
  17.  
  18. \begin{minipage}{\linewidth}
  19. \begin{center}
  20. \includegraphics[width=\textwidth]{example-image}
  21. \captionof{figure}{this is my caption}
  22. \end{center}
  23. \end{minipage}
  24.  
  25.  
  26. \chapter{Four}
  27.  
  28. This is the fourth chapter in the story.
  29.  
  30. \begin{minipage}{\linewidth}
  31. \begin{center}
  32. \includegraphics[width=\textwidth]{example-image}
  33. \captionof{figure}{this is my caption}
  34. \end{center}
  35. \end{minipage}
  36.  
  37.  
  38. \chapter{Five}
  39.  
  40. This is the fifth chapter in the story.
  41.  
  42. \begin{minipage}{\linewidth}
  43. \begin{center}
  44. \includegraphics[width=\textwidth]{example-image}
  45. \captionof{figure}{this is my caption}
  46. \end{center}
  47. \end{minipage}
  48.  
  49. \end{document}


Thank you,
Last edited by Michael_590 on Mon Aug 25, 2014 4:16 pm, edited 2 times in total.

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3854
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Aug 22, 2014 10:08 pm

I didn't test your example, but the book class starts ne chapter on a right (odd) page. KOMA-classes provide an option to start a chapter on left (even) pages. My battery is low right now, but i'll make a test run tomorrow.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Johannes_B
Site Moderator
Posts: 3854
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Aug 23, 2014 7:53 pm

I am not quite sure what you are trying to achieve. Do you want the tableofcontents and the listoffigures numbered? This is quite unusual. Both commands start a new (unnumbered) chapter of their own.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Sun Aug 24, 2014 12:35 pm

You get empty pages because you have empty chapters. As Johannes says the commands \tableofcontents and \listoffigures both implicitly call \chapter*. This means that the piece of code
  1. \chapter{One}
  2. \tableofcontents
  3.  
  4. \chapter{Two}
  5. \listoffigures


is some how equivalent to
  1. \chapter{One}
  2. \chapter*{Contents}
  3. Table of contents stuff ...
  4.  
  5. \chapter{Two}
  6. \chapter*{List of Figures}
  7. List of figures stuff...


This lets me suspect that you're not telling what it actually is you're trying to achieve. As Johannes I suspect you want to have numbered headings for the table of contents and the list of figures?

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Michael_590
Posts: 51
Joined: Wed Aug 06, 2014 6:59 pm

Postby Michael_590 » Mon Aug 25, 2014 4:14 pm

Hello,

I have attempted a rewrite of my example to try and demonstrate what I am trying to do. Please excuse any misrepresentations that I may have in the original example above!

The below example produces a blank page on pages: 2, 4, and 6, take a look.

My question is how can I remove these three blank pages.

I.E.: I would like a new document which is exactly same document as this one without blank pages 2, 4, and 6. I want a document that will still have pages numbered from 1, ..., N, but ONLY without these blank pages.

Thanks in advance,

P.S.: The poem is by Norman Wilson
Reference: http://www.poetry.com/users/189919

  1. \documentclass{book}
  2. \usepackage{caption}
  3. \usepackage{graphicx}
  4. \begin{document}
  5.  
  6.  
  7. \begin{titlepage}
  8. \LARGE{Ballad of Yore}
  9. \end{titlepage}
  10. \tableofcontents
  11. \listoffigures
  12.  
  13. \chapter{One}
  14. When chaos once ruled in the days of yore,
  15. The country was magically entwined in civil war.
  16. When, the honour of knights protected the land.
  17. The Queen’s own knights made their final stand.
  18.  
  19. \chapter{Two}
  20.  
  21. In castle surroundings, clustered in silky green heather.
  22. Growing on the hillside where nature blends, together.
  23. While a lady of elegance sits by a clear streaming brook.
  24. Her kingdom threatened by mystical beasts and crooks.
  25.  
  26.  
  27. \chapter{Three}
  28. The champion of her kingdom in a strong will to fight,
  29. He brought forth her army and the last of her loyal knights.
  30. His love for his Queen was more than duty of one man.
  31. He would sit by her side and bring harmony back to the land.
  32.  
  33. \begin{minipage}{\linewidth}
  34. \begin{center}
  35. \includegraphics[width=3cm]{example-image}
  36. \captionof{figure}{Caption for the 3rd chapter}
  37. \end{center}
  38. \end{minipage}
  39.  
  40.  
  41. \chapter{Four}
  42. He rode a white steed in the early morning light.
  43. Dressed in full battle gear, glittering too sight.
  44. Now harden to the misery of wails in air.
  45. Our brave knight readies to war’s affair.
  46.  
  47. \begin{minipage}{\linewidth}
  48. \begin{center}
  49. \includegraphics[width=4cm]{example-image}
  50. \captionof{figure}{Caption for the 4th chapter}
  51. \end{center}
  52. \end{minipage}
  53.  
  54.  
  55. \chapter{Five}
  56. He speaks aloud to his brave comrades in arms.
  57. We must protect the Queen from an evil harm.
  58. Bare all you have and all you shall give.
  59. We fight for the Queen, for our kingdom must live.
  60.  
  61. \begin{minipage}{\linewidth}
  62. \begin{center}
  63. \includegraphics[width=5cm]{example-image}
  64. \captionof{figure}{Caption for the 5th chapter.}
  65. \end{center}
  66. \end{minipage}
  67.  
  68. \chapter{Six}
  69. The sound of his voice resonated in the emerald forest to the bending of trees.
  70. As he spoke so passionately, he gave ears to the wind to let all men see.
  71. \chapter{Seven}
  72.  
  73. Come ride upon the winds with me.
  74. I see you so, for it must be.
  75. Good souls cease for a while.
  76. Do not sway from cunning and guile.
  77. \chapter{Eight}
  78. As the minds of his men now, stir in anticipation of his needed words.
  79. Not a pine needle dropped or chirping birds stirred to his words heard.
  80. \chapter{Nine}
  81. Do you have so little faith in me?
  82. Men of such stature, I know to be.
  83. Quicken with haste and heed my prose.
  84. Now rally you of brave hearts, against our foes.
  85. \chapter{Ten}
  86. The knight paused with thoughts of life without death.
  87. Just to have one more kiss from the Queen’s sweet breath.
  88. \chapter{Eleven}
  89. A war not of our chosen, a war not sought.
  90. For the sake of our Queen, battles shall be fought.
  91. We shall raise our banners majestically amid sky.
  92. Above all noble heads held high.
  93. \chapter{Twelve}
  94. Rising to their feet, filled with venom of strengthened men.
  95. Beneath a rising sun, that sets in a day gone old in life’s end.
  96. \chapter{Thirteen}
  97. To the foul cries of those stretched on the fields.
  98. I say no, to them who may yield.
  99. Together we shall burn the hearts of man in fire.
  100. At days light, we shall camp within the enemies’ shire.
  101. \chapter{Fourteen}
  102. To the clasping of shields, spears and swords the howling warriors begin.
  103. To mesmeric words that dance upon the flames of hearted men with no sin.
  104.  
  105. \chapter{Fifteen}
  106. For the Queen’s affections, we shall remove the blight.
  107. We shall be victorious by end of a coming night.
  108. Quell their angst with blade, I say.
  109. For her, we shall win this day.
  110. \chapter{Sixteen}
  111. As now, memories pass amongst men of steal.
  112. For the one’s they left in the flowering of fields.
  113. As men’s hearts, bleed the war of death or life.
  114. While lost souls roam, fraught in war and strife.
  115. \chapter{Seventeen}
  116. Valiant is the heart of men of war.
  117. We bow to no man’s brazen lore.
  118. Follow with me and seal their fate.
  119. For their verdict is there death on this date.
  120. \chapter{Eighteen}
  121. A promise of victory flows within the breath of wind that binds the air.
  122. For the knight’s love is but one battle of will away from the beast lair.
  123. \chapter{nineteen}
  124. Do not frighten from threats of their bloodletting hand.
  125. We shall bury them, deep within their own lands.
  126. In the wake of new night, blood lust will bleed in streams.
  127. For our Queen shall reign once more supreme.
  128. We now ride upon the evil hordes.
  129. In the slashing and crashing, pounding steal on sword.
  130. \end{document}

Michael_590
Posts: 51
Joined: Wed Aug 06, 2014 6:59 pm

Postby Michael_590 » Mon Aug 25, 2014 5:47 pm

I fixed the problem by setting the documentclass to "oneside."

Thanks everyone,


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 13 guests