问题:1 我想要将我的起始文本精确地放在顶部规则的下方,我的意思是我怎样才能减少第一行和顶行之间的边距?
问题:2 如何在顶行和底行下方添加一些文本?我甚至想在顶部右侧添加页码。
梅威瑟:
\documentclass[a4paper,14pt]{extarticle}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage[left=0.70in, right=0.70in, top=0.70in, bottom=0.70in]{geometry}
%page style
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{2pt}
\begin{document}
Starting of the document
\end{document}
答案1
如果顶部规则和文本主体之间不应该有空格,请使用headsep=0pt
选项geometry
。但结果看起来很奇怪……
\documentclass[a4paper,14pt]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage[left=0.70in, right=0.70in, top=0.70in, bottom=0.70in,
headsep=0pt,% remove space between header and text body
headheight=17pt% suggested by fancyhdr
]{geometry}
%page style
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}% remove the default header and footer entries
\fancyhead[L]{left header entry}
\fancyhead[R]{\thepage}
\fancyfoot[L]{left footer entry}
\fancyfoot[R]{right footer entry}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{2pt}
\begin{document}
Starting of the document
\end{document}