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.

두 줄의 머리글이 있기 때문에 머리글에 할당된 기본 세로 공간이 너무 작습니다. fancyhdr1페이지에서 이를 보고 나머지 페이지에 대해 수정합니다. 이것이 표시되는 출력의 차이의 원인입니다. 길이를 재정의하면 \headheight레이아웃이 일관되게 됩니다.

그러나 패키지를 사용할 때 geometry모든 페이지 레이아웃 작업을 수동으로 수행해서는 안 됩니다. 대신 아래 코드와 같이 를 사용하여 geometry여백 headheight및 을 설정하세요. headsep요구사항에 맞게 길이를 수정하세요.

기타 사항:

  • parskip일반적 으로 수동으로 0으로 설정하는 것보다 패키지를 사용하는 것이 좋습니다 \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]표 바로 앞과 뒤에 텍스트의 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-command는 -command 바로 뒤에 배치되어야 합니다 \caption.

결과는 다음과 같습니다

여기에 이미지 설명을 입력하세요

관련 정보