Page Layoutblank page before first page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
alain
Posts: 2
Joined: Mon Sep 26, 2022 12:10 pm

blank page before first page

Post by alain »

Hi,

I want to have a 2 pages letter with no margin and a 2 columns designed.
Here is my code:

Code: Select all

\documentclass[a4paper]{letter}

% import needed package to extend possibilities
\usepackage[most]{tcolorbox}
\usepackage{layout}
\usepackage{luacode}

\usepackage[a4paper,total={210mm,297mm},left=0mm,right=0mm,top=0mm,bottom=0mm]{geometry}
\setlength{\headsep}{15mm}


\begin{document}
\layout

\colorbox{gray!20}
{\begin{minipage}[t][297mm]{6cm}
    page 1
\end{minipage}
}
hello

\colorbox{gray!20}
{\begin{minipage}[t][297mm]{6cm}
    page 2
\end{minipage}
}
\end{document}
2022-10-01_latex_issue_first_blank_page.png
2022-10-01_latex_issue_first_blank_page.png (25.69 KiB) Viewed 2818 times
For unknown reason, when I generate PDF file i get 3 pages as the first page is full blank.
I do not know why.

any idea ?
thx

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

blank page before first page

Post by Stefan Kottwitz »

Hi Alain,

the boxes are too high. When you look into the .log file, you will see the warning "Overfull \vbox (1.34pt too high) has occurred" which means that the vertical box is too big to fit. Since it doesn't fit the page, it is moved to the next page. That's why you see an empty page first.

I think I would use TikZ to draw as an overlay in the background. If you are still looking for a solution, I can try to make some example code you can use.

Stefan
LaTeX.org admin
Post Reply