\documentclass[12pt,letterpaper]{report}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in,showframe]{geometry}
\usepackage{titlesec}
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
\titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}
\begin{document}
\chapter{INTRODUCTION}
This is the first section.
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Etiam lobortisfacilisis sem. Nullam nec mi et
neque pharetra sollicitudin. Praesent imperdietmi nec ante.
Donec ullamcorper, felis non sodales...
我如何使用 titlesec 包来执行此操作我应该输入什么:
\titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
和:
\titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}
答案1
类似这样的事?
\titleformat{\chapter}[display]
{\filcenter\normalfont\Large\bfseries}
{\MakeUppercase{\chaptertitlename}\ \thechapter}
{20pt}
{}
\titlespacing*{\chapter}{0pt}{0.7in}{20pt}
我有点不明白double space
。我用过20pt
,但你可以用\baselineskip
代替20pt
。
\documentclass[12pt,letterpaper]{report}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in,showframe]{geometry}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\filcenter\normalfont\Large\bfseries}
{\MakeUppercase{\chaptertitlename}\ \thechapter}
{20pt}
{}
\titlespacing*{\chapter}{0pt}{0.7in}{20pt}
\begin{document}
\chapter{INTRODUCTION}
This is the first section.
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Etiam lobortisfacilisis sem. Nullam nec mi et
neque pharetra sollicitudin. Praesent imperdietmi nec ante.
Donec ullamcorper, felis non sodales...
\end{document}