1. The paper size setting
% Packages introduced layout setting
\ usepackage {geometry}Use the command: \ geometry {papersize = {width, height}}
如:\geometry{papersize={20cm, 15cm}}
2. The margin settings
% Packages introduced layout setting
\ usepackage {geometry}Use the command: \ geometry {left = left margin, right = right margin, top margin = upper, bottom = bottom margin}
如:\geometry{left=5cm,right=5cm,top=5cm,bottom=5cm}
3. The header and footer settings
% Introducing header and footer required packages
\ fancyhdr usepackage {}
\} Fancy {pagestyle
- % Set Header
\ lhead {left header}
\ chead header {}
\ {Header Right} rhead- % Set Header
\ lfoot {left footer}
\ {cfoot footer}
\ {RFoot} Right footer- As follows:
% Set Top
\ lhead {Zhang a}
\ {chead University}
\ rhead {\ Today}
% Set Header
\ lfoot {left footer}
\ cfoot {\ thepage}
\ RFoot right-footer {}
4. Set horizontal dividing lines
Command is as follows:
\ renewcommand {\ headrulewidth} {parting line width}
\ {renewcommand \ headwidth} {\ textwidth}
\ {renewcommand \ footrulewidth} {} width of the dividing lineExamples are as follows:
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\headwidth}{\textwidth}
\renewcommand{\footrulewidth}{0.4pt}
The line spacing and pitch segment
% Line spacing used in the package
\ usepackage {setspace}
Command: Set line spacing, 1.5
\ onehalfspacingSet paragraph spacing
\ addtolength {\ parskip} {} widthExamples such as:
\addtolength{\parskip}{0.4em}
Example:
Code:
%导言区
\documentclass{ctexart}
%导入版面设置的宏包
\usepackage{geometry}
%导入页眉页脚需要的宏包
\usepackage{fancyhdr}
\pagestyle{fancy}
%行间距所用的包
\usepackage{setspace}
%设置纸张的大小
\geometry{papersize={20cm, 15cm}}
%设置边距
\geometry{left=2cm,right=5cm,top=5cm,bottom=5cm}
%设置页首
\lhead{陆某某}
\chead{理工大学}
\rhead{\today}
%设置页眉
\lfoot{左页脚}
\cfoot{\thepage}
\rfoot{右页脚}
%设置横线分割的宽度
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\headwidth}{\textwidth}
\renewcommand{\footrulewidth}{0.4pt}
%设置行间距,1.5倍
\onehalfspacing
%设置段落间距
\addtolength{\parskip}{0.4em}
%正文区
\begin{document}
秋风用时光的旋律,用桂花的芬芳、苹果的馨香、菊花的灿烂、牵牛花的奔放、一串红的艳丽,把一望无际的田野乡村,演绎得在自然中沉醉,渲染得天地间空旷而又阳刚。
酷热的夏天刚刚过去,秋风吹来,秋牵着一个个节气的手,舞动着长袖,用婀娜多姿的舞姿,用变幻神奇的旋律,动听的音符,把蓝天吹得一会白云飘飘,一会云蒸霞蔚,一会仙女舞袖,一会又涌来千顷碧波。更让那成千上万得雀鸟,不顾辛苦劳顿,路途遥远,赶赴银汉,为牛郎织女架起一座相会的鹊桥,就为这对生离死别的鸳鸯说上一晚悄悄话。
\end{document}
running result: