[Tex/LaTex] Tikz left margin indentation

indentationmarginstikz-pgf

Is there a better way to remove the indentation of a tikz figure?
What I have so far is this

\documentclass{article}
\usepackage[top=0cm, bottom=0cm, left=0cm, right=0cm]{geometry}
\begin{document}

% \noindent
\begin{tikzpicture}[remember picture, overlay]
    \fill[titlepagecolor] (0, -4) rectangle (15, -8); 
\end{tikzpicture}

\end{document}

If I don't use noindent there is a small white space to the left, which I want to avoid to make a big rectangle across the page

Best Answer

You can redefine the invocation of \tikzpicture to prepend itself with a \noindent which will alleviate the need for you to do it manually each time.

\documentclass{article}
\usepackage[top=0cm, bottom=0cm, left=0cm, right=0cm]{geometry}
\usepackage{tikz}
\let\svtikzpicture\tikzpicture
\def\tikzpicture{\noindent\svtikzpicture}
\begin{document}
% \noindent
\begin{tikzpicture}[remember picture, overlay]
    \fill (0, -4) rectangle (15, -8); 
\end{tikzpicture}
\end{document}