# Chapter title on specific twoside margin position

I have a document that has odd-even rule (twoside class), so there is a wide space on right margin on odd page and wide space on left margin on even page. I would like to put chapter title (right align) on the right margin of even page like this

                                      chapter title*
odd page  [left margin][content][wide right margin]
even page [wide left margin][content][right margin]*


rather than chapter title (right align) on the right margin of odd page

                   chapter title*
odd page  [left margin][content]*[wide right margin]
even page [wide left margin][content][right margin]


which * is used to show the position of the chapter title to particular margin. Is there a way to modify the chapter title format using titlesec?

\documentclass[twoside]{book}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mathpazo}
\usepackage{titlesec, linegoal}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[symbolmax,defaultmathsizes]{mathastext}

\renewcommand{\thechapter}{\Roman{chapter}}

\titleformat{\chapter}[display]{\huge\bfseries\vspace{0.45in}}{\huge\bfseries\thechapter\vspace{-0.2in}\hspace{1ex}\rule[0.1pt]{\linegoal}{1pt}}{2ex}{\filleft}
\titlespacing*{\chapter}{0pt}{0.05in}{0.45in}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\bfseries#1}{}}

\makeatletter
% modified from book.cls - don't use \def unless you **know** it is safe!
\def\@schapter#1{\if@twocolumn
\else
\fi}
\makeatother

\fancyhf{}%
\cfoot{\bfseries\thepage}

\begin{document}

\chapter{Chapter title}

\end{document}

• AFAICT there is no difference between your \@schapter and book \@schapter. In any case, it only affects \chapter*, not \chapter. OTOH, loading titlesec changes everything. – John Kormylo Nov 7 at 14:09

You can redefine \cleardoublepage as described here:

\makeatletter
\renewcommand*\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page \hbox{}\newpage\if@twocolumn\hbox{}%
\newpage\fi\fi\fi}
\makeatother


As explained in the link, the book class uses this command at the end of each chapter.

\documentclass[twoside]{book}

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mathpazo}
\usepackage{blindtext}
\usepackage{titlesec, linegoal}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[symbolmax,defaultmathsizes]{mathastext}

\renewcommand{\thechapter}{\Roman{chapter}}

\titleformat{\chapter}[display]{\huge\bfseries\vspace{0.45in}}{\huge\bfseries\thechapter\vspace{-0.2in}\hspace{1ex}\rule[0.1pt]{\linegoal}{1pt}}{2ex}{\filleft}
\titlespacing*{\chapter}{0pt}{0.05in}{0.45in}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\bfseries#1}{}}

\makeatletter
% modified from book.cls - don't use \def unless you **know** it is safe!
\def\@schapter#1{\if@twocolumn
\else
\fi}
\makeatother

\fancyhf{}%
\cfoot{\bfseries\thepage}

\makeatletter
\renewcommand*\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page \hbox{}\newpage\if@twocolumn\hbox{}%
\newpage\fi\fi\fi}
\makeatother

\begin{document}

\chapter{Chapter title}

\blindtext[2]

\end{document}