0

This question already has an answer here:

I create a two side document for a book. When I insert a image after some text and frame that not fit on the page, the text between frame and image starts in bottom of the page and created extra vertical space. But if I use for example the command \documentclass{report} this problem solved and the text starts immediately after frame no vertical space. How do I use the command ‎\documentclass[11pt,twoside]{book} does not create a vertical distance? This is the document:

 %‎‎‎\documentclass[11pt]{report}‎‎
‎\documentclass[11pt,twoside]{book} ‎
‎\usepackage[a4paper‎,
‎landscape‎,
‎top=3cm,headsep=10pt‎,
‎textwidth=15cm‎,
‎right=3cm‎,
 ‎outermargin=7cm‎,
    ‎marginparwidth=5cm‎,
       ‎marginparsep=10pt]{geometry} 
‎\usepackage{color}‎‎‎
‎\usepackage[framemethod=TikZ]{mdframed}‎
‎\usepackage{mdframed}‎
‎\usepackage{fancyhdr}‎  

‎\usepackage{graphicx}
‎\usepackage{color}‎
‎\usepackage{tikzpagenodes}                     ‎ ‎‎
‎\newmdenv[skipabove=7pt‎,
‎skipbelow=7pt‎,
‎rightline=false‎,
‎leftline=true‎,
‎topline=false‎,
‎bottomline=true‎,
‎backgroundcolor=black!5‎,
‎linecolor=red‎,
‎innerleftmargin=5pt‎,
‎innerrightmargin=5pt‎,
‎innertopmargin=5pt‎,
‎leftmargin=0cm‎,
‎rightmargin=0cm‎,
‎roundcorner=0mm‎,
‎linewidth=2pt‎,
‎innerbottommargin=5pt]{dbox}‎
\begin{document}‎‎‎
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text 
\begin{dbox}
‏some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text 
‎‏\end{dbox}‎‎‎‎
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text 
‎\begin{center}‎
 \includegraphics[width=0.5\textwidth]{example-image}
   ‎\end{center}‎ 
\end{document}

marked as duplicate by Johannes_B, Mensch, darthbith, barbara beeton, Jesse Dec 14 '15 at 14:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Put \raggedbottom in the preamble. book calss uses \flushbottom by default. – user11232 Apr 8 '15 at 6:23
  • Thank you very much. can generally change the command \flushbottom to \raggedbottom once and for all?As a newenvironment or newcommand? – iman Apr 8 '15 at 6:31
  • 1
    Just put \raggedbottom say, before \begin{document} like \raggedbottom\begin{document} – user11232 Apr 8 '15 at 6:39

Browse other questions tagged or ask your own question.