调整空白

调整空白

我有一个用于报告的模板。现在我已经用 A4 打印了它,但我觉得纸张四边的空白太多了。阅读设置后,我看不出它在哪里设置的。有人知道我该如何更改空白吗?

\documentclass[paper=a4, fontsize=10pt]{scrartcl}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage{fourier} % Use the Adobe Utopia font for the document
\usepackage[english, swedish]{babel}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage[toc,page]{appendix}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{array}
\usepackage{verbatim}
\usepackage{tikz}
\usepackage{changepage} 
\usepackage{enumitem}
\usepackage[justification=centering]{caption}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{calc}
\usepackage{sectsty} % Allows customizing section commands
\usepackage{fancyhdr} % Custom headers and footers
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{\thepage} % Page numbering for right footer
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header

\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{ 
\normalfont \normalsize 
\textsc{University} \\ [25pt]
\horrule{2pt} \\[0.4cm] % Thin top horizontal rule
\huge Title\\ % The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}
\author{Author \\ E-mail: mail}
\date{\normalsize\today} % Today's date or a custom date
\graphicspath {{figures/}}
\begin{document}

答案1

您可以放大DIV。例如:

\documentclass[...,DIV=10]{scrartcl}

然后边距会变小,但比例相同。fontsize=10pt和 的默认paper=a4值为DIV=8

在此处输入图片描述

但是你会收到 KOMA-Script 包的警告typearea

Package typearea Warning: Bad type area settings!
(typearea)                The detected line width is about 17%
(typearea)                larger than the heuristically detected line width.
(typearea)                You should e.g. decrease DIV, increase fontsize
(typearea)                or change papersize.

文本行中的字符太多。请注意,不建议使用超过 60 到 70 个字符的行长。请参阅KOMA-Script 文档请参阅“2.1. 页面布局基础知识”部分以了解更多信息。


顺便说一句,不要caption两次加载包,也不要将包sectsty与 KOMA-Script 类一起使用。这些类有自己的自定义节标题布局的可能性。headheight可以设置为类选项。在不使用 parskip 时设置为不是一个好主意\parindent0pt也许你想添加选项parskip

\documentclass[paper=a4, fontsize=10pt,
  DIV=10,
  headheight=13.6pt,
  %parskip=half-% instead of setting \parindent to 0pt
]{scrartcl}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage{fourier} % Use the Adobe Utopia font for the document
\usepackage[english, swedish]{babel}
\usepackage{amsmath,amsfonts,amsthm}
\usepackage[toc,page]{appendix}
\usepackage{array}
\usepackage{verbatim}

\usepackage{changepage} 
\usepackage{enumitem}
\usepackage[justification=centering]{caption}

\usepackage{tikz}% loads also graphicx and xcolor
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{calc}

\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\ofoot*{\pagemark}

\numberwithin{equation}{section}
\numberwithin{figure}{section}
\numberwithin{table}{section}

\setlength\parindent{0pt}% <- maybe you want to use class option parskip?

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\newcommand{\horrule}[1]{\noindent\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height

\title{ 
\normalfont \normalsize 
\textsc{University} \\ [25pt]
\horrule{2pt} \\[0.4cm] % Thin top horizontal rule
\huge Title\\ % The assignment title
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}
\author{Author \\ E-mail: mail}

\date{\normalsize\today} % Today's date or a custom date
\graphicspath {{figures/}}

\usepackage{blindtext}
\begin{document}
\maketitle
\selectlanguage{english}% blindtext does not have a swedish version
\blinddocument
\Blindtext[15]
\blinddocument
\end{document}

答案2

您可以通过在前言中设置偏移量来减少页面的空白。例如

\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}

相关内容