Here is a MWE:
\documentclass[fontsize=11pt,pagesize=auto,hidelinks,cleardoublepage=empty,parskip]{scrbook}
\usepackage[paperheight=10in,paperwidth=8in,margin=2cm,heightrounded,bindingoffset=5mm,showframe=false]{geometry}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{positioning}
\usepackage[explicit]{titlesec}
\usepackage{blindtext}
\titleformat{\chapter}
{\gdef\chapterlabel{} \normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter\%}}{0pt}
{
\begin{tikzpicture}[remember picture,overlay]%
\node(main)[yshift=-7cm] at (current page.north west)
{%
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=black] (0,0) rectangle (\paperwidth,7cm);
\node[anchor=east,yshift=-3cm] at (current page text area.north east) {\color{white}\large Chapter \thechapter};%
\node[anchor=east,yshift=-4cm] at (current page text area.north east) {\color{white} #1};%
\end{tikzpicture}
};%
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{0pt}{3cm}[0pt]
\begin{document}
\chapter{Introduction}
\blindtext[4]
\end{document}
It renders as:
Notice how the right edge of the chapter title does not align with the right edge of the body text. Why is this? I can't figure out what I'm doing wrong here.






titlesecand a KOMA class together – Mar 01 '18 at 10:36titlesecare not compatible to each other. – Mar 01 '18 at 10:39