How to place tikz elements within a custom paper geometry to reach all four corners, with margins

I am trying to design a book cover for a document, the pages of which will be printed on 8.5"x11" letter paper, as a 17"x11" document. I have added into the geometry the margins I have found online regarding bleed (i.e. a 0.125" border on each side). But for some reason, the output is wrong, as one can tell by compiling this MWE:

MWE on Overleaf

Am I right in thinking that this should all be manageable from the Geometry options? If so, which ones am I not using correctly?

Here is the code for the MWE:

\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage[paperwidth=11in,paperheight=17in,layoutwidth=10.75in,layoutheight=16.75in,left=0.125in,right=0.125in,top=0.125in,bottom=0.125in,bindingoffset=0in, landscape=true, marginparwidth=0in, marginparsep=0in]{geometry}
\begin{document}
\begin{tikzpicture}[every node/.style={inner sep=0,outer sep=0}]
\draw[draw=black] (0,0) rectangle ++(1in,1in) node[pos=.5] {NW};
\draw[draw=black] (15.75in,0) rectangle ++(1in,1in) node[pos=.5] {NE};
\draw[draw=black] (0,9.75) rectangle ++(1in,1in) node[pos=.5] {SW};
\draw[draw=black] (15.75in,9.75) rectangle ++(1in,1in) node[pos=.5] {SE};
\end{tikzpicture}
\end{document}


And here is the output:

Here are the aspects of this output that surprise me:

• North and South are inverted (the four cardinal points are written using North-East, North-West, South-East and South-West acronyms).
• the top margin looks like it is correct, but the left margin looks like it is double (or more) the expected margin
• the width of the paper doesn't seem right since I would expect my East squares to be fully visible, with a 0.125 extra margin.
• whereas the width seems too short, the hight seems too long as I expect the south-most boxes to be at the complete bottom...

Perhaps my problem is with the tikz coordinate system rather than with the geometry? In any event, I wish to be able to confirm my understanding of where the margins are using tickz because the elements of my bookcover will be drawn with tikz. Thanks!

A couple of things:

1. You can use the nodes current page.north wast ... current page.south west to draw the rectangles with TikZ. These are exactly at the corners, so if you want to respect the margins use relative coordinates.
2. The tikzpicture is too big, so you need to overlay it.

Something like this:

\documentclass[12pt]{article}
\usepackage{tikz}
% if you want to change the margin
\newlength{\mymargin}
\setlength{\mymargin}{0.125in}
\usepackage
[
paperwidth=11in,paperheight=17in,layoutwidth=10.75in,layoutheight=16.75in,
left=\mymargin,right=\mymargin,top=\mymargin,bottom=\mymargin,
bindingoffset=0in,landscape=true,marginparwidth=0in,marginparsep=0in
]{geometry}
\begin{document}
\begin{tikzpicture}[remember picture,overlay,every node/.style={inner sep=0,outer sep=0}]
\draw[draw=black] (current page.north west) ++ ( \mymargin,-\mymargin) rectangle ++( 1in,-1in) node[pos=.5] {NW};
\draw[draw=black] (current page.north east) ++ (-\mymargin,-\mymargin) rectangle ++(-1in,-1in) node[pos=.5] {NE};
\draw[draw=black] (current page.south west) ++ ( \mymargin, \mymargin) rectangle ++( 1in, 1in) node[pos=.5] {SW};
\draw[draw=black] (current page.south east) ++ (-\mymargin, \mymargin) rectangle ++(-1in, 1in) node[pos=.5] {SE};
% only to show the paper
\draw[red, line width=2mm] (current page.north west) rectangle (current page.south east);
\end{tikzpicture}
\end{document}


• Thanks, I think this solves my problem. Will check the other answer and edit my own question with some details. Could you please explain 1. how you knew that my tikz picture was too big, and 2. describe what "remember picture,overlay" options are for in this case? Because from what I read, this hasto do with referencing from other pages, so I do not understand why these options are part of the key to the correct answer. Thanks! Jun 3 at 21:57
• @sg1234. For the first question pdflatex launches an overfull warning with your code (in my computer, with TL0222). And for the second, overlay ignores the picture when computing the bounding box, and (I think) just because that remember picture remembers the position for a second compilation. Jun 4 at 6:47

Oh, almost the same answer as of Juan Castaño ...

Edit: but I wasn't aware that I was late for 13 minutes (apparently was my internet congesting, since i didn't see answer before my loading ...). Now I extend my original answer with some more guessing, what OP is after ;-)

It is not very clear where you like to have boxes. At border of page or at border of text area? Also in your geometry definition is not clear to me:

• Why is layoutwidth=10.75in much smaller than width defined by page margin?
• What should designate your boxes:
• just a corners of page? Than result is the following (I increase marin size, that boxes are better visible):

(red lines show text area borders)

\documentclass[12pt]{article}
\newlength{\pagemargin}
\setlength{\pagemargin}{0.25in}
\usepackage[paperwidth=11in,paperheight=17in,
layoutwidth=10.75in,layoutheight=16.75in,
margin=\pagemargin, bindingoffset=0in,
landscape=true,
marginparwidth=0in, marginparsep=0in
]{geometry}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[
remember picture, overlay,
]
\draw (current page.north west) rectangle
++( \pagemargin,-\pagemargin) node[midway] {NW};
\draw (current page.north east) rectangle
++(-\pagemargin,-\pagemargin) node[midway] {NE};
\draw (current page.south west) rectangle
++( \pagemargin, \pagemargin) node[midway] {SW};
\draw (current page.south east) rectangle
++(-\pagemargin, \pagemargin) node[midway] {SE};
\end{tikzpicture}
\end{document}

• border of text area? In this case MWE can be:
\documentclass[12pt]{article}
\newlength{\pagemargin}
\setlength{\pagemargin}{0.25in}
\usepackage[paperwidth=11in,paperheight=17in,
layoutwidth=10.75in,layoutheight=16.75in,
margin=\pagemargin, bindingoffset=0in,
landscape=true,
marginparwidth=0in, marginparsep=0in
]{geometry}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{tikz}

\usepackage{tikzpagenodes}

\begin{document}
\begin{tikzpicture}[
remember picture, overlay,
]
\draw (current page text area.north west)
rectangle ++(-\pagemargin,+\pagemargin) node[midway] {NW};
\draw (current page text area.north east)
rectangle ++(+\pagemargin,+\pagemargin) node[midway] {NE};
\draw (current page text area.south west)
rectangle ++(+\pagemargin,-\pagemargin) node[midway] {SW};
\draw (current page text area.south east)
rectangle ++(+\pagemargin,-\pagemargin) node[midway] {SE};
\end{tikzpicture}
\end{document}


• or you may like that text area is from left margin to right margin of page. In this you need to delete geometry option layoutwidth=10.75in,layoutheight=16.75in, in the first example. Then the result will be:

• I wonder, what is purpose of this rectangle. Some document class, as is memoir, has option to show crop mark, otherwise you may use crop package for defining crop marks (whatever they marks).
• This answer is very useful as well. 1. I thought that layoutWidth was with respect to pageWidth, and that since I was rotating the page (orientation=landscape) this would become the layout height. 2. the 4 boxes were supposed to be at the 4 corners, but leaving the 0.125" margin free, so so exactly like in Juan Castaño's answer in fact. Your last example is closest to what I have in mind. The purpose is to desin the cover (front and back attached, with small spine in the middle) of a book, the 0.125margins are for the bleed in this case. Thanks for the crop package, I will check it out! Jun 3 at 22:06