{minipage} is an environment providing a paragraph box which is a complete mini version of a page.

learn more… | top users | synonyms

45
votes
3answers
20k views

\parbox vs. minipage: Differences in applicability

Lamport, LaTeX: A document preparation system, states on p. 104: There are two ways to make a parbox at a given point in the text: with the \parbox command and the minipage environment. They can ...
40
votes
2answers
4k views

How to keep a constant baselineskip when using minipages (or \parboxes)?

When a minipage is used to box a text paragraph, the first line of the minipaged text and the last line of the previous text paragraph are closer than two consecutive lines in a standard text ...
32
votes
4answers
3k views

Fit text into given box by adjusting the fontsize

I would like to fit text (potentially several paragraphs) into a box of given size. This should be done by adjusting the fontsize of the contained text. Clarification edit: The given dimensions are ...
31
votes
3answers
14k views

Understanding minipages - aligning at top

I would like to be able to align two minipage at the top, without worrying about what is in the minipage. I am aware of the optional [t] parameter, but still have some confusion as to how this all ...
27
votes
2answers
87k views

How to use figure inside a minipage?

I'm trying to include an image, and keep it centered, and prevent from wrapping from the next page. The following code works for that: \begin{minipage}{\textwidth} \begin{center} Caption ...
25
votes
1answer
588 views

Using elastic lengths — when do they work?

I was wondering why elastic lengths like \fill seem to work only under certain conditions. For instance if I write A \hspace{\fill} B I get A left aligned, B right aligned as wanted. If however ...
22
votes
2answers
3k views

How to preserve the same parskip in minipage

I have following structure: \begin{document} Paragraph1. Paragraph2. \begin{minipage} Some paragraph1. Some paragraph2. \end{minipage} \end{document} How can I make the same spacing between ...
21
votes
2answers
2k views

Print programs with its proper syntax

I have defined my own language whose syntax is very close to the one of Pascal. I would like to type the following program for instance. Many people use the packages algorithmicx or algorithm2e to ...
20
votes
2answers
20k views

Aligning image and text on top, with minipages

I have an image (on the left) and a block of text (on the right), and I would like both to be aligned on their top. I am trying to use minipages for that: \documentclass{article} \begin{document} ...
19
votes
1answer
2k views

Why is \parskip zero inside a minipage?

This question was originally entitled "inconsistent paragraph spacing with \parskip inside minipage" as the MWE below shows. But I found the answer at How to preserve the same parskip in minipage, ...
18
votes
4answers
25k views

! LaTeX Error: Not in outer par mode

I am using an image within minipage and getting error message. ! LaTeX Error: Not in outer par mode. Below is minimal working example. \documentclass[11pt,table,a4paper]{article} ...
18
votes
1answer
5k views

Can I get a normal footnote in a minipage environment in LaTeX? How?

I need to use a minipage environment and I need a footnote in that minipage. I want the footnote to be numbered in the normal footnote sequence and to occur together with the rest of the footnotes in ...
17
votes
2answers
43k views

How to split a frame (of beamer) into 2 parts (minipage) side by side?

I would like to split a frame into 2 parts side by side by minipage. But it seems that the following code puts one on top of the other: \begin{minipage}[t]{0.48\linewidth} left part ...
17
votes
3answers
3k views

multicols not wrapping to 2nd column properly?

This question led to a new feature in a package: multicol I am having problem with multicol package, I created a sample demo to show it. When I put 3 minipages of certain height in the ...
16
votes
2answers
3k views

Placing TikZ drawings in a minipage side by side

I've some problems with aligning some drawings I made with TikZ: I want these two TikZ pictured below to be displayed side by side with the two captions being on the same horizontal level. ...
15
votes
3answers
27k views

side by side minipage figures

I have this code where the part marked A is the same as the part marked B except that .4 in A is .45 in B. Even though they are so similar the first one puts the images side by side with the ...
14
votes
2answers
10k views

Two minipages with 0.5\textwidth each get placed one below another

This happens in the beamer class only. Does anyone know the reason behind this? I fix it by just setting both widths to 0.49\textwidth and this works but I'm still curious why this happens and if I ...
14
votes
2answers
3k views

How to change symbol for footnote in minipage

\renewcommand method does not work \documentclass{article} \renewcommand{\thefootnote}{\arabic{footnote}} \begin{document} \begin{minipage}{1.3\textwidth} test this\footnote{abc} \end{minipage} ...
14
votes
4answers
2k views

In beamer class, how do I remove the additional vertical space before an itemize environment?

On a beamer slide, I want to produce something like I use the following LaTeX code, which works well in LaTeX with the article class. \begin{minipage}[t]{1.4cm} Questions: \end{minipage}\nobreak ...
13
votes
2answers
375 views

Vertically aligning minipages, subfigures, and subtables (not with baseline)

The goal My goal is to align side-by-side figures, tables, and text in minipages according to the top, middle and bottom of the largest such minipage. This makes it different (I believe) from the ...
13
votes
3answers
6k views

Minipage spanning across pages

I'm looking for a way to span minipages across pages in LaTeX. I have a collection of recipes (presented through the recipe environment provided by the cuisine package) that varies in length, from ...
13
votes
1answer
2k views

Wrapfigure-Minipage Woes: How do I correctly typeset wrapped text boxes within a \parcolumns environment modified for a two-sided document?

This is a follow-up question concerning an experimental chapter layout I'm trying to implement for a novel I'm writing. So. My initial problem of finding a way to modify the innards of the parcolumns ...
12
votes
4answers
799 views

Two column problem

I'm trying to replicate a certain part of a scanned book. However, I'm unable to get two columns, which have enumeratation on the left, line of the right column which is in the parallel with first ...
12
votes
1answer
7k views

lstlisting in two columns

I would like to have two listings, side by side. They have approximately the same length, therefore I don't care about how it's layed out if one part is longer. I tried \begin{minipage}{\textwidth} ...
12
votes
2answers
214 views

\if@minipage purpose in floats

In floating environments such as the captions of figures, LaTeX has a \global\@minipagefalse, why is this necessary and what does this switch do? \long\def\@makecaption#1#2{% ...
12
votes
1answer
6k views

How to move a whole tikzpicture?

I have a tikzpicture, rounded by a fbox, and embedded in a minipage. Is it possible to change the position of the whole picture inside the minipage? for instance, move the picture 1 unit higher and 1 ...
11
votes
2answers
1k views

highlight lines in listings

I have code that i have included into my document using the texcode below \begin{minipage}{.48\textwidth} \centering \lstinputlisting[numbers=left,xleftmargin=2em,frame=single,framexleftmargin=2em, ...
11
votes
3answers
270 views

How to draw a polygon with height exactly equals to the text's height

I am using MiKTeX 2.9 and XeLaTeX. I have a minipage with some formatted text: \centering \begin{minipage}{\quotewidth}% \centering\small\textit{Lorem ipsum dolor sit amet, consectetur adipiscing ...
11
votes
1answer
16k views

tables side-by-side using minipage

I'm trying to get three tables side by side using minipage. In spite of my horrific efforts my tables keep stacking on top of each other instead of standing beside what drives me mad. Can anybody spot ...
11
votes
1answer
12k views

Underfull \hbox (badness 10000) message

I made a mini page like below. It compiled without any error, however, I am getting following message in log: Underfull \hbox (badness 10000) in paragraph at lines 104--109 I am trying to fix above ...
11
votes
1answer
25k views

Putting Figures Side-By-Side Using Minipage

I am trying to put two figures next to each other. However, it is not working. Here is my code: \begin{figure}[h] \centering \begin{minipage}{1.0\textwidth} \centering ...
11
votes
2answers
656 views

How do I put card backs on my cards?

I have a a document that is making me sheets of cards. A stripped down, almost minimal example looks something like \documentclass{article} \usepackage[utf8]{inputenc} %Needed for input ...
11
votes
2answers
13k views

Align minipage to baseline of first or last line inside minipage?

The minipage environment has options for making the top, bottom, or center of the minipage box line up with the baseline of the surrounding text. Is there a way to make it line up to the baseline of ...
11
votes
4answers
546 views

How do I force multicols environment to use first column when called from within a minipage

I understand how to get multicol package to use the entirety of the first column before moving to the next: \begin{multicols*}{3} .... \end{multicols*} which is mentioned in section 2.2 of the ...
10
votes
1answer
9k views

How to put two minipages side-by-side, which use 100 % of the text width?

In draft-mode a black marker indicates that the reserved space is too low. This also appears in the following example, but it shouldn't. How can I put two minipages exactly side-by-side? ...
10
votes
4answers
8k views

Colored box in new environment

I have a problem, I'm fairly new to LaTeX but I think I got the basics. My problem is that wants to create a environment that can create a minipage with a background color and some text in it. I can ...
10
votes
1answer
14k views

Align text in minipage at same height

I need to put some text at the same height in my page, and I'm trying to do it with a minipage, but I'm not able to do it since they get centre-aligned. This is the LaTeX for the figure I've ...
10
votes
1answer
6k views

Multiple columns with minipage, can't use 100% of \textwidth

In a document I'm making, I have several cases where I need to organize things into several "columns." For example, here is some code I might use: \documentclass[letterpaper,12pt]{report} ...
10
votes
1answer
6k views

Relative padding of a minipage's paragraph

Background Created a custom command for rendering quotations (epigraphs). Problem The text in the following image has no space at the border: The word "and" is flush with the right margin. Code ...
10
votes
3answers
5k views

How can I create a two-column layout with different widths (and texts) for the two columns?

I want to create a document in which there are two separate columns of content. The column on the left is normal text, with sections, environments, etc. The column on the right is figures, all roughly ...
9
votes
2answers
309 views

Three tables side by side, want only one caption

I have three tables and I want to use one caption under them. I tried the following but then nothing prints except the caption - \begin{figure}[!h] \begin{table}[h] \centering ...
9
votes
1answer
15k views

cannot use \caption under minipage

I am using following code to import two images next to each other. When \caption{} is used, LaTeX gives me error caption outside float. \begin{minipage}{.5\textwidth} \centering ...
9
votes
2answers
5k views

Minipage that allows page breaks?

Is there a minipage-like environment that allows pagebreaks? Everything I can find is about avoiding page breaks (which minipage does well) but I want to indent a whole section, which is convenient to ...
9
votes
1answer
1k views

Why does \vfill not work inside minipage?

Perhaps the answer is trivial, and I am facing the scenario as part of a larger macro. I faced a situation where I found that \vfill does not work inside minipage environment. The extracted code from ...
9
votes
2answers
5k views

Trouble placing images side by side in beamer

I need to place a couple of images side by side (horizontally) in a presentation I'm doing with beamer, so I looked around and inserted the following code (sugested by this post): ...
9
votes
2answers
4k views

How do I make one minipage the same size as another?

I'm writing a LaTeX document into which I want to put two boxes, in a row next to each other, which will contain varying length content. I want each box to be the same height, and that height needs ...
8
votes
3answers
4k views

How to split a page in six equally sized sectors?

I'd like to split an A4 page into six equally sized sectors. I want that page to be in landscape. Each sector has a body of text and a caption. I don't really have an idea where to start. I know I ...
8
votes
3answers
20k views

How to center the minipage?

The left margin is too wide if I set 1.5\textwidth: \begin{document} \noindent\begin{minipage}{1.5\textwidth} test \end{minipage} \end{document}
8
votes
4answers
3k views

Background image for minipage

I'd like to put a background image into a minipage, stretching exactly to the surrounding fbox. What's the best option to do that? (Searching the web, I only found solutions for backgrounding the ...
8
votes
3answers
675 views

Vertical align a tabular and tikz figure in a minipage

How can I vertically align a tabular left to a tikz figure? With minipage without a vertical align option it looks good: The problem is that I need it aligned at top (for this I replaced ...