장 제목의 제목 텍스트를 완전히 확장하고 머리글의 제목 텍스트를 부분적으로 확장하는 방법은 무엇입니까?

장 제목의 제목 텍스트를 완전히 확장하고 머리글의 제목 텍스트를 부분적으로 확장하는 방법은 무엇입니까?

이로 인해 혜택을 받은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

다음을 위해 인수에 마크업을 사용하면 안 됩니다 \chapter. 인수 \titleformat및 헤더의 조판을 관리합니다.

plain스타일은 장 시작 페이지에서 사용되기 때문에 다시 정의하지 않겠습니다 .

을 설정할 수 없습니다 headheight.

대신에 soul를 사용하는 것이 더 낫다고 생각합니다 microtype.

마지막으로 a5paper의 글꼴 크기는 14pt입니까? 확실합니까?

\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}

여기에 이미지 설명을 입력하세요

관련 정보