0

I have 4 minipages side by side but they appear after blank page, how it can be avoided?

Secondly there is thin white space between the pages, how to remove that

\begin{document}
\noindent
\fcolorbox{red}{red}{% 
\begin{minipage}[t][\textheight]{0.05\textwidth}%%%%a
A
\end{minipage}}
\fcolorbox{green}{green}{% 
\begin{minipage}[t][\textheight]{.3\textwidth}%%%%a
B
\end{minipage}}
\fcolorbox{blue}{blue}{% 
\begin{minipage}[t][\textheight]{.05\textwidth}%%%%a
C
\end{minipage}}
\fcolorbox{yellow}{yellow}{% 
\begin{minipage}[t][\textheight]{.6\textwidth}%%%%a
D
\end{minipage}}
\end{document}
0

Not sure about \textheight, are you giving this intentionally? Because, if you remove this then the blankpage issue solved, just giving \ignorespaces and % symbol at end of minipage tag, that will solve the thin white space issue solves, refer the below codes:

\documentclass{book}
\usepackage{color,graphicx}
\usepackage{showframe}
\begin{document}

\null\removelastskip\nointerlineskip\vspace*{-\baselineskip}

\setlength{\fboxsep}{0pt}
\noindent\fcolorbox{red}{red}{% 
\begin{minipage}[t][\textheight]{0.05\textwidth}%%%%a
A
\end{minipage}}\ignorespaces%
\fcolorbox{green}{green}{% 
\begin{minipage}[t][\textheight]{.3\textwidth}%%%%a
B
\end{minipage}}\ignorespaces%
\fcolorbox{blue}{blue}{% 
\begin{minipage}[t][\textheight]{.05\textwidth}%%%%a
C
\end{minipage}}\ignorespaces%
\fcolorbox{yellow}{yellow}{% 
\begin{minipage}[t][\textheight]{.6\textwidth}%%%%a
D
\end{minipage}}


\end{document}
|improve this answer|||||
  • yes, I want the minipage height equal to page height. Is it possible here? – ZEESHAN Jun 29 '19 at 7:40
  • @ZEESHAN Please check the updated answer... – MadyYuvi Jun 29 '19 at 7:48

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.