更改边距

更改边距

我想将边距改为 1.5 左 1 英寸 上\下\右 请帮忙,但对我不起作用...我试了很多

\documentclass[letterpaper, 12pt]{report}
\newcommand{\pix}{jpg}
\special{papersize=8.4375in,11in}
\usepackage{amsmath, amssymb, amsfonts, wasysym, tipa, textcomp, amsbsy, graphics,subcaption, graphicx, setspace, fancyhdr, MnSymbol, mathrsfs , color,placeins, lipsum,xfrac,amsthm,listings, multirow}
\usepackage{amsmath, amssymb, amsfonts, mathrsfs,mathtools}
\usepackage{enumerate}
%indentfirst-to indent
%\usepackage{booktabs}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[labelfont=bf]{caption}
%font=small,
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
\usepackage[letterpaper,left=1.9377in, right=1in, footskip=.9in]{geometry}
\geometry{verbose, tmargin=-1in, bmargin=1.219in}

\usepackage{indentfirst}
\usepackage{float}
\restylefloat{table} % to prevent tables repositioning

%\usepackage{tkz-graph}
%\usetikzlibrary{arrows}
\usepackage{pinlabel}

%\usepackage[toc,page]{appendix}
\usepackage{etoolbox}

%\usepackage[titletoc,title]{appendix}
\usepackage{appendix}

\usepackage[dotinlabels]{titletoc}
\setcounter{tocdepth}{2}
\usepackage[md]{titlesec}

\makeatletter
\renewcommand{\@makechapterhead}[1]{\setlength{\voffset}{-0.94in}
    { \parindent \z@ \raggedright \normalfont
        \fontsize{\@xivpt}{12pt}\centering
        \vspace{10pt}                                % add vertical space
        \ifnum \c@secnumdepth >\m@ne
        \normalfont\scshape \@chapapp\space \thechapter % Chapter number
        \par\nobreak
        \vskip 5\p@
        \fi
        \interlinepenalty\@M
        \normalfont \scshape #1\par                         % chapter title
        \vspace{-4pt}%                                 % add vertical space
        \nobreak
        \vskip 1\p@
}}
\renewcommand*\@makeschapterhead[1]{%
    %\vspace*{50\p@}%
    {\parindent \z@ \centering
        \normalfont
        \interlinepenalty\@M
        \normalfont \scshape #1\par\nobreak

}}
\makeatother

\usepackage{fancyhdr}
\pagestyle{plain}

\makeatletter
\fancypagestyle{plain}{%
    \fancyhf{} % clear all header and footer fields
    \fancyfoot[C]{\footskip 1in\thepage} % except the center
    \footskip 0.4 in
    \renewcommand{\headrulewidth}{-1pt}
    \renewcommand{\footrulewidth}{0pt}}
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0in}
\usepackage{graphicx}\DeclareGraphicsRule{.bmp}{bmp}{}{}
%\renewcommand\section{\@startsection{section}{1}{\z@}%
% {0.5\p@ \@plus 0\p@ \@minus 0\p@}%
% {0.5\p@ \@plus 0\p@ \@minus 0\p@}%
% {\normalfont\bfseries\boldmath\centering
% }}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}[theorem]{Example}
\numberwithin{section}{chapter}
\theoremstyle{definition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{problem}{Problem}
\setlength{\hoffset}{-0.46in}
\setlength{\voffset}{-.96in}
\addtolength{\oddsidemargin}{0 in}
\addtolength{\evensidemargin}{.30 in}
\setlength{\textwidth}{6.0in}
\setlength{\textheight}{8.5in}
\setlength{\parskip}{6pt}
%\setlength{\topmargin}{-2in}
%\setlength{\parindent}{26pt}
\setlength{\parindent}{.5in}
    \newcommand{\bc}{\begin{center}}
        \newcommand{\ec}{\end{center}}
    \newcommand{\bd}{\begin{definition}}
        \newcommand{\ed}{\end{definition}}
    \newcommand{\ben}{\begin{enumerate}}
        \newcommand{\een}{\end{enumerate}}
    \newcommand{\bfi}{\begin{figure}}
        \newcommand{\efi}{\end{figure}}
    \newcommand{\brm}{\begin{remark}}
        \newcommand{\erm}{\end{remark}}
    \newcommand{\ra}{\rightarrow}
    \newcommand{\al}{\nu}
    \newcommand{\sg}{\Sigma}
    \newcommand{\bt}{\beta}
    \newcommand{\gm}{\gamma}
    \newcommand{\dt}{\delta}
    \newcommand{\ep}{\epsilon}
    \newcommand{\vr}{\varphi}
    \newcommand{\pr}{\partial}
    \newcommand{\lam}{\lamda}
    \newcommand{\iy}{\infty}
    \newcommand{\si}{\sigma}
    \newcommand{\la}{\leftarrow}
    \newcommand{\ovl}{\overline}
    \newcommand{\unl}{\underline}
    \newcommand{\R}{\mathbb{R}}
    \newcommand{\N}{\mathbb{N}}
    \newcommand{\C}{\mathbb{C}}
    \newcommand{\D}{\mathbb{D}}
    \newcommand{\T}{\mathbb{T}}
    \newcommand{\Z}{\mathbb{Z}}
    \newcommand{\cB}{\mathbb{B}}
    \newcommand{\K}{\mathbb{K}}
    \newcommand{\bq}{\begin{quote}}
        \newcommand{\eq}{\end{quote}}
    \newcommand{\bqu}{\begin{quotation}}
        \newcommand{\equ}{\end{quotation}}
    \newenvironment{emphit}{\begin{itemize}}{\end{itemize}}
    \newcommand{\bemp}{\begin{emphit}}
        \newcommand{\eemp}{\end{emphit}}

    \newcommand{\ds}{\displaystyle}
\numberwithin{equation}{chapter}
\numberwithin{equation}{section}
\numberwithin{table}{section}
\numberwithin{figure}{section}
%\numberwithin{definition}{section}

\setlength{\baselineskip}{10pt}
\setlength{\belowcaptionskip}{8pt plus 3pt minus 2pt}
\setlength{\abovecaptionskip}{15pt plus 3pt minus 2pt}
\def\contentsname{\large{{CONTENTS}}}
\renewcommand\bibname{\textnormal{\MakeUppercase{Bibliography}}}

\makeatletter
\def\ps@headings{\ps@empty
    \def\@oddhead{%
        \setTrue{runhead}%
        \normalfont\scriptsize \hfil\llap{\thepage}}%
    \doublespacing
    \let\@evenhead\@oddhead
} \pagestyle{headings}
\makeatother

\graphicspath{{./Figures/}}

\begin{document}


\end{document}

答案1

放弃所有手动进行的页面相关设置,只使用geometry,甚至在\documentclass水平上。也就是说,摆脱手动设置

\textwidth
\textheight
\hoffset
\voffset
\oddsidemargin
\evensidemargin
\topmargin

乃至

\special{papersize=8.4375in,11in}

只需使用

\usepackage{geometry}
\geometry{
  paper = letterpaper,
  left = 1.5in,
  right = 1in,
  vmargin = 1in% (similar to top=1in and bottom=1in)
}

相关内容