# Filling white space in title page with random numbers or a text

Is it possible to fill all white space in this template with numbers or a text?

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[10pt]{article}

\usepackage[a4paper,pdftex]{geometry}   % Use A4 paper margins
\usepackage[english]{babel}
\usepackage{xcolor} % Required for specifying custom colors
\usepackage{fix-cm} % Allows increasing the font size of specific fonts beyond LaTeX default specifications

\setlength{\oddsidemargin}{0mm} % Adjust margins to center the colored title box
\setlength{\evensidemargin}{0mm} % Margins on even pages - only necessary if adding more content to this template

\newcommand{\HRule}[1]{\hfill \rule{0.2\linewidth}{#1}} % Horizontal rule at the bottom of the page, adjust width here

\definecolor{white}{rgb}{255,255,255} % Color of the box surrounding the title - these values can be changed to give the box a different color

\begin{document}

\thispagestyle{empty} % Remove page numbering on this page

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\colorbox{white}{
\parbox[t]{1.0\linewidth}{
\centering \fontsize{50pt}{80pt}\selectfont % The first argument for fontsize is the font size of the text and the second is the line spacing - you may need to play with these for your particular title
\vspace*{0.7cm} % Space between the start of the title and the top of the grey box

\hfill \LaTeX \\
\hfill Title \\
\hfill Template\par

\vspace*{0.7cm} % Space between the end of the title and the bottom of the grey box
}
}

%----------------------------------------------------------------------------------------

\vfill % Space between the title box and author information

%----------------------------------------------------------------------------------------
%   AUTHOR NAME AND INFORMATION SECTION
%----------------------------------------------------------------------------------------

{\centering \large
\hfill John Smith \\
\hfill University Name \\
\hfill Department Name \\
\hfill \texttt{http://www.johnsmith.com} \\

\HRule{1pt}} % Horizontal line, thickness changed here

%----------------------------------------------------------------------------------------

\clearpage % Whitespace to the end of the page

\end{document}


@egreg If i put the numbers manually i get the overfull hbox error and the number are put in a line and i have not the filling of the sheet. Like this:

\documentclass{article}
\usepackage[a4paper,top=0pt,bottom=0pt,left=1.5pt,right=1.5pt]{geometry}
\input{random}

\def\print{\expandafter\printaux\number\randomi\relax}
\def\printaux#1{\ifx#1\relax\else#1\hskip0pt plus .1pt\relax\expandafter\printaux\fi}

\begin{document}

\baselineskip=12.05pt
\parindent=0pt
\flushbottom
\enlargethispage{20\baselineskip}

5405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054541635454054163545405416354540541635454054163546354540541635454054163545405416354540541635454054163545405416354540546354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354540541635454054163545405416354
\end{document}

-

Write your document in this way:

\documentclass[10pt]{article}

\usepackage[a4paper]{geometry}   % Use A4 paper margins
\usepackage[english]{babel}
\usepackage{xcolor} % Required for specifying custom colors
\usepackage{fix-cm} % Allows increasing the font size of specific fonts beyond LaTeX default specifications
\usepackage{eso-pic,graphicx}

\setlength{\oddsidemargin}{0mm} % Adjust margins to center the colored title box
\setlength{\evensidemargin}{0mm} % Margins on even pages - only necessary if adding more content to this template

\newcommand{\HRule}[1]{\hfill \rule{0.2\linewidth}{#1}} % Horizontal rule at the bottom of the page, adjust width here

\definecolor{white}{rgb}{255,255,255} % Color of the box surrounding the title - these values can be changed to give the box a different color

\begin{document}

\thispagestyle{empty} % Remove page numbering on this page

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\noindent\colorbox{white}{%
\parbox[t]{\dimexpr\textwidth-2\fboxsep\relax}{
\raggedleft \fontsize{50pt}{80pt}\selectfont % The first argument for fontsize is the font size of the text and the second is the line spacing - you may need to play with these for your particular title
\vspace*{0.7cm} % Space between the start of the title and the top of the grey box

\LaTeX \\
Title \\
Template\par

\vspace*{0.7cm} % Space between the end of the title and the bottom of the grey box
}%
}

%----------------------------------------------------------------------------------------

\vfill % Space between the title box and author information

%----------------------------------------------------------------------------------------
%   AUTHOR NAME AND INFORMATION SECTION
%----------------------------------------------------------------------------------------

\hspace*{\fill}\colorbox{white}{\parbox{.5\textwidth}{
\raggedleft\large
John Smith \\
University Name \\
Department Name \\
\texttt{http://www.johnsmith.com} \\

\HRule{1pt}}% Horizontal line, thickness changed here
}
%----------------------------------------------------------------------------------------

\clearpage % Whitespace to the end of the page

\end{document}


Prepare also a fillwithnumbers.tex document:

\documentclass{article}
\usepackage[a4paper,top=0pt,bottom=0pt,left=1.5pt,right=1.5pt]{geometry}
\input{random}

\def\print{\expandafter\printaux\number\randomi\relax}
\def\printaux#1{\ifx#1\relax\else#1\hskip0pt plus .1pt\relax\expandafter\printaux\fi}

\begin{document}

\baselineskip=12.08039pt
\parindent=0pt
\flushbottom
\enlargethispage{20\baselineskip}

\count255=0
\loop\ifnum\count255<900
\nextrandom\number\print
\repeat
\end{document}


and compile this one. Then the title page will have your number filled background.

The random.tex file by Donald Arsenau provides an easy to use random number generator. At each call of \nextrandom, a random number in the interval [0,231-1] is generated. The \print macro accesses to the generated number, which is the value of the counter \randomi and adds a small skip after any digit so that TeX will have enough break points to fill the line. I generate as many numbers are necessary to fill a page with zero margins.

The baseline skip is computed so that an integer number of lines will fit, but the page is enlarged so that the last line won't be short (the PDF output will be clipped anyway): with the normal setting, 70 lines will fit, so I did

(29.7cm - 10pt)/69 = 12.10213pt

(the first line is only 10pt high), but then reduced it so that the accumulated difference will sum up to 1.5pt.

-
Good but is impossible have not the overlapping of the white boxes on the numbers ? or better, is possible have one result like the wrapfig package ? For example can i make one page with only numbers and then i can try to import the white boxes as pictures and use the wrapfig package to wrap that. Another things how can i put manually the numbers but also prevent the "OverfullHbox" error ? – FormlessCloud Jul 15 '12 at 17:05
What you can do is to place the boxes correctly in order that they don't partially cover any digit. There is no overfull box message with my code. – egreg Jul 15 '12 at 17:48
Sorry, I have badly explained. If i would to place manually the numbers, so not generated by the program how can i prevent the overfull hbox error? i have put \baselineskip=12.05pt so the first and the last line are at the same distance from the finish of the sheet. – FormlessCloud Jul 15 '12 at 19:48
@FormlessCloud I don't follow you. There is the cutwin package that allows to make space for some other text; give a look to it. – egreg Jul 15 '12 at 20:09
@FormlessCloud Try removing \colorbox{white} from the title section. Is that sort of what you're trying to do? – Scott H. Jul 15 '12 at 21:25

Here is a solution based on egreg's answer, adapted to display text. (CW because I hardly did any work, the credit goes to egreg.)

The main document stays exactly the same. Here's my text version of the fillwithnumbers.tex:

\documentclass{article}
\usepackage[a4paper]{geometry}% A4 paper
%\usepackage[letterpaper]{geometry} % letter paper, also change \baselineskip below
\geometry{top=0pt,bottom=0pt,left=1.5pt,right=1.5pt}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}% adapt if using a different language

\usepackage{lmodern}% because Computer Modern's "ß" is ugly.
\usepackage[T1]{fontenc}

\usepackage{microtype}

\usepackage{xcolor}

\usepackage{kantlipsum}% for the filler text

\begin{document}\color{gray}

\baselineskip=12.08039pt % A4 paper
%\baselineskip=12.03077pt % letter paper (also change geometry above!)
\parindent=0pt
\flushbottom
\enlargethispage{20\baselineskip}

\kant*[2-11]% replace with the text of your choice, eliminating any paragraph breaks

\end{document}


The finished product looks like this:

Good sources of free texts are:

-