Text Formattingalign text inside minipage / align caption inside minipage

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

align text inside minipage / align caption inside minipage

Post by paulosousa »

Hello all,

have a problem because caption is not centered with the image inside the 2nd minipage (right)... and how can I justify the text inside the left minipage? Could anyone please help me?

Code: Select all

\documentclass[12pt, twoside, a4paper]{article}
\usepackage[portuguese]{babel}
\usepackage[applemac]{inputenc}
\usepackage[left=2.0cm,top=1.5cm,right=2.0cm,bottom=1.75cm]{geometry}
\usepackage{amsmath,amssymb,amsfonts,caption}
\begin{document}
Na Figura \ref{fig:circle} estão representados, em referencial o. n. $xOy$: \\ \\
\vspace{0.05cm}
\hspace{-0.5cm}
\begin{tabular}{lc}
\begin{minipage}{10cm}
\begin{flushleft}
\begin{itemize}
\item o círculo trigonométrico;
\item o raio $[OA]$ do círculo;
\item a circunferência $\mathcal{C}$ de centro $A$ e raio $[AB]$
\end{itemize}
\vspace{0.25cm}
Tal como a figura sugere, o ponto $A$ pertencente ao primeiro quadrante, o ponto $B$ pertencente ao eixo $Oy$ e o ângulo de amplitude $\alpha$, assinalado na figura, tem por lado origem o semieixo positivo $Ox$ e lado extremidade a semireta $\dot{O}A$
\end{flushleft}
\end{minipage}&
\begin{minipage}[c]{3cm} 
\centering \includegraphics[scale=0.800]{figuras/4/img1.png}
\centering \captionof{figure}{}
\label{fig:circle}
\end{minipage}\hfill
\end{tabular} 
\end{document}

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

align text inside minipage / align caption inside minipage

Post by Johannes_B »

Once again, the example is not compilable.
Please read some introductory material, i never want to see \\ again!

Code: Select all

\documentclass[12pt, twoside, a4paper,demo]{article}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[left=2.0cm,top=1.5cm,right=2.0cm,bottom=1.75cm]{geometry}
\usepackage{amsmath,amssymb,amsfonts,caption}
\usepackage{parskip}
\usepackage{mwe}
\usepackage{showframe}
\begin{document}
Na Figura \ref{fig:circle} estão representados, em referencial
o.\,n. $xOy$:% \\ \\%Absolute Nonsense
%\vspace{0.05cm}%Absolute nonsense, sorry
%\hspace{-0.5cm}

\begin{minipage}{.7\linewidth}
	\begin{itemize}
		\item o círculo trigonométrico;
		\item o raio $[OA]$ do círculo;
		\item a circunferência $\mathcal{C}$ de centro $A$ e raio $[AB]$
	\end{itemize}

	\medskip%the parskip in minipages is zero
	Tal como a figura sugere, o ponto $A$ pertencente ao primeiro
	quadrante, o ponto $B$ pertencente ao eixo $Oy$ e o ângulo de
	amplitude $\alpha$, assinalado na figura, tem por lado origem o
	semieixo positivo $Ox$ e lado extremidade a semireta
	$\dot{O}A$
\end{minipage}\hfill
\begin{minipage}[c]{.28\linewidth}
	\centering \includegraphics[width=\linewidth]{figuras/4/img1.png}
	\captionof{figure}{}
	\label{fig:circle}
\end{minipage}\hfill
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

align text inside minipage / align caption inside minipage

Post by Stefan Kottwitz »

Yes, \\ \\ is a bit strange. The logical paragraph, important for justified typesetting, is not ended here. There are line endings within the same paragraph. \\ is for line breaks in environments, such as rows in tables or matrices, and multi line equations.

You may hear complaints any time about \\. ;-) I would just do an empty line for breaking the paragraph. If space would be needed, I would simply use \vspace. You did it already. I would go a step further: using \bigskip or \medskip or my own defined new command, because it's shorter than \vspace with a specific value and more important, I can change the value in the preamble to adjust all such spacings in the final tweaking.

Stefan
LaTeX.org admin
Post Reply