# Package geometry warning

I'm creating custom graph paper, and my code is

\documentclass{article}
\usepackage[margin=25mm]{geometry}
\usepackage{tikz}
\usepackage{background}
\usetikzlibrary{positioning}
\usepackage{geometry}

\geometry{
a4paper,
total={170mm,257mm},
left=10mm,
right=10mm,
top=10mm,
}

\SetBgContents%
{   \begin{tikzpicture}[remember picture, overlay]
\draw [line width=0.3pt,color=gray,step=0.5cm] (current page.south
west) grid (current page.north east);
\end{tikzpicture}
}
\SetBgScale{1}
\SetBgAngle{0}

\thispagestyle{empty}

\begin{document}

\begin{flushright}
\begin{tikzpicture}
\node[draw, double, rounded corners, scale=2, text height=25pt,
anchor=north west, align=center] (15,0) {Name:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ \\ Date: \_\_\_\_\_\_\_\_\_\_\_};
\end{tikzpicture}
\end{flushright}

\end{document}


Which works, except it gives two errors:

Package geometry Warning: Over-specification in h'-direction.width' (483.69684pt) is ignored.

and

Package geometry Warning: Over-specification in v'-direction.height' (731.23582pt) is ignored.

I'm not really sure what is causing this, or how to fix it. Could someone explain?

I looked at this question, but I didn't really understand the explanation given.

You call a first time geometry with option margin=25mm, then load it again and specify left=10mm, right=10mm, top=10mm. This contradicts the previous option, since margin=25mm means
left=25mm, right=25mm, top=25mm, bottom=25mm.
Furthermore, you specify height and width. But width is what remains from paper width after you've substracted left + right. Actually, you have no choice, and this specification will be ignored.
• I think so. total= is the same as body+ optionally margins if I remember well? – Bernard Aug 13 '16 at 0:11