TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 have additional space inside a text [see picture] between paraghraps. Beside of that it is diffrent size [this space]. What's more before Section, and after section title there is additonal space also. Also with diffrent size in diffrent section title. enter image description here enter image description here enter image description here How to fix it?

    \usepackage[left=4.65cm, right=4.65cm, top=4cm, bottom=4.25cm]{geometry}

    % chapter tiltes formatting
      {\scshape\normalsize\bfseries}{\MySecSquare\ \thesection.}{0.15em}{#1}

       {\normalfont\scshape\normalsize\bfseries}{\MySecSquare\ \thesubsection.} {0.10em}{#1}

      % formatting for chapter entries in ToC  
      {\small\bfseries{\hspace*{-2.63em}{\chaptername}\hspace*  {5pt}\contentslabel{0.25em}\hspace*{1.25em}}}

      % formatting for section entries in ToC  
      {\hspace*{2.75em} }%\hspace*{-2.3em}


      \leavevmode\hbox to 1.2ex{\hss\vrule height .9ex width .7ex depth -.2ex\hss}}

      \leavevmode\hbox to 1.2ex{\hss\vrule height 1.3ex width 1.1ex depth -.2ex\hss}}


      \newcommand\MyTitle{Some title}


       \renewcommand\chaptermark[1]{\markboth{\thechapter.\ #1}{}} 
        pdfauthor = {Pdfautor},
        pdftitle = {My title},





        \chapter*{Na wstępie}\label{chap:one}
        \addcontentsline{toc}{chapter}{\bfseries{Na wstępie}\vspace*{2em}}

        \section{Section One}
        \section{Section two}
        \section{Section 3}
        \section{Section 4}
        \section{Section 5}
        \section{Section 6}
        \section{Section 7}
        \chapter{Second chapter}
        \chapter{Last chapter}
share|improve this question
Your given code has none of the marked problems on my system (actual MiKTeX). BTW: package lipsum makes the MWE smaller. BTW2: use a break in your editor after 72 characters per line. You will get better error messages and warnings where the error or warning occurs. Do you have more in your code that is not included in the MWE? – Kurt Sep 2 '12 at 1:01
So You have a tight tex. No space between text? Impossible. I do not want even a milimiter of space where red lines are. It has to be squzed. BTW: As I wrote: I have problems with it. There are many white space, which I can not control. – Daniel Miliński Sep 2 '12 at 2:19
Do you use \flushbottom in your code? That could be a reason for different space between paragraphs or headings and paragraphs. Does your document change with \raggedbottom? – Kurt Sep 2 '12 at 2:32
up vote 4 down vote accepted

This question was probably answered in the question Making sure that text is aligned between bottoms (and tops) of pages.

Try add the the options paper=a4paper,twoside=true,textheight=45\baselineskip+\topskip

to the geometry-options in your document. You also have to use the package calc

            left=4.65cm, right=4.65cm, top=4cm, bottom=4.25cm

In your MWE (but perhaps in the real document), this does not solve the spacing issue because you have to little text after section 0.2, and then two subsections without any text in between. LaTeX does not find a good place to break the page. If you use a real text, or use\lipsum[2-3] after section 0.2, the spaces also disappear. You can also use the command




to add or subtract some lines on the the offending page.

The problem comes from the fact that the book-class use flushbottom as default, and therefore stretch the text between the top and bottom margin. If you add the option raggedbottom to the class option, the problem disappears, permanently.

The moral is: If you want the text flushed between the top and bottom margin, you have to carefully go through the document when you have finished all editing. In that last touch up, you can make subtle changes that correct this type of typesetting errors. But you will no be able to handle all such issued automatically.

share|improve this answer

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.