我在定义文档的标题、副标题、副副标题和文本的大小时遇到了一些麻烦。基本上,我想控制大小。正如您在我的示例中所看到的,“子小节”比实际文本小,这对我来说看起来不太好。
\documentclass[twoside,parskip=half]{scrartcl}
\usepackage[british]{babel}
\bibliographystyle{nature}
\usepackage[latin1,utf8]{inputenc}
\usepackage{microtype}
\usepackage[hmarginratio=1:1,columnsep=30pt]{geometry}
\usepackage{geometry}
\geometry{a4paper,left=25mm,right=25mm, top=25mm, bottom=25mm, headsep=10mm}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{paralist}
\usepackage{abstract}
\renewcommand{\abstractnamefont}{\normalfont\bfseries}
\usepackage{titlesec}
\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\arabic{subsection}}
\titleformat*{\subsection}{\normalfont\bfseries}
\titleformat*{\subsubsection}{\normalfont\selectfont}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[C]{Title $\bullet$ Course $\bullet$ 2014}
\setlength{\skip\footins}{10mm}
\title{\fontsize{24pt}{5pt}\selectfont\textbf{Title}}
\subtitle{\fontsize{16pt}{20pt}\selectfont\textbf{Subtitle}}
\author{
\large
\textsc{Name Surname}\\[3mm]
\normalsize University name \\
\normalsize \href{mailto:[email protected]}{[email protected]}
\vspace{-3mm}
}
\date{}
\begin{document}
\maketitle
\thispagestyle{fancy}
\begin{abstract}
Ut venenatis sodales leo et imperdiet. Pellentesque sagittis volutpat feugiat. Nunc in dictum libero. Sed sed dui leo. Curabitur condimentum laoreet metus vitae tempus. Vestibulum id feugiat risus, ac feugiat libero. Mauris ultricies eget risus et venenatis. Donec gravida mauris sed interdum vulputate. Morbi nunc quam, finibus vitae tincidunt a, vulputate eget sapien.
\end{abstract}
\vspace{7mm}
\begin{tabular}{p{1,5cm}p{12,00cm}p{1,5cm}}
&\textbf{Keywords}: keyword 001 $\cdot$ keyword 002 $\cdot$ keyword 003 $\cdot$ keyword 004\\
\end{tabular}
\vspace{11mm}
\begin{multicols}{2}
\section{Section 1}
Vestibulum vel ipsum vel urna iaculis tincidunt ut eu arcu. Etiam in ante dui. Suspendisse porta lacus et facilisis suscipit. Donec congue egestas nunc, ut ullamcorper felis ultricies ut. Vivamus eu lorem risus. Vivamus sollicitudin bibendum ornare. Duis dignissim metus sed eleifend posuere. In consequat aliquet sapien, at faucibus ipsum.
\section{Section 2}
\subsection{Sub-section 1}
\subsubsection{Sub-subsection}
Aliquam ultricies eleifend bibendum. Pellentesque eu augue orci. Integer ut dolor aliquet enim semper aliquam. Suspendisse sit amet volutpat ex. Pellentesque lacinia dignissim molestie. Cras consectetur efficitur purus, id viverra enim tincidunt quis. Morbi sed blandit nulla, eu sodales purus. Aenean nec semper risus. Sed malesuada finibus tellus vitae eleifend. Etiam ut cursus ipsum, ac faucibus ligula. Morbi non est sed ligula fringilla finibus. Sed interdum euismod ex nec tincidunt. Pellentesque ut ipsum enim. Quisque aliquet dolor ac lectus congue, nec pellentesque metus eleifend. Nullam sit amet lacus nulla.
\subsubsection{Sub-section 2}
Phasellus commodo augue vitae enim interdum, et tincidunt leo consectetur. Sed in mi sit amet velit aliquet dapibus. Phasellus ut massa a arcu aliquam rhoncus ultricies quis mi. Cras a tortor egestas, luctus purus a, mollis lacus. Mauris eget molestie neque, dapibus lobortis ligula. Sed id luctus tortor. Donec elementum lacus vitae tincidunt imperdiet. Praesent in facilisis ligula. Nam venenatis sed eros quis consequat. Maecenas sit amet eros sed purus convallis pretium. Suspendisse potenti. Cras sed ultricies diam. Nullam feugiat scelerisque leo vitae facilisis. Praesent quis felis ante. Aenean in justo magna.
\end{multicols}
\end{document}
有什么建议可以改进我的文档吗?
答案1
通常,最好使用文档类和字体标准大小命令提供的机制。示例中的子节字体与普通文本大小相同,如果您希望它更大,请尝试使用\large
。在 KOMA 类中,您可以通过执行此操作\setkomafont
,例如
\setkomafont{subsubsection}{\normalfont\large}
或者如果你只想改变大小而不改变样式
\addtokomafont{subsubsection}{\large}
如果你想明确设置字体大小,那么
\setkomafont{subsubsection}{\normalfont\fontsize{14}{16}\selectfont}
或者
\addtokomafont{subsubsection}{\fontsize{14}{16}\selectfont}
请注意,参数\fontsize
只是数字(表示点大小)而不是尺寸,第二个数字应该大于第一个数字,它表示要用于此字体的行跳过。文档的基本字体大小由fontsize
documentclass 的选项指定,例如
\documentclass[fontsize=12pt]{scrartcl}
正如其他人所说,你不应该使用fancyhdr
或titlesec
。对于你的目的,后者被简单的\setkomfont
命令取代,前者被scrlayer-scrpage
包取代。
至于geometry
包,在您的情况下,您似乎想要精确指定边距,在这种情况下使用此包是唯一的选择。
这是您的示例中其中一些内容的实现。
\documentclass[twoside,parskip=half,numbers=noendperiod,abstract=true]{scrartcl}
\usepackage[british]{babel}
\bibliographystyle{nature}
\usepackage[utf8]{inputenc}
\usepackage{microtype,textcomp}
\usepackage[a4paper,left=25mm,right=25mm,top=25mm,bottom=25mm,
headsep=10mm]{geometry}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{paralist}
\renewcommand*{\thesection}{\Roman{section}.}
\renewcommand*{\thesubsection}{\arabic{subsection}}
\setkomafont{title}{\normalfont\bfseries}
\setkomafont{subtitle}{\normalfont\Large\bfseries}
\setkomafont{subsection}{\normalfont\large\bfseries}
\setkomafont{subsubsection}{\normalfont\large}
\setkomafont{author}{\large}
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{}\ohead{}\chead{\headmark}
\setkomafont{pageheadfoot}{\normalfont}
\markboth{Title \textbullet{} Course \textbullet{} 2014}{Title \textbullet{}
Course \textbullet{} 2014}
\title{Title}
\subtitle{Subtitle}
\author{\textsc{Name Surname}\\[2ex]
\normalsize University name \\
\normalsize \href{mailto:[email protected]}{[email protected]}}
\date{}
\begin{document}
\maketitle
\thispagestyle{scrheadings}
\unskip\vspace{-1.5\baselineskip}
\begin{abstract}
Ut venenatis sodales leo et imperdiet. Pellentesque sagittis
volutpat feugiat. Nunc in dictum libero. Sed sed dui leo. Curabitur
condimentum laoreet metus vitae tempus. Vestibulum id feugiat risus,
ac feugiat libero. Mauris ultricies eget risus et venenatis. Donec
gravida mauris sed interdum vulputate. Morbi nunc quam, finibus
vitae tincidunt a, vulputate eget sapien.
\end{abstract}
\begin{center}
\textbf{Keywords}: keyword 001 \textperiodcentered{} keyword 002
\textperiodcentered{} keyword 003 \textperiodcentered{} keyword 004
\end{center}
\medskip
\begin{multicols}{2}
\section{Section 1}
Vestibulum vel ipsum vel urna iaculis tincidunt ut eu arcu. Etiam in
ante dui. Suspendisse porta lacus et facilisis suscipit. Donec congue
egestas nunc, ut ullamcorper felis ultricies ut. Vivamus eu lorem
risus. Vivamus sollicitudin bibendum ornare. Duis dignissim metus sed
eleifend posuere. In consequat aliquet sapien, at faucibus ipsum.
\section{Section 2}
\subsection{Sub-section 1}
\subsubsection{Sub-subsection}
Aliquam ultricies eleifend bibendum. Pellentesque eu augue
orci. Integer ut dolor aliquet enim semper aliquam. Suspendisse sit
amet volutpat ex. Pellentesque lacinia dignissim molestie. Cras
consectetur efficitur purus, id viverra enim tincidunt quis. Morbi sed
blandit nulla, eu sodales purus. Aenean nec semper risus. Sed
malesuada finibus tellus vitae eleifend. Etiam ut cursus ipsum, ac
faucibus ligula. Morbi non est sed ligula fringilla finibus. Sed
interdum euismod ex nec tincidunt. Pellentesque ut ipsum enim. Quisque
aliquet dolor ac lectus congue, nec pellentesque metus
eleifend. Nullam sit amet lacus nulla.
\subsubsection{Sub-section 2}
Phasellus commodo augue vitae enim interdum, et tincidunt leo
consectetur. Sed in mi sit amet velit aliquet dapibus. Phasellus ut
massa a arcu aliquam rhoncus ultricies quis mi. Cras a tortor
egestas, luctus purus a, mollis lacus. Mauris eget molestie neque,
dapibus lobortis ligula. Sed id luctus tortor. Donec elementum lacus
vitae tincidunt imperdiet. Praesent in facilisis ligula. Nam
venenatis sed eros quis consequat. Maecenas sit amet eros sed purus
convallis pretium. Suspendisse potenti. Cras sed ultricies
diam. Nullam feugiat scelerisque leo vitae facilisis. Praesent quis
felis ante. Aenean in justo magna.
\end{multicols}
\end{document}
回答评论中的补充观点
要在标题下添加一行,请使用
headsepline=true
文档选项,或者更好的方法是\KOMAoptions{headsepline=true}
定义标题样式的地方
要增加脚注空间,请使用包
footnotsep
的选项geometry
。这相当于设置\skip\footins
,但将页面规范保留在一个位置。该
title
元素默认具有大小\huge
,并且上述字体更改命令不会影响这一点。