# Configuring minipage in latex 2

I want to use minipage in latex and I want the input as below

I used the cfg template of answer but it is not same as picture. I hope that someone can help. Thanks!

\documentclass[15pt,a4paper,openany,oneside]{book}
\usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm,exscale, commath}
\usepackage{mathrsfs}

\usepackage[left=3cm, right=2.2cm, top=2.5cm, bottom=2cm]{geometry}

\begin{document}

\pagestyle{empty}

\begin{center}
\fontsize{13pt}{13pt}\selectfont SOCIALIST REPUBLIC OF VIETNAM\\ {\bf
\underline{Independence-Freedom-Happiness}}
\end{center}

\vspace*{0.3cm}

\begin{minipage}{0.87\textwidth}
\begin{center}
{\bf \fontsize{17pt}{16pt}\selectfont \flushleft Curriculum vitae}
\end{center}
\end{minipage}
\begin{minipage}{0.1\textwidth}
\flushright{\rule{2.5cm}{3cm}}
\end{minipage}

\end{document}


\documentclass[15pt,a4paper,openany,oneside]{book}
\usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm,exscale, commath}
\usepackage{mathrsfs}

\usepackage[left=3cm, right=2.2cm, top=2.5cm, bottom=2cm]{geometry}

\begin{document}

\pagestyle{empty}

\hbox to \textwidth{
\begin{minipage}{20pc}
\begin{center}
\fontsize{13pt}{13pt}\selectfont SOCIALIST REPUBLIC OF VIETNAM\\ {\bf
\underline{Independence-Freedom-Happiness}}\\[3pc]
{\bf \fontsize{17pt}{16pt}\selectfont \flushleft Curriculum vitae}
\end{center}
\end{minipage}\hfill
\begin{minipage}{0.1\textwidth}
\flushright{\rule{2.5cm}{3cm}}
\end{minipage}
}
\end{document}

• this has not fixed most of the issues in the original. notably \flushleft and \flushright are doing nothing as the group ends before they take effect, and it further adds the issue that \hbox should not be used in latex documents, and that you have added a space at either end of the line. – David Carlisle Sep 14 '17 at 6:49
• @MadyYuvi I want have the text ''Figure (3 x 4)'' same as picture – Mary Sep 14 '17 at 11:40
• @Mary Do you mean that right side black box should replace with a picture? Please correct if my assumption is wrong... – MadyYuvi Sep 14 '17 at 11:47

your image is not very clear (does't show position of your title and image). in assume, that title (mini pages) not spill out of text border):

• 15pt is not defined font size, consequently default font size of 10pt is considered
• \bf is not latex command. instead of it you should use \bfseries or \textbf{...}
• for defining font size you can use \large, \Large, huge ... version of used fonts
• flushleft is surplus
• ...

image of your document above is obtained with the following mwe:

\documentclass[12pt,a4paper,oneside]{book}
\usepackage{amsmath,amsxtra,amssymb,latexsym, amscd, amsthm, exscale, commath}
\usepackage{mathrsfs}
\usepackage[showframe,
left=3cm, right=2.2cm, top=2.5cm, bottom=2cm]{geometry}

\usepackage[demo]{graphicx}     % <--- added, for inserting of images

\usepackage{lipsum}             % for dummy text

\begin{document}
\pagestyle{empty}

\noindent%
{\setlength\tabcolsep{0pt}
\begin{tabularx}{\linewidth}{p{25mm}
>{\centering\let\\\newline}X
p{25mm}
}
&
\Large
SOCIALIST REPUBLIC OF VIETNAM

\underline{\textbf{Independence-Freedom-Happiness}}

\vspace{\baselineskip}
\large
\textbf{Curriculum vitae}
&   \includegraphics[width=25mm, height=30mm, valign=t]{mypicture}
\end{tabularx}
\vspace{2\baselineskip}
}

\lipsum
\end{document}
`
• @Mary , are this means that my answer gives what you looking for? if yes, you can vote it (by clicking up-pen at the top left side of answer or even accept it :-). – Zarko Sep 14 '17 at 11:42