{minipage} is an environment providing a paragraph box which is a complete miniversion of a page.
31
votes
3answers
10k 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 ...
24
votes
2answers
1k 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 ...
21
votes
4answers
1k 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 ...
17
votes
3answers
3k 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 ...
16
votes
2answers
823 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 ...
15
votes
1answer
361 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, ...
14
votes
3answers
1k views
multicols not wrapping to 2nd column properly?
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 multicol it puts 2 of the boxes on the first column, but the 2nd box is ...
14
votes
1answer
802 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 ...
14
votes
2answers
7k 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}
...
14
votes
1answer
3k views
Can I get a normal footnote in a minipage environement 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 ...
12
votes
4answers
479 views
Two column problem
I'm trying to replicate 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
2answers
16k 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 ...
12
votes
2answers
166 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
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
...
11
votes
2answers
2k 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 ...
11
votes
1answer
702 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 ...
10
votes
2answers
410 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, ...
10
votes
1answer
4k 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
2k 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 ...
8
votes
4answers
2k 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
4answers
3k 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 ...
8
votes
3answers
114 views
Minipage footnote is inside tikZ node
I have a minipage, and inside of it I have a footnote and a tikZ picture. Now my problem is, that the footnote text goes inside the last node of my tikZ picture. That is not what I want – and it's ...
8
votes
2answers
2k views
Fitting and centering text (both!) in a constrained area
Is there a way to make text size and alignment automatically "best fit" on a page? So that a large amount of text will be constrained on the page in a small font, but a small amount of text can be of ...
8
votes
2answers
157 views
minipage is wider than I wanted
Occasionally, the width of a minipage environment seems to be ignored. I've not kept accurate records of when this has happened. But below is purely illustrative code that shows the issue.
...
8
votes
2answers
968 views
Changing minipage vertical alignment in mid-line?
Please consider the following MWE:
\documentclass{article}
\usepackage{lipsum}
\usepackage[showframe,showcrop]{geometry}
\begin{document}
\section{Section 1}
aa
\fbox{\begin{minipage}{100pt}
Box 1
...
8
votes
1answer
509 views
How to produce 5-up 3by5 index cards
I want to produce instructional 3by5 index cards. It's easy enough to produce the cards one per page, but I want to print five copies of the same car on a single sheet of 8.5by11 card stock, where it ...
8
votes
3answers
4k 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 ...
7
votes
3answers
644 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 ...
7
votes
2answers
146 views
Tikz Ellipse Formatting
I am having difficulty formatting an ellipse within a Tikz box. I am a little bit of a loss on how to describe the issue, so I will let the code speak for itself.
I want it to look like this:
...
7
votes
1answer
2k views
Minipage, columns, tabular: differences in applicability?
This \parbox vs. \minipage post helped me to understand the main reasons to use either \parbox or {minipage} for placing material side-by-side ({minipage} is usually the winner). I have a similar ...
7
votes
1answer
2k views
How do I put a paragraph in a box that is some percentage of the width of the page I'm putting it in?
I have a document that should contain a bordered box with a paragraph of explanatory text. The box's width should be a percentage of that of the page's body.
I don't want to make the box a fixed ...
7
votes
1answer
3k 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 ...
7
votes
1answer
462 views
No horizontal spacing within minipage
I do not understand why my attempts to introduce horizontal spacing in beamer (with hspace or typographical spacing) fail when within a minipage:
\documentclass[10pt]{beamer}
\begin{document}
...
7
votes
2answers
1k 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 ...
7
votes
1answer
111 views
General question on floating and non-floating objects in LaTeX
I am wondering when you place a non-floating object such as a minipage into a floating environment such as a table or figure if this construction as a whole is then a floating or a non-floating ...
7
votes
1answer
6k 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 ...
7
votes
2answers
1k views
Why is text being placed beyond the specified line width?
I thought that I knew a few things, but looks like I have some basic misunderstanding on how TeX is supposed to typeset material. I thought that settings by the geometry package would force the text ...
7
votes
0answers
80 views
Single/Double side environment with different backgrounds
I'm having trouble aligning some of the elements.
I would like align Check Box and Cross Box to be same size so that they look nicer below is what i got so far.
Also it would be great if they can ...
6
votes
1answer
145 views
Why does this code give me a badbox?
Why does this code give me a badbox?
\documentclass[a4paper, 10pt, notitlepage]{article}
\begin{document}
\begin{minipage}[t]{1.0 \textwidth}
aaaaaaaaaaaaaaaaaaaaaaa
\end{minipage}
\end{document}
...
6
votes
2answers
7k 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}
6
votes
2answers
3k views
\footnotemark and \footnotetext in minipage
The Tufte handout class give a neat layout that shows the footnote at the right hand side not bottom line.
But, when I use the minipage with tufte-handout, and if the minipage has the footnote, the ...
6
votes
1answer
163 views
Alignment inside minipage with flushright
Please help me to figure out how to produce with that:
I have the following code:
\begin{flushright}
\begin{minipage}{0.5\textwidth}
{\bfseries Допущен к защите: }\hrulefill \\
{\bfseries ...
6
votes
1answer
82 views
Can I let a listing move up two lines without introducing a break in a paragraph? [duplicate]
Possible Duplicate:
How to prevent lstlisting from splitting code between pages?
I have a rather long listing on a page that has 3-4 lines on the following page. Just before the listing is ...
6
votes
1answer
585 views
graphical tools for tabular construction?
I often use R's xtable library or emacs org-mode to create tables in LaTeX (they are wonderful, by the way). I wonder if there are other tools people use which facilitate construction of large tables ...
5
votes
2answers
9k 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
...
5
votes
1answer
2k 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}
...
5
votes
1answer
3k views
minipage right margin
I want to start a minipage, with the regular left-indentation, but to have its right margin adjusted with regular page right margin.
An example of discrepancy:
\documentclass{article}
...
5
votes
2answers
1k views
minipage within fullwidth
I'm using Marco Daniel's fullwidth package, detailed in this answer. I want all of my text in fullwidth to be inseparable (and to begin and end with long black lines), so I am currently doing the ...
5
votes
2answers
617 views
Resuming a list started within a minipage
I have a minipage with a figure, and I want part (a) to be on the right of this figure (so part (a) is in a 2nd minipage), and the remaining parts (b), (c), etc to be below. The insights provided in ...
5
votes
2answers
1k 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}
...

