Как полностью развернуть текст заголовка в названии главы и частично в заголовке?

Как полностью развернуть текст заголовка в названии главы и частично в заголовке?

Извлекая выгоду из этогоОтвет TeX.SEЯ написал этот код:

\documentclass[a5paper,openany,14pt,]{extbook}

\usepackage[left=2.34cm, right=2.34cm, top=2.66cm]{geometry}

\usepackage[explicit]{titlesec}

\titleformat{\chapter}[hang]
{\titlerule[2pt]\vspace{3pt}\titlerule\bfseries\Large\filleft}
{\Huge\thechapter}
{1ex}
{#1\filright \markboth{#1}{}} % add the leftmark <<<

\usepackage{fancyhdr} 

\fancypagestyle{plain}{%
  \fancyhf{}
  \renewcommand{\headrulewidth}{0pt}
  \fancyhead[RO]{\fontsize{14pt}{14pt}\selectfont\thepage}
  \fancyhead[C]{\leftmark} 
\fancyhead[LE]{\fontsize{14pt}{14pt}\selectfont\thepage}
}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter{}:
#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}{}}
\pagestyle{plain}

\usepackage{soul} % package to stretch the chapter name horizontally

\begin{document}

\sodef\spaceout{}{0pt plus 1fil}{.4em plus 1fil}{0pt}
\chapter*{\makebox[\linewidth][l]{\spaceout{INTRODUCTION}}}% \chaptermark{Introduction}%
% If I add \chaptermark{Introduction  then "Chapter 0: Introduction" appears which is not desired.
 
    Alright, here we are...
    
    \pagebreak
    
    Alright, one more page...
    
    \chapter*{\makebox[\linewidth][l]{\spaceout{HERE WE GO NOW}}}
    Alright, here we are...
    
    \pagebreak
    
    Alright, one more page...
\end{document}

чтобы получить вид макета, показанный на правом снимке экрана:

введите описание изображения здесь

Как это сделать?

решение1

Не следует использовать разметку в аргументе to \chapter: управлять набором текста в аргументе to \titleformatи в заголовках.

Я бы не стал переопределять plainстиль, поскольку он используется на начальных страницах глав.

Вам не хватает набора headheight.

Вместо soul, я считаю, лучше использовать microtype.

Наконец, размер шрифта 14pt на бумаге формата a5? Вы уверены?

\documentclass[a5paper,openany,14pt,]{extbook}

\usepackage[
  left=2.34cm,
  right=2.34cm,
  top=2.66cm,
  headheight=17pt,
]{geometry}
\usepackage{microtype}
\usepackage{fancyhdr} 
\usepackage{titlesec}

\titleformat{\chapter}[hang]
  {\titlerule[2pt]\vspace{3pt}\titlerule\bfseries\Large\filleft}
  {\Huge\thechapter}
  {1ex}
  {\filright\spaceoutchaptertitle} % add the leftmark <<<

\newcommand{\spaceoutchaptertitle}[1]{\textls{\MakeUppercase{#1}}}

\fancypagestyle{thesis}{%
  \fancyhf{}%
  \renewcommand{\headrulewidth}{0pt}
  \fancyhead[RO]{\fontsize{14pt}{14pt}\selectfont\thepage}%
  \fancyhead[C]{\textls{\MakeUppercase{\leftmark}}}%
  \fancyhead[LE]{\fontsize{14pt}{14pt}\selectfont\thepage}%
}
\renewcommand{\chaptermark}[1]{%
  \markboth{\chaptername\ \thechapter{}: #1}{}%
}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\pagestyle{thesis}

\begin{document}

\chapter*{Introduction}
\markboth{Introduction}{Introduction}
 
    Alright, here we are...
    
    \pagebreak
    
    Alright, one more page...
    
    \chapter{Here we go now}
    Alright, here we are...
    
    \pagebreak
    
    Alright, one more page...
\end{document}

введите описание изображения здесь

Связанный контент