38 votes
Accepted

Left and right aligned on same line

There are a couple things you could try. A simple technique is to use \hfill, such as \documentclass{article} \begin{document} \textbf{\underline{Student:}} \hfill \textbf{\underline{Supervisor:}} \\...
user avatar
32 votes

Vertical alignment of side-by-side minipages

The reason is that the [t] means align the minipage with the first (top) baseline. The baseline for the image is under the image, which is perfectly aligned with the first baseline of the text. I see ...
user avatar
  • 13.3k
30 votes
Accepted

A never-written char "b" appears in a minipage

The optional argument of minipage can only be c t or b your extra letters such as br are breaking the tests and causing unexpected tokens to be typeset. The main issue is that (due to memory ...
user avatar
18 votes

! LaTeX Error: Not in outer par mode

Add \usepackage{float} and use the option [H] in the figure. \documentclass{article} \usepackage{graphicx} \usepackage{float} %figure inside minipage \begin{document} \begin{minipage}{0.48\textwidth} ...
user avatar
  • 181
15 votes

Vertical alignment of side-by-side minipages

You don't really need the minipage around the image \documentclass{article} \usepackage{lipsum} \usepackage[export]{adjustbox} \usepackage{graphicx} \begin{document} \begin{minipage}[t]{.6\linewidth}...
user avatar
14 votes

Align text in minipage at same height

Just to highlight the jdods user remark in the comments to David Carlisle's solution: Although the solution given by user David Carlisle is fully functional for various cases, there are some cases ...
14 votes
Accepted

Table and figure side by side with minipages

Table and figure caption can be put in the same floating environment, but there is a big but: LaTeX places figures and tables independently and does not synchronize the numbering of the figure caption ...
user avatar
13 votes

How to use figure inside a minipage?

You could try this for 2 figures side by side: \begin{figure}[htb] \begin{minipage}[t]{.45\textwidth} \centering \includegraphics[width=\textwidth]{example-image-a} \...
user avatar
13 votes
Accepted

Putting algorithm in minipage

Your issue is algorithm is a float environment by default, and you can't have floats inside a minipage. However, you can specify the [H] option to suppress floating and have it work as you intend: \...
user avatar
  • 2,794
13 votes

How to make minipage spanning multiple pages

The following attempt uses tcolorbox to create a breakable box to contain the body minipage. The side bar is added as an overlay for the first box part. This gives the following code: \documentclass{...
user avatar
13 votes
Accepted

Help needed to create a relatively complex page for the cover of a textbook

Something like this? Note that the images on the left are not all the same width because the images I used have different proportions. Provided yours have the same height:width ratio, they will match ...
user avatar
  • 184k
13 votes
Accepted

Using tikzlibrary calligraphy for braces with a minipage

You need to say in \draw[decorate] ...; otherwise it draws an ordinary line ... So, try the following correction of your MWE: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \...
user avatar
  • 258k
12 votes
Accepted

Align figures to top using minipage environment

You have two ways: one with minipages, one without them. \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage[left=2cm,right=2cm,top=1.5cm,bottom=1.5cm]{...
user avatar
  • 1.0m
12 votes
Accepted

What, no warning when minipage overflows page?

This is "by design" the vertical size options of minipage and parbox are analogues (and share the code of) the horizontal size option of \makebox. \makebox[0pt][l]{...} hides the size of the ...
user avatar
11 votes

vertical alignment of two columns in a beamer frame

Here is a solution via two new commands : \parallelcontent and \parallelitem. \documentclass{beamer} \newcommand\parallelcontent[2]{ \begin{columns}[t] \column{0.48\textwidth} #1 \column{0....
user avatar
  • 68.4k
11 votes
Accepted

Adding axes labels to LaTeX figures

A solution with tikzpicture: \documentclass{article} \usepackage{tikz} \usepackage{graphicx} \usetikzlibrary{positioning} \begin{document} \begin{figure}[htb] \begin{minipage}{0.4\textwidth} \begin{...
user avatar
  • 1,214
11 votes
Accepted

How to get the height of a minipage to set the height of another one?

Measure the left box and force the right minipage to have the same height. \documentclass{article} \usepackage{graphicx} \usepackage{subfig} \newsavebox{\dontpanicbox} \newlength{\dontpanicht} \...
user avatar
  • 1.0m
11 votes
Accepted

Put vertical rotated text within minipage environment

Here's a tikz option that might suit. (Updated for US Letter size paper.) \documentclass{article} \usepackage[landscape,margin=0cm]{geometry} \usepackage{mathtools} \usepackage{amssymb,amsthm} \...
user avatar
  • 23.8k
11 votes
Accepted

How to force words that start with an italic uppercase letter "W" to be better aligned agaist left-hand edge of minipage

You asked: is there a way to fix the visual problem? Yes: Load the microtype package. Consider the following minimalist LaTeX document: \documentclass{book} \usepackage{showframe} %\usepackage{...
user avatar
  • 444k
10 votes
Accepted

Three 'side to side' figures using minipage

I understand that the three subfigures should be numbered a, b, and "c". This can be done with the help of the subcaption package. The following is a mock-up of what's possible. Obviously, you'll ...
user avatar
  • 444k
10 votes

minipage with verbatim package doesn't compile

You have to do \usepackage{verbatim} \newenvironment{listing} {\minipage{\linewidth}\verbatim} {\endverbatim\endminipage} There's almost the same example on page 3 of the package documentation, see ...
user avatar
  • 1.0m
10 votes

Help needed to create a relatively complex page for the cover of a textbook

You may also try the textpos-package. It has a good manual, and is easy to learn, even if you learn by trial and error. If you like me is not skilled in Tikz, maybe you find textpos easier to use. I ...
user avatar
  • 20k
10 votes

Force latex to put a figure and a table in the same page

You can put the picture and the table into a single environment (e.g. \begin{table}) and use the \captionof command to add corresponding captions. Since you say the figure & table should occupy a ...
user avatar
  • 1,424
10 votes
Accepted

Splitting a beamer page into minipages by horizontal and vertical splits, and using "pause" to display minipages one-by-one

Are you looking for a layout like this? \documentclass{beamer} \begin{document} \begin{frame}[t]{Title of frame} \begin{columns}[T,onlytextwidth] \begin{column}{.4\textwidth} ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible