I'm trying to set a very basic front page for a document with the MWE below. I'd like to have a vertical stripe running along the left margin and have all the margins set to 0pt. The layout is based on the memoir class and the page layout resorts to the geometry package. My problems are (1) that I haven't been able to set the top margin effectively to 0pt — not even with the commented memoir class commands in the MWE below –, and (2) that the page "overflows" to a verso page — I believe this is related to setting the minipage environment to the text height and having that undesired non-zero top margin.
In the MWE I have loaded some packages that I do not really use here, but I don't think they have anything to do with the problem I'm facing. Any ideas on how to get a "real" 0pt top margin?
EDIT: This is just one of the approaches I've tried to this getting this layout done, but none of the other worked either (e.g., those that included using the adjustbox
package).
\documentclass[a4paper,11pt,extrafontsizes,twoside]{memoir}
\usepackage{xkeyval,calc,etex,etoolbox}
\usepackage{graphicx}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage[pagecolor={none}]{pagecolor}
\usepackage{ifthen,ifpdf,ifxetex}
\usepackage[utf8]{inputenx}
\usepackage{newunicodechar,adjustbox}
%\settrimmedsize{\stockheight}{\stockwidth}{*}%
%\settrims{0pt}{0pt}
%\setulmargins{0pt}{*}{*}
\usepackage[margin=0pt]{geometry}
\begin{document}
\pagecolor{blue}%
\pagestyle{empty}%
\newlength{\spinelen}%
\setlength{\spinelen}{\paperwidth * 1/8}%
\vspace*{0pt}%
\hspace*{\spinelen}%
\colorbox{white}{%
\begin{minipage}[t][\textheight]{\linewidth - \spinelen}
\vspace*{0pt}%
\vspace*{\stretch{1}}\par\noindent%
\textcolor{blue}{\fontsize{36pt}{40pt}\selectfont Title}
\par\vskip\baselineskip\noindent
\textcolor{blue}{\fontsize{25pt}{28pt}\selectfont Subtitle}
\par\vspace*{\stretch{5}}\par\noindent%
\normalcolor\Large%
Author1%
\par\noindent%
Author2%
\par\vskip2\baselineskip%
\par\vspace*{\stretch{2}}\noindent\normalcolor
\end{minipage}}
\clearpage
\ifxetex\pagecolor{white}\else\nopagecolor\fi%
\end{document}
Best Answer
You suffer from a combination of factors.
\begin{minipage}[t][\textheight]
creates a box that's slightly bigger than\textheight
You have a non zero
\parindent
You have a non zero
\fboxsep
(this is used by\colorbox
)Setting
\parindent
to zero avoids having to specify\noindent
in the box. Some inner padding can be obtained by setting\leftskip
.