这是我的代码:
%\documentclass{article}
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage[margin= 1 in]{geometry}
\addtolength{\topmargin}{1.75in}
\addtolength{\textheight}{- .1 in}
%\documentclass[a4paper]{article}
%\usepackage{simplemargins}
%\usepackage[square]{natbib}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
\pagenumbering{gobble}
\Large
\begin{center}
Simple Single Page Abstract template\\
\hspace{10pt}
% Author names and affiliations
\large
Arthur Author$^1$, Cecilia CoAuthor$^2$ \\
\hspace{10pt}
\small
$^1$) First affiliation\\
[email protected]\\
$^2$) Second affiliation
\end{center}
\hspace{10pt}
\normalsize
This is a simple one-page abstract template. Please keep your abstract length at one page. The abstract should be in English. You may include figures and pictures in your abstract, as long as they fit in the single page limit.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? (Cicero, 45 BCe)
\end{document}
我需要除顶部边距之外的每个边距都是 1 英寸,但我不知道为什么顶部边距看起来大于 1.75 英寸(我需要它是 1.75 英寸)?有人可以帮我调整一下吗?
另外,我想将摘要页面作为我的文档的一部分而不是整个文档,有人可以帮我调整代码来实现这一点吗?
最后一件事,有人可以帮我删除代码中的包和文档类中的冗余吗?
答案1
因此,据我从评论中理解的讨论,您正在寻找的内容可能是这样的:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, vmargin=1in, top=1.75in, bottom = 1in]{geometry}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
%Put whatever comes before your abstract here
\lipsum[1]
\newpage
\newgeometry{top=1in,bottom=1in,vmargin=1in} % or whatever only your abstract is supposed to look like
\section{Abstract}
\lipsum[1-2]
\newpage
\restoregeometry % restores the geometry from the preamble
\lipsum[1-2]
\end{document}
一些评论:
您的页面可以有一个尺寸定义,因此可以是:
a4paper
,usletter
或total={}
。除此之外,您还可以使用
top
、bottom
、left
、来定义边距right
。如果垂直或水平边距相同,则可以使用hmargins
和vmargins
代替,或者margins={}
如果所有边距都相同,则可以使用 。您可以使用和对各个页面使用不同的几何图形,
\newgeometry{}
然后\restoregeometry
恢复原始几何图形。