0

I have been editing a CV with tcolorbox and geometry packages, I wanted to stack side-by-side two boxes below a top box but when I run the code the top box sits on top of the first page alone and the two following boxes start a second page and don't even stack side-by-side: the second box sits above the third which in turn does not even display the whole content. What might be the problem?

Below is the code:

\documentclass[11pt, oneside, a4paper, titlepage]{article}

\usepackage{tcolorbox}

\usepackage{geometry}
\geometry{
  a4paper, 
  left=0.1cm,
  right=0.1cm,
  top=0.1cm,
  bottom=0.1cm
}

\definecolor{titleBack}{RGB}{0,70,21}

\title{Pablo CV}
\date{\today}

\begin{document}
\tcbset{colframe=gray!95!black,colback=titleBack,arc=0mm}

 \begin{tcolorbox}
   \begin{minipage}{4.0cm}
     \hspace*{-0.3cm}\includegraphics[width=4cm]{me12.jpg}
   \end{minipage}
     \begin{minipage}{15cm}
    \begin{center}
      \Huge{\textcolor{white}{Pablo}} \\
      \vspace*{0.5cm}
      \Large{\textcolor{white}{\emph{Electrical Engineer}}}
    \end{center}  
     \end{minipage}
 \end{tcolorbox} 
 
 \tcbset{colframe=white,colback=white,arc=0mm}
 
  \begin{tcolorbox}
    \begin{minipage}[t]{8cm}
      \vspace*{-0.5cm}
      \begin{tcolorbox}[grow to left by=0.6cm,colback=gray!25,colframe=white]
      
  \section*{Profile}
  Introductory profile....
  
  \section*{Contact}
  \begin{tabular}{r l}
    Tel: & +00 000 000 0000 \\
    Home: & +00 000 000 0000 \\
    Email: & mailingto@mailservice.com 
    
  \end{tabular}
  
  \section*{Expertise}
  \begin{itemize}
    \item{Item one}
    \item{Item Two}
    \item{Item Three}
    \item{Item Four}
    \item{Item Five}
    \item{Item Six}
    \item{Item Seven}
    \item{Item Eight}
  \end{itemize}
  
  \section*{Interests}
  \begin{itemize}
    \item{Item 1 (Details)}
    \item{Item 2}
    \item{Item 3}
  \end{itemize}                      
  \end{tcolorbox}  
\end{minipage} \\

\begin{minipage}[t]{11cm}
  \vspace*{-0.5cm}
  \begin{tcolorbox}[grow to right by=0.75cm, colframe=white, colback=white]
    \section*{Education}
      \begin{itemize}
        \item
        {
          \textbf{Most Recent School} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }
        \item
        {
          \textbf{School 2} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }   
         \item
        {
          \textbf{School 3} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }   
         \item
        {
          \textbf{School 4} \\
          \emph{Degree} \\
          \emph{Date - Date}
        } 
      \end{itemize}
      
      \section*{Experience}
      \begin{itemize}
        \item
        {
          \textbf{Work 1} \\
          \emph{Position} \\
          \emph{Date - NOW} \\
          \emph{Work details}
        }
        
        \item
        {
          \textbf{Work 2} \\
          \emph{Position} \\
          \emph{Date - Date} \\
          \emph{Work details}
        }
        
        \item
        {
          \textbf{Work 3} \\
          \emph{Position} \\
          \emph{Date - Date}\\
          \emph{Work details}
        }
      \end{itemize}
      
      \section*{Professional Trainings}
      \begin{itemize}
        \item
        {
          \textbf{Training Institution 1} \\
          \emph{Topic} \\
          \emph{Date - Date} \\
          Training details
        }
        \item
        {
          \textbf{Training Institution 2} \\
          \emph{Topic} \\
          \emph{Date - Date} \\
          Training details
        }
        
      \end{itemize}
  \end{tcolorbox}

\end{minipage}
  \end{tcolorbox}
\end{document}
4
  • 3
    would you like to share your code and image of the desired output – js bibra Jan 11 at 15:32
  • It's difficult to say what happens without your code, but probably lower boxes don't fit in first page and they move to the second. And probably they are stacked because you leave a blank line between them. But I'm just guessing, please show us your code. – Ignasi Jan 11 at 18:33
  • I have shared the 'code' now... – pablo Jan 12 at 14:59
  • @pablo Welcome -- does the image below meet your requirement – js bibra Feb 28 at 0:38
0

enter image description here

\documentclass[11pt, oneside, a4paper, titlepage]{article}

\usepackage{tcolorbox}

\usepackage{geometry}
\geometry{
  a4paper, 
  left=0.1cm,
  right=0.1cm,
  top=0.1cm,
  bottom=0.1cm
}

\definecolor{titleBack}{RGB}{0,70,21}

\title{Pablo CV}
\date{\today}
\usepackage{graphicx}
\usepackage[allfiguresdraft]{draftfigure}

\begin{document}
\tcbset{colframe=gray!95!black,colback=titleBack,arc=0mm}

 \begin{tcolorbox}
   \begin{minipage}{4.0cm}
     \hspace*{-0.3cm}\includegraphics[width=4cm]{me12.jpg}
   \end{minipage}
     \begin{minipage}{15cm}
    \begin{center}
      \Huge{\textcolor{white}{Pablo}} \\
      \vspace*{0.5cm}
      \Large{\textcolor{white}{\emph{Electrical Engineer}}}
    \end{center}  
     \end{minipage}
 \end{tcolorbox} 
 
 \tcbset{colframe=white,colback=white,arc=0mm}
 
%  \begin{tcolorbox}
    \begin{minipage}[t]{8cm}
      \vspace*{-0.5cm}
      \begin{tcolorbox}[grow to left by=0.6cm,colback=gray!25,colframe=white]
      
  \section*{Profile}
  Introductory profile....
  
  \section*{Contact}
  \begin{tabular}{r l}
    Tel: & +00 000 000 0000 \\
    Home: & +00 000 000 0000 \\
    Email: & mailingto@mailservice.com 
    
  \end{tabular}
  
  \section*{Expertise}
  \begin{itemize}
    \item{Item one}
    \item{Item Two}
    \item{Item Three}
    \item{Item Four}
    \item{Item Five}
    \item{Item Six}
    \item{Item Seven}
    \item{Item Eight}
  \end{itemize}
  
  \section*{Interests}
  \begin{itemize}
    \item{Item 1 (Details)}
    \item{Item 2}
    \item{Item 3}
  \end{itemize}                      
  \end{tcolorbox}  
\end{minipage}
\begin{minipage}[t]{11cm}
  \vspace*{-0.5cm}
  \begin{tcolorbox}[grow to right by=0.75cm, colframe=white, colback=green!30]
    \section*{Education}
      \begin{itemize}
        \item
        {
          \textbf{Most Recent School} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }
        \item
        {
          \textbf{School 2} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }   
         \item
        {
          \textbf{School 3} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }   
         \item
        {
          \textbf{School 4} \\
          \emph{Degree} \\
          \emph{Date - Date}
        } 
      \end{itemize}
      
      \section*{Experience}
      \begin{itemize}
        \item
        {
          \textbf{Work 1} \\
          \emph{Position} \\
          \emph{Date - NOW} \\
          \emph{Work details}
        }
        
        \item
        {
          \textbf{Work 2} \\
          \emph{Position} \\
          \emph{Date - Date} \\
          \emph{Work details}
        }
        
        \item
        {
          \textbf{Work 3} \\
          \emph{Position} \\
          \emph{Date - Date}\\
          \emph{Work details}
        }
      \end{itemize}
      
      \section*{Professional Trainings}
      \begin{itemize}
        \item
        {
          \textbf{Training Institution 1} \\
          \emph{Topic} \\
          \emph{Date - Date} \\
          Training details
        }
        \item
        {
          \textbf{Training Institution 2} \\
          \emph{Topic} \\
          \emph{Date - Date} \\
          Training details
        }
        
      \end{itemize}
  \end{tcolorbox}

\end{minipage}
%  \end{tcolorbox}
\end{document}
0

Instead of minipages inside tcolorboxes, I think it's better to fix tcolorbox width. And options nobeforeafter, box align=top and no blank lines between second and third box will do the work:

\documentclass[11pt, oneside, a4paper, titlepage]{article}

\usepackage{tcolorbox}

\usepackage{geometry}
\geometry{
  a4paper, 
  left=0.1cm,
  right=0.1cm,
  top=0.1cm,
  bottom=0.1cm
}

\definecolor{titleBack}{RGB}{0,70,21}

\title{Pablo CV}
\date{\today}

\begin{document}
\tcbset{colframe=gray!95!black,colback=titleBack,arc=0mm}

 \begin{tcolorbox}
   \begin{minipage}{4.0cm}
     \hspace*{-0.3cm}\includegraphics[width=4cm]{example-image-a}
   \end{minipage}
     \begin{minipage}{15cm}
    \begin{center}
      \Huge{\textcolor{white}{Pablo}} \\
      \vspace*{0.5cm}
      \Large{\textcolor{white}{\emph{Electrical Engineer}}}
    \end{center}  
     \end{minipage}
 \end{tcolorbox} 
 
 \tcbset{colframe=white,colback=white,arc=0mm, nobeforeafter, box align=top}
 
  \noindent\begin{tcolorbox}[width=8cm,colback=gray!25,colframe=white]
   
  \section*{Profile}
  Introductory profile....
  
  \section*{Contact}
  \begin{tabular}{r l}
    Tel: & +00 000 000 0000 \\
    Home: & +00 000 000 0000 \\
    Email: & mailingto@mailservice.com 
    
  \end{tabular}
  
  \section*{Expertise}
  \begin{itemize}
    \item{Item one}
    \item{Item Two}
    \item{Item Three}
    \item{Item Four}
    \item{Item Five}
    \item{Item Six}
    \item{Item Seven}
    \item{Item Eight}
  \end{itemize}
  
  \section*{Interests}
  \begin{itemize}
    \item{Item 1 (Details)}
    \item{Item 2}
    \item{Item 3}
  \end{itemize}                      
  \end{tcolorbox}  
%
 \begin{tcolorbox}[grow to right by=0.75cm, colframe=white, colback=white]
    \section*{Education}
      \begin{itemize}
        \item
        {
          \textbf{Most Recent School} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }
        \item
        {
          \textbf{School 2} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }   
         \item
        {
          \textbf{School 3} \\
          \emph{Degree} \\
          \emph{Date - Date}
        }   
         \item
        {
          \textbf{School 4} \\
          \emph{Degree} \\
          \emph{Date - Date}
        } 
      \end{itemize}
      
      \section*{Experience}
      \begin{itemize}
        \item
        {
          \textbf{Work 1} \\
          \emph{Position} \\
          \emph{Date - NOW} \\
          \emph{Work details}
        }
        
        \item
        {
          \textbf{Work 2} \\
          \emph{Position} \\
          \emph{Date - Date} \\
          \emph{Work details}
        }
        
        \item
        {
          \textbf{Work 3} \\
          \emph{Position} \\
          \emph{Date - Date}\\
          \emph{Work details}
        }
      \end{itemize}
      
      \section*{Professional Trainings}
      \begin{itemize}
        \item
        {
          \textbf{Training Institution 1} \\
          \emph{Topic} \\
          \emph{Date - Date} \\
          Training details
        }
        \item
        {
          \textbf{Training Institution 2} \\
          \emph{Topic} \\
          \emph{Date - Date} \\
          Training details
        }
        
      \end{itemize}
%  \end{tcolorbox}
%
%\end{minipage}
  \end{tcolorbox}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.