Latex 章とセクションの書式設定

Latex 章とセクションの書式設定


返却された論文には、書式の修正がいくつか記されています。私は LaTeX の経験が浅く、基本的な機能しか使用できません。章と節の見出しの書式設定に問題があります。titlesec のパッケージ詳細を読み通そうとしましたが、ドキュメントに困惑しています。構造やコマンドが理解できないようです。以下は、章の見出し用に私が見つけて修正したコードですが、よくわかりません。

     \usepackage{titlesec}
     \titleformat{\chapter}[display] 
     {\doublespacing\rmfamily\fontsize{12pt}{12pt}}
     {\MakeUppercase{\chaptertitlename\ \thechapter}\filcenter}{12pt}{\centering\uppercase}
     {\fontsize{12pt}{12pt}\filcenter} 

私が行うべき修正は次のとおりです:

     revise format for first page of each chapter:
     --use uniform double line spacing
     --use 12 point font size for chapter number and chapter title
     --use all caps for the word CHAPTER and for all words in chapter title
     --do not use bold font

      Revise all first level subheads:
      --centered on a line by itself
      --use 12 point font
      --use headline style caps
      --use underline
      --no extra blank space above or below subhead (spacing should match 
        spacing between lines of text)
      --do not use bold font

ご協力いただける場合は、ぜひお知らせください。

ありがとう、テリー

答え1

おそらく、これで始めるのに十分でしょう。セクションに番号が付けられているかどうかは、説明からは明らかではありません。番号が付けられていない場合は、セクション定義から を削除します。また、セクションの前と章の後の間隔がどの程度であるべきかも明確ではないため、それらに対して\thesection\hspace*{ 1em}適切なコマンドを追加する必要があります。\titlespacing

\documentclass[12pt]{book}
\usepackage[explicit]{titlesec}
\usepackage[normalem]{ulem}
\usepackage{textcase}
\usepackage{setspace}
\titleformat{\chapter}[display]%
     {\doublespacing\normalfont\fillast}
     {\MakeTextUppercase\chaptertitlename\ \thechapter}
     {0pt}{\MakeTextUppercase{#1}}

\titleformat{\section}[block]
  {\normalfont\scshape\fillast}
  {\uline{\thesection\hspace*{ 1em}#1}}
  {0pt}
  {}

\begin{document}

\chapter{This is a chapter that has a really really really long title to show how it will wrap and give you double spacing.}

This is the text that follows the chapter. 

\section{This is a section}
This is the text that follows the section.

\end{document}

コードの出力

関連情報