
さて、これについてはすでに多くの質問が出ていますが、私が探していた答えはまだ見つけられませんでした。
私の論文には、余白とたくさんのテキスト ブロックがある標準的な表紙が必要です。
\topmargin -10mm
\textwidth 160truemm
\textheight 240truemm
\oddsidemargin 0mm
\evensidemargin 0mm
この表紙のレイアウトは本当にひどいので、論文の残りの部分でもこのスタイルを使いたいと思います。
\documentclass{book}
\usepackage{graphics}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
{10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\usepackage{lipsum}
\setcounter{chapter}{2}
\begin{document}
\chapter{Implementation}
しかし、余白は表紙の設定と同じままなので、これを写真と同じように変更したいのですが、どうすればよいのでしょうか?
このスタイルに関連して私が疑問に思ったもう 1 つのことは、黒い四角形の外観をどのように変更できるかということです。目次と紹介ページに灰色のバージョンを表示したいのですが、\chapter*{Introduction} などのページがあると、単に消えてしまいます。
はい、ありがとうございます。灰色のものが欲しかったのですが、フォーマットがおかしいです。
教えていただいたコードを使用しましたが、番号を削除してタイトルを適切な場所に表示させるにはどうしたらよいでしょうか。また、自己紹介のバーが移動した理由もよくわかりません。他の部分では問題ありません。
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
{10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\setcounter{chapter}{0}
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
答え1
こんな感じでしょうか? 余白に関する問題は私にはよく分かりません。余白はパッケージで簡単に設定できます。私は章geometry
のレイアウトを次のように定義しました:numberless
\titleformat
\documentclass{book}
\usepackage{graphics}
\usepackage{geometry}
\geometry{hmargin={3cm, 6cm}}
\usepackage{xcolor}
\usepackage[pagestyles, explicit]{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
{10pt}{\Huge#1}
\titleformat{name = \chapter, numberless}[block]
{\normalfont\Large\filleft}
{\MakeUppercase{\chaptertitle}
}%
{10pt}{\Huge#1\rlap{\hskip0.5em\color{lightgray!50!}\rule[-0.5cm]{6cm}{1.5cm}}}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter*{Introduction}
\setcounter{chapter}{2}
\chapter{Implementation}
\lipsum[1-10]
\end{document}
答え2
もし私があなたの質問を理解したなら、geometry
パッケージを使用して、ドキュメントのページ レイアウトを変更します。geometry
ドキュメントの内部ページの設定をロードし、\newgeometry
タイトル ページのレイアウトを設定するために使用します。このページが出荷されたら、呼び出して、以前に宣言した設定を使用します。次の例はこれを示しています (ページ レイアウトの視覚的なガイドとして\restoregeometry
このオプションを使用しました)。showframe
\documentclass{book}
\usepackage{graphics}
\usepackage[vmargin=2cm,hmargin=3cm,showframe]{geometry}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\raggedleft}
{\MakeUppercase{\chaptertitlename}%
\rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
{10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}
\usepackage{lipsum}
\setcounter{chapter}{2}
\author{The Author}
\title{The Title}
\begin{document}
\newgeometry{
tmargin=-10mm,
textwidth=160truemm,
textheight=240truemm,
lmargin=0mm,
rmargin=0mm
}
\maketitle
\restoregeometry
\chapter{Implementation}
\end{document}
結果: