Text FormattingVertical spacing inside a minipage

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
jonas
Posts: 2
Joined: Tue Sep 15, 2009 2:21 pm

Vertical spacing inside a minipage

Post by jonas »

Hi

I am a beginner and I would like to use a minipage to put a figure inside and some text above the figure to describe it and because they are both in the minipage, they will always be in the same page, that's what I want. Is using a minipage the correct way to do it?
The problem is that I noticed that inside a minipage the vertical spacing is much smaller than outside it. Is there a way to make the vertical spacing inside a minipage the same as elsewhere in the document.

Here is an example that show the problem below with the pdf in attachement :

Code: Select all

\documentclass[12pt]{article}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\setcounter{secnumdepth}{5}

\begin{document}

\paragraph{First paragraph}


\subparagraph {First sub paragraph }


Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}


\paragraph {Second paragraph }


\subparagraph {Second sub paragraph }


Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}

%
\begin{minipage}[t]{1\columnwidth}%

\paragraph {Third paragraph (inside the minipage)}


\subparagraph {Third sub paragraph (inside the minipage)}


Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}


\paragraph {Fourth paragraph (inside the minipage)}


\subparagraph {Fourth sub paragraph (inside the minipage)}


Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}%
\end{minipage}


\paragraph {Fifth paragraph }


\subparagraph {Fifth sub paragraph }


Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}


\paragraph {Sixth paragraph }


\subparagraph {Sixth sub paragraph }


Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}


\end{document}
Thanks for your help
Jonas
Attachments
example.pdf
(13.88 KiB) Downloaded 579 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Vertical spacing inside a minipage

Post by localghost »

Max out the possible options of the minipage environment. There are some more than you use in your example.


Best regards and welcome to the board
Thorsten
jonas
Posts: 2
Joined: Tue Sep 15, 2009 2:21 pm

Vertical spacing inside a minipage

Post by jonas »

Hi

Thanks for your answer.
My code was made by lyx. I don't use latex but I just want to see where the problem is.
I looked into the link you provided, and saw the options possible for a minipage or a parbox, but I wasn't able to find how to solve my problem.

I can still add several \bigskip{} like in the minipage code below :

Code: Select all

\begin{minipage}[c]{\columnwidth}%

\paragraph {Third paragraph (inside the minipage)}
\bigskip{}\bigskip{}
\subparagraph {Third sub paragraph (inside the minipage)}
\bigskip{}\bigskip{}
Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}
\bigskip{}\bigskip{}
\paragraph {Fourth paragraph (inside the minipage)}

\subparagraph {Fourth sub paragraph (inside the minipage)}

\bigskip{}\bigskip{}
Blablabla blablabla blablabla blablabla blablabla blablabla see the picture below :

{[}The picture{]}%
\end{minipage}
But it seems to me that's the kind of thing we could do if we were using a WYSIWYG program, but which is ugly to do in latex.

Bye
Jonas
Post Reply