I have the following code to draw the border of the title page. I want to put the margin for the border on the left and right. How can I set left margin of 1.5 inch and right 1 inch.
\documentclass[12pt, a4, openany, oneside]{book}
\renewcommand{\baselinestretch}{1.6}
\usepackage[left=1.5in,top=1.0in,right=1.0in,bottom=1.0in]{geometry}
%\setlrmarginsandblock{2.5cm}{2.5cm}{*} % Left and right margin
%\setulmarginsandblock{3cm}{3cm}{*} % Upper and lower margin
%\checkandfixthelayout
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{1.25ex \@plus .25ex}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{%
\@startsection {subparagraph}{5}{\z@ }{2.25ex \@plus 1ex
\@minus .2ex}{-1em}{\normalfont \normalsize \bfseries }}%
\usepackage{enumitem}
\setlistdepth{9} % deep listing to 6th level (9- 6(by default))
\newlist{myenumerate}{enumerate}{9} % deep listing
\setlist[myenumerate]{label*=\arabic*.}
\setlist[enumerate]{label*=\arabic*.} % for default level
%margin
%\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage[english]{babel}
\begin{document}
%paragraph spacing
%\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\begin{titlepage}
\begin{tikzpicture}[remember picture,overlay,inner sep=0.5,outer sep=0]
\draw[blue!70!black,line width=4pt] ([xshift=-1.5cm,yshift=-2cm]current page.north east) coordinate (A)--([xshift=1.5cm,yshift=-2cm]current page.north west) coordinate(B)--([xshift=1.5cm,yshift=2cm]current page.south west) coordinate (C)--([xshift=-1.5cm,yshift=2cm]current page.south east) coordinate(D)--cycle;
\draw ([yshift=0.5cm,xshift=-0.5cm]A)-- ([yshift=0.5cm,xshift=0.5cm]B)--
([yshift=-0.5cm,xshift=0.5cm]B) --([yshift=-0.5cm,xshift=-0.5cm]B)--([yshift=0.5cm,xshift=-0.5cm]C)--([yshift=0.5cm,xshift=0.5cm]C)--([yshift=-0.5cm,xshift=0.5cm]C)-- ([yshift=-0.5cm,xshift=-0.5cm]D)--([yshift=0.5cm,xshift=-0.5cm]D)--([yshift=0.5cm,xshift=0.5cm]D)--([yshift=-0.5cm,xshift=0.5cm]A)--([yshift=-0.5cm,xshift=-0.5cm]A)--([yshift=0.5cm,xshift=-0.5cm]A);
\draw ([yshift=-0.3cm,xshift=0.3cm]A)-- ([yshift=-0.3cm,xshift=-0.3cm]B)--
([yshift=0.3cm,xshift=-0.3cm]B) --([yshift=0.3cm,xshift=0.3cm]B)--([yshift=-0.3cm,xshift=0.3cm]C)--([yshift=-0.3cm,xshift=-0.3cm]C)--([yshift=0.3cm,xshift=-0.3cm]C)-- ([yshift=0.3cm,xshift=0.3cm]D)--([yshift=-0.3cm,xshift=0.3cm]D)--([yshift=-0.3cm,xshift=-0.3cm]D)--([yshift=0.3cm,xshift=-0.3cm]A)--([yshift=0.3cm,xshift=0.3cm]A)--([yshift=-0.3cm,xshift=0.3cm]A);
\end{tikzpicture}
\begin{center}
\vspace{.3cm}
\textbf{\large{\uppercase{This is the title of the thesis}}}
\end{center}
\end{titlepage}
\end{document}
Best Answer
The good news is that everything is drawn relative to coordinates (A) (B) (C) and (D). The bad news is that these are not the interior edges. Those (note the corners) are 0.5cm further in.
This solution works for any text area. Just for fun, I got rid of all the
[yshift=...,xshift=...]
notation and used calc notation instead.