[Tex/LaTex] The minipage syntax

minipage

Can you explain me the syntax of the minipage please?

For example, here:

 \begin{minipage}[c]{0.45\linewidth}

what means 0.45 ?

Thank you in advance

Edit:

\documentclass{svjour3}      
\usepackage[utf8]{inputenc}
\inputencoding{latin1}
\usepackage{lmodern,textcomp}
\usepackage[a4paper,top=2cm,bottom=3.2cm,left=1.25cm,right=1.25cm]{geometry}

% Citation of the figure 
is shown in \ref{fig:metal}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}

\begin{minipage}[c]{0.5\linewidth}
\begin{tabular}{|l|l|l|l|}
\hline
ff & ff   & ff & ff \\ \hline
dd & ddd  & ff & jj \\ \hline
ss & xxtt & l  & jj \\ \hline
hh & gg   & ll & ll \\ \hline
\end{tabular}

\end{minipage}
\begin{minipage}[c]{0.3\linewidth}
\sidesubfloat[]{\includegraphics[width=4.5cm,height=4.1cm]{Image.jpg}\label{fig:im1}}
\end{minipage}

\begin{minipage}[c]{0.45\linewidth}
\sidesubfloat[]{\includegraphics[width=11cm,height=6cm]{spectra.jpg}\label{fig:spectra}}
\end{minipage}
\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% I would like to make the figure after 10 cm from the beginning of the line and not just after the `tabular`. What shall I do please?
\end{document}

Best Answer

in your mwe you have more issues:

  • missing package graphicx in preamble
  • missing is \begin{document}
  • you have spelling error in include graphics: instead of \include graphics{} had to be \includegraphics{}
  • if you like to have all three minipages in one line, then the sum of their width should be equal or less of \textwidth or in your case of linewidth, now you have 0.5\linewidth + 0.3\linewidth + 0.45\linewidth = 1.25\linewidth, consequently third minipage is moved in the next line.

corrected your mwe with added lipsum for generating dummy text is:

\documentclass{article}%{svjour3}
%\usepackage[utf8]{inputenc}
%\inputencoding{latin1}
%\usepackage{lmodern,textcomp}
\usepackage[a4paper,top=2cm,bottom=3.2cm,left=1.25cm,right=1.25cm]{geometry}

\usepackage[demo]{graphicx}% for including images

\usepackage{lipsum}% for demo only

\begin{document}
% Citation of the figure is shown in \ref{fig:metal}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lipsum[1]
    \begin{figure}[ht]
\begin{minipage}[c]{0.3\linewidth}
\begin{tabular}{ccc}
a & b & c
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[c]{0.3\linewidth}
\includegraphics{}
\end{minipage}\hfill
\begin{minipage}[c]{0.3\linewidth}
\begin{tabular}{ccc}
a & b & c
\end{tabular}
\end{minipage}
    \end{figure}
\lipsum[2]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

i use article because i haven't installed svjour3, however described issues are independent of used document class.

enter image description here

Related Question