
방금 정말 좋은 장 제목을 몇 개 발견했습니다.
그러나 규칙을 여백에서 확장하여 장 앞 페이지에 그림을 배치하고 다음(장 제목) 페이지에 캡션을 배치하는 방법을 정확히 알 수 없습니다. (바닥글에 약간의 팁도 있으면 좋을 것 같습니다.)
다른 페이지의 레이아웃은 거의 동일해 보입니다.
답변1
해결책은 다음과 같습니다. 패키지를 사용하여 하나의 선택적 인수와 두 개의 필수 인수가 있는 xparse
새 명령을 정의했습니다 . \ChapIma
선택적 인수는 ToC에 사용되는 텍스트입니다. 첫 번째 필수 인수는 문서의 텍스트이고 세 번째 필수 인수는 해당 이미지가 포함된 파일의 이름입니다.
패키지 titlesec
는 장 제목 형식을 사용자 정의하는 데 사용되었습니다.
\Caption
또한 표준 캡션으로 작동하지만 여백 메모용으로 예약된 공간에 텍스트를 쓰는 또 다른 명령을 정의했습니다 . 이 명령은 해당 장의 텍스트 첫 번째 줄 어딘가에서 호출되어야 합니다.
패키지 caption
는 여백 메모의 캡션을 사용자 정의하는 데 사용되었습니다(레이블 억제).
패키지 lettrine
는 드롭 캡을 생성하는 데 사용되었습니다.
나는 페이지를 재정의하기 위해 패키지( 님의 옵션이 제대로 동작하도록 fancyhdr
할 수 없어서 사용해야 했습니다 )를 사용했습니다 . 또한 다른 페이지의 페이지 스타일도 정의했습니다.titlesec
pagestyles
fancyhdr
plain
\documentclass[twoside]{book}
\usepackage{xparse,ifthen}
\usepackage[calcwidth]{titlesec}
\usepackage{changepage}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{fancyhdr}
\usepackage{marginnote}
\usepackage{lettrine}
\usepackage{lipsum}
\newlength\mylen
\DeclareDocumentCommand\ChapIma{omm}
{\let\cleardoublepage\relax
\ifthenelse{\isodd{\value{page}}}
{\mbox{}\clearpage}{\mbox{}\clearpage\mbox{}\clearpage}%
\resizebox{.9\textwidth}{.9\textheight}{\includegraphics{#3}}
\mbox{}\thispagestyle{empty}\clearpage
\IfNoValueTF{#1}{\chapter{#2}}{\chapter[#1]{#2}}
}
\DeclareDocumentCommand\Caption{om}
{\marginnote{\parbox{\marginparwidth}{%
\captionsetup[figure]{labelformat=empty}
\IfNoValueTF{#1}{\captionof{figure}{#2}}{\captionof{figure}[#1]{#2}}
}%
}%
}
\titleformat{\chapter}[display]
{\Huge\normalfont\sffamily}{}{2pc}
{\setlength\mylen{0pt}%
\addtolength\mylen{\marginparwidth}%
\addtolength\mylen{\marginparsep}\raggedleft
}
[\vspace{-20pt}%
{%
\begin{adjustwidth}{}{-\mylen}
\makebox[\linewidth][r]{%
\rule{\dimexpr\titlewidth+\mylen\relax}{0.4pt}%
}%
\end{adjustwidth}%
}%
]
\titlespacing*{\chapter}{0pt}{1cm}{7cm}
\renewcommand\chaptermark[1]{\markboth{#1}{}}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[OR]{\sffamily\small\MakeUppercase{\leftmark}~~\oldstylenums{\thepage}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyfootoffset[OR]{\dimexpr\marginparsep+\marginparwidth\relax}
}
\fancyhf{}
\fancyfootoffset[OR]{\dimexpr\marginparsep+\marginparwidth\relax}
\fancyfootoffset[EL]{\dimexpr\marginparsep+\marginparwidth\relax}
\fancyfoot[OR]{\small\sffamily\MakeUppercase{\leftmark}~~\oldstylenums{\thepage}}
\fancyfoot[EL]{\small\sffamily\oldstylenums{\thepage}~~\MakeUppercase{\rightmark}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
\renewcommand\chaptermark[1]{\markboth{#1}{}}
\renewcommand\sectionmark[1]{\markright{#1}}
\begin{document}
\tableofcontents
\ChapIma{Preface}{ctanlion}
\lettrine{T}{his} is some initial text\Caption{This is the caption for the figure; this is just some test text}
\lipsum[1-5]
\ChapIma{Introduction}{ctanlion}
\lipsum[1]
\section{Qu'ran manuscripts}
\lipsum[1-14]
\end{document}
다음은 결과 문서의 4페이지 이미지입니다.
예제에 사용된 CTAN 사자는 Duane Bibby가 그린 것입니다.
답변2
패키지 를 사용하여 titlesec
사용자 정의 제목 스타일을 만들 수 있습니다.
\documentclass{scrreprt}
\usepackage{titlesec}
\usepackage{lipsum}
\titleformat{\chapter}[display]{\Huge\sffamily}{}{3pc}{\raggedleft}[\footrule\vspace{8cm}]
\begin{document}
\chapter{Preface}
\lipsum
\end{document}
맞춤 바닥글을 추가하려면 다음 fancyhdr
패키지를 사용하세요.
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{}
\rfoot{\chaptername\ \thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
여백 너비를 조정하려면 다음 geometry
패키지를 사용하십시오.
\usepackage[twoside,right=5cm]{geometry}