第 2 頁及以後的第一行遠低於水平線

第 2 頁及以後的第一行遠低於水平線

我是這個論壇的新人,有一個問題需要解決。第 1 頁之後的所有頁面的第一行都遠低於頁首的水平線。我需要所有頁面的第一行從與第 1 頁相同的距離開始。該文件如下:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amscd}
\usepackage{amsfonts}
\usepackage{graphicx}%
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{soul}
\usepackage[margin=1.0in]{geometry}
%\usepackage[margin=1in,headsep=.3in]{geometry}
\usepackage{layout} 


\theoremstyle{plain} \numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}{Conjecture}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{finalremark}[theorem]{Final Remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}[theorem]{Example}
\newtheorem{question}{Question} \topmargin-2cm

\textwidth6.8in

\setlength{\topmargin}{0in} \addtolength{\topmargin}{-\headheight}
\addtolength{\topmargin}{-\headsep}

\setlength{\oddsidemargin}{0in}

\setlength{\parindent}{0em}
\setlength{\parskip}{1em}

\oddsidemargin  0.0in \evensidemargin 0.0in \parindent0em

\pagestyle{fancy}
\lhead{} 
\rhead{}
\chead{\large{\bf Teaching Evaluation} \\
S. M. Khurshid Alam, PhD} 
\lfoot{\today} 
\rfoot{\thepage /\pageref{LastPage}} 
\cfoot{}

\newcounter{list}

\begin{document}
\newpage
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{}
\fancyhead[C]{{\bf \large Teaching Evaluation} \\
S. M. Khurshid Alam, PhD}
\fancyhead[R]{}
\renewcommand{\headrulewidth}{1.5pt}
\fancyfoot[L]{\today}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage /\pageref{LastPage}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\textbf{University of Windsor} \\
University of Windsor conducts its course evaluations online or on-campus depending on the type of course delivery. Students in courses offered through Distance Education complete the Student Evaluations of Teaching (SET) form online. On the other hand, students in courses offered through traditional in-class delivery, Partial Distance Education, or any other blended delivery/flexible learning format complete the SET form on campus. The SET are administered during the last two weeks of class prior to the beginning of the final exam period. Each evaluation has two parts, namely, evaluating the instructor, and rating the course.

\textbf{Evaluating the Instructor}:
Students are asked to evaluate the instructor on a scale of $1$ (Extremely Poor) to $7$ (Outstanding) from a total of $12$ questions. The questions are as follows: \\
\textbf{A. The instructor...}
\begin{enumerate}
\item presented material in an organized, well-planned manner
\item  used instructional time well
\item  explained content clearly with appropriate use of examples
\item was a clear and effective speaker
\item  communicated enthusiasm and interest in the course material
\item  stimulated your interest in the subject and motivated your learning
\item  attended to students' questions and answered them clearly
and effectively
\item  was open to students' comments and suggestions
\item  was sensitive to students' difficulties
\item  was approachable for additional help
\item  was accessible to students for individual consultation
(in office hours, after class, open-door, by e-mail, phone)
\item  The overall effectiveness of the instructor was
\end{enumerate}       

\begin{table}[ht]
%\begin{sidewaystable}[ht]
%\small
\footnotesize
%\scriptsize
%\tiny
\caption{Teaching Evaluation Summary}
\begin{center}
\begin{tabular}{|l|c|c|c|c|c|}
\hline
Course No.--Section: Course Name & Term & \vtop{\hbox{\strut Instructor}\hbox{\strut Score}} & \vtop{\hbox{\strut Course}\hbox{\strut Score}} & \vtop{\hbox{\strut Number}\hbox{\strut Enrolled}} & Responses \\ \hline
03-65-205--01:Statistics for the Sciences & Winter 2017 & NA & NA & NA & NA \\ \hline
03-65-205--02:Statistics for the Sciences & Winter 2017 & NA & NA & NA & NA \\ \hline
03-65-205--02:Statistics for the Sciences & Winter 2015 & NA & NA & NA & NA \\ \hline
03-65-205--03:Statistics for the Sciences & Winter 2015 & NA & NA & NA & NA \\ \hline
03-65-205--91:Statistics for the Sciences & Summer 2012 & NA & NA & NA & NA \\ \hline
03-65-205--02:Statistics for the Sciences & Winter 2012 & NA & NA & NA & NA \\ \hline
03-65-205--01:Statistics for the Sciences & Fall 2011   & NA & NA & NA & NA \\ \hline
03-65-205--91:Statistics for the Sciences & Summer 2011 & NA & NA & NA & NA \\ \hline
\end{tabular}
\end{center}
\label{Table evaluation}
\end{table}   

\end{document}

答案1

如果你查看你的.log文件,你會發現:

Package Fancyhdr Warning: \headheight is too small (12.0pt): 
 Make it at least 28.85002pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

由於您有兩行標題,因此分配給標題的預設垂直空間太小。fancyhdr在第 1 頁上看到此問題,並在其餘頁面上修復它,這就是您看到的輸出差異的原因。重新定義\headheight長度將使佈局保持一致。

但是,當您使用該geometry套件時,您不應該手動執行所有頁面佈局操作。相反,請使用geometry和 來設定邊距,headheight例如headsep下面的程式碼。修改長度以滿足您的要求。

其他一些要點:

  • 我認為通常建議使用該parskip包而不是手動將其設為\parskip零。

  • 您定義了兩次頁首和頁腳,這有點毫無意義,所以我刪除了其中一個。

  • \bf已棄用約 25 年,請使用\bfseries

  • 我建議使用更少規則的新版本表格。

  • 您可以考慮使用任何一個\section和類似的命令,而不是使用 手動格式化\textbf,或定義您自己的巨集。

  • 通常建議使用\centering而不是\begin{center} .. \end{center}用於使表格/數字在浮動中居中,請參閱我應該對圖形和表格使用居中還是居中嗎?

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amscd}
\usepackage{amsfonts}
\usepackage{graphicx}%
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{parskip} %%% added
\usepackage{booktabs} %%% added
\usepackage{soul}
\usepackage[
  left=25mm, % left margin
  right=20mm, % right margin
  top=20mm, % top margin
  headsep=5pt, % space between header and text
  headheight=29pt % vertical space for header
]{geometry}

\usepackage{layout} 

% from https://tex.stackexchange.com/a/19678/586
\newcommand{\specialcell}[2][t]{%
  \begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}


\theoremstyle{plain} \numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}{Conjecture}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{finalremark}[theorem]{Final Remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}[theorem]{Example}
\newtheorem{question}{Question}

\fancyhf{}
\fancyhead[L]{}
\fancyhead[C]{{\bfseries \large Teaching Evaluation} \\
S. M. Khurshid Alam, PhD}
\fancyhead[R]{}
\renewcommand{\headrulewidth}{1.5pt}
\fancyfoot[L]{\today}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage /\pageref{LastPage}}
\pagestyle{fancy}

\newcounter{list}

\usepackage{lipsum} % just for example


\begin{document}

\textbf{University of Windsor}

University of Windsor conducts its course evaluations online or on-campus depending on the type of course delivery. Students in courses offered through Distance Education complete the Student Evaluations of Teaching (SET) form online. On the other hand, students in courses offered through traditional in-class delivery, Partial Distance Education, or any other blended delivery/flexible learning format complete the SET form on campus. The SET are administered during the last two weeks of class prior to the beginning of the final exam period. Each evaluation has two parts, namely, evaluating the instructor, and rating the course.

\textbf{Evaluating the Instructor}:
Students are asked to evaluate the instructor on a scale of $1$ (Extremely Poor) to $7$ (Outstanding) from a total of $12$ questions. The questions are as follows: 

\textbf{A. The instructor...}
\begin{enumerate}
\item presented material in an organized, well-planned manner
\item  used instructional time well
\item  explained content clearly with appropriate use of examples
\item was a clear and effective speaker
\item  communicated enthusiasm and interest in the course material
\item  stimulated your interest in the subject and motivated your learning
\item  attended to students' questions and answered them clearly
and effectively
\item  was open to students' comments and suggestions
\item  was sensitive to students' difficulties
\item  was approachable for additional help
\item  was accessible to students for individual consultation
(in office hours, after class, open-door, by e-mail, phone)
\item  The overall effectiveness of the instructor was
\end{enumerate}       

\begin{table}[ht]
%\begin{sidewaystable}[ht]
%\small
\footnotesize
%\scriptsize
%\tiny
\caption{Teaching Evaluation Summary}
\label{Table evaluation}
\centering
\begin{tabular}{ll *{4}{c} }
\toprule
Course No.--Section: Course Name & Term & \specialcell{Instructor\\Score} & \specialcell{Course\\Score} & \specialcell{Number\\Enrolled} & Responses \\ \midrule
03-65-205--01:Statistics for the Sciences & Winter 2017 & NA & NA & NA & NA \\ 
03-65-205--02:Statistics for the Sciences & Winter 2017 & NA & NA & NA & NA \\ 
03-65-205--02:Statistics for the Sciences & Winter 2015 & NA & NA & NA & NA \\ 
03-65-205--03:Statistics for the Sciences & Winter 2015 & NA & NA & NA & NA \\ 
03-65-205--91:Statistics for the Sciences & Summer 2012 & NA & NA & NA & NA \\ 
03-65-205--02:Statistics for the Sciences & Winter 2012 & NA & NA & NA & NA \\ 
03-65-205--01:Statistics for the Sciences & Fall 2011   & NA & NA & NA & NA \\ 
03-65-205--91:Statistics for the Sciences & Summer 2011 & NA & NA & NA & NA \\ \bottomrule
\end{tabular}
\end{table}   

\lipsum\lipsum

\end{document}

答案2

您的問題是由於您\begin{table} ... \end{table}的文件中有一個浮動元素(。LaTeX 在文件中移動它,以獲得最佳的分頁/換行/填充效果。

不幸的是,您沒有足夠的文字來表明一切都很好。

我添加了套件lipsum來產生點字並填充您的文件。我還添加了\lipsum[1-5]在表格前後直接添加五個額外文字段落的命令。

(in office hours, after class, open-door, by e-mail, phone)
\item  The overall effectiveness of the instructor was
\end{enumerate}       

%% NEW: some more text
\lipsum[1-5]

\begin{table}[ht]
%\begin{sidewaystable}[ht]
%\small
\footnotesize

以及稍後:

03-65-205--01:Statistics for the Sciences & Fall 2011   & NA & NA & NA & NA \\ \hline
03-65-205--91:Statistics for the Sciences & Summer 2011 & NA & NA & NA & NA \\ \hline
\end{tabular}
\end{center}
\caption{Evaluation table.  Please fill out any box.}
\end{table} 

%% New: even more text.
\lipsum[6-10]  

\end{document}

順便說一句:\label-命令應該/必須直接放在\caption-命令之後。

這是結果

在此輸入影像描述

相關內容