'h' 方向的过度规范?

'h' 方向的过度规范?

我是 Latex 的新手,从我的大学获得了以下模板。当我在 Texstudio 中尝试“构建和查看”时,有时它可以工作,但大多数时候我会收到警告“在‘h’方向上过度指定”。有人能告诉我出了什么问题吗?

\documentclass[11pt,a4paper]{book}
\usepackage{amsmath}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{picture}
\usepackage{color}
\usepackage{graphpap,color}
\usepackage{subfig}
\usepackage[percent]{overpic}

\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
%\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\definecolor{kuleuven}{RGB}{29,141,176}
\definecolor{kuleuven1}{RGB}{82,189,236}
\usepackage{geometry}

\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}

\makeindex
\begin{document}

\frontmatter
\newgeometry{textwidth=540pt,textheight=780pt,top=20pt,left=20pt,right=20pt}
\begin{titlepage}

\begin{figure}[tc]{%
      \begin{overpic}[width=1\textwidth,natwidth=50,natheight=0]{Untitled.png}
        \put(46,6){\color{white}\large{\textbf{FACULTY OF ECONOMICS AND BUSINESS}}}
        \put(69.5,3){\color{white}\large{\textbf{FACULTY OF SCIENCE}}}
      \end{overpic}
    }
\end{figure}

\vspace*{4.5cm}
{\color{kuleuven1}{\Huge  Click and type the title}}

\vspace*{0.5cm}
{\Large Click and type the subtitle}

\begin{figure}[bl]
  %\centering
   \begin{minipage}[c]{0.4\textwidth}  {%
      \begin{overpic}[width=0.9\textwidth,natwidth=300,natheight=370]{Untitled2.png}
        \put(70,45){\begin{minipage}[c]{1.80\textwidth}
\begin{flushright}

{\Large your name} \linebreak
{studentnumber} \linebreak

\textbf{{\large Thesis submitted to obtain \linebreak
the degree of}} \linebreak
\linebreak
{\large MASTER OF FINANCIAL AND ACTUARIAL ENGINEERING}\linebreak
\linebreak
\textbf{{\large Promotor:}}   Prof. Dr. name promotor \linebreak
\textbf{{\large Assistant:}} name assistant
\linebreak

\textbf{{\large Academic year:}} {\large Choose the academic year}
\linebreak
\end{flushright}
  \end{minipage}}
      \end{overpic}
    }
  \end{minipage}


\begin{picture}(540,0.2)
\put(0,0){\colorbox{kuleuven1}{\makebox(540,0.2){}}}
\end{picture}
\end{figure}

\end{titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\restoregeometry
\setcounter{equation}{1}

\pagestyle{empty}
\tableofcontents

\chapter*{Preface\hfill} \addcontentsline{toc}{chapter}{Preface}

\begin{flushright}
Leuven, 29/06/2012.
\end{flushright}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\mainmatter

\pagestyle{headings}
\chapter{First Chapter}%in the brackets write the title of your chapter

\section{Heading 2}%in the brackets write the title of your section

\subsection{Heading 3}

\paragraph{Name of the Paragraph}

\chapter{Second Chapter}




\begin{thebibliography}{99}\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
%Examples are given below for bibliography. This isn't the only way,
%feel free to use your own ways, but this is the easiest one.

%FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
\bibitem{feller:1968} 
{\sc Feller,\,W.} (1968).
An Introduction to Probability Theory and Its Applications Vol.I, third edition.
{\em}Wiley,\,New York.

%RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
\bibitem{resnick:willekens:1991} 
{\sc Resnick,\,S.I.and Willekens,\,E.}\,(1991).
Moving averages with random coefficients and random coefficient autoregressive models. 
{\em Comm. Statist. Stochastic Models} \,{\bf 7},\,no. 4,\,511--525 


\end{thebibliography}
\vfill

\appendix 
\tocless \chapter{}
\addcontentsline{toc}{chapter}{Appendix}
\section{Appendix}

\newpage
\thispagestyle{empty}
\newgeometry{textwidth=540pt,textheight=780pt,top=20pt,left=20pt,right=20pt}
\begin{figure}[ht]
\begin{flushright}
\includegraphics[width=0.5\textwidth,natwidth=310,natheight=10]{Untitled3.png}  
\end{flushright}
\end{figure}
\vfill
\begin{picture}(550,40)
\put(0,0){\colorbox{kuleuven}{\makebox(520,52){}}}
\end{picture}
\end{document}

\documentclass[11pt,a4paper]{book}
\usepackage{amsmath}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{picture}
\usepackage{color}
\usepackage{graphpap,color}
\usepackage{subfig}
\usepackage[percent]{overpic}

\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
%\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\definecolor{kuleuven}{RGB}{29,141,176}
\definecolor{kuleuven1}{RGB}{82,189,236}
\usepackage{geometry}

\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}

\makeindex
\begin{document}

\frontmatter
\newgeometry{textwidth=540pt,textheight=780pt,top=20pt,left=20pt,right=20pt}
\begin{titlepage}

\begin{figure}[tc]{%
      \begin{overpic}[width=1\textwidth,natwidth=50,natheight=0]{Untitled.png}
        \put(46,6){\color{white}\large{\textbf{FACULTY OF ECONOMICS AND BUSINESS}}}
        \put(69.5,3){\color{white}\large{\textbf{FACULTY OF SCIENCE}}}
      \end{overpic}
    }
\end{figure}

\vspace*{4.5cm}
{\color{kuleuven1}{\Huge  Click and type the title}}

\vspace*{0.5cm}
{\Large Click and type the subtitle}

\begin{figure}[bl]
  %\centering
   \begin{minipage}[c]{0.4\textwidth}  {%
      \begin{overpic}[width=0.9\textwidth,natwidth=300,natheight=370]{Untitled2.png}
        \put(70,45){\begin{minipage}[c]{1.80\textwidth}
\begin{flushright}

{\Large your name} \linebreak
{studentnumber} \linebreak

\textbf{{\large Thesis submitted to obtain \linebreak
the degree of}} \linebreak
\linebreak
{\large MASTER OF FINANCIAL AND ACTUARIAL ENGINEERING}\linebreak
\linebreak
\textbf{{\large Promotor:}}   Prof. Dr. name promotor \linebreak
\textbf{{\large Assistant:}} name assistant
\linebreak

\textbf{{\large Academic year:}} {\large Choose the academic year}
\linebreak
\end{flushright}
  \end{minipage}}
      \end{overpic}
    }
  \end{minipage}


\begin{picture}(540,0.2)
\put(0,0){\colorbox{kuleuven1}{\makebox(540,0.2){}}}
\end{picture}
\end{figure}

\end{titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\restoregeometry
\setcounter{equation}{1}

\pagestyle{empty}
\tableofcontents

\chapter*{Preface\hfill} \addcontentsline{toc}{chapter}{Preface}

\begin{flushright}
Leuven, 29/06/2012.
\end{flushright}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\mainmatter

\pagestyle{headings}
\chapter{First Chapter}%in the brackets write the title of your chapter

\section{Heading 2}%in the brackets write the title of your section

\subsection{Heading 3}

\paragraph{Name of the Paragraph}

\chapter{Second Chapter}




\begin{thebibliography}{99}\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
%Examples are given below for bibliography. This isn't the only way,
%feel free to use your own ways, but this is the easiest one.

%FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
\bibitem{feller:1968} 
{\sc Feller,\,W.} (1968).
An Introduction to Probability Theory and Its Applications Vol.I, third edition.
{\em}Wiley,\,New York.

%RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
\bibitem{resnick:willekens:1991} 
{\sc Resnick,\,S.I.and Willekens,\,E.}\,(1991).
Moving averages with random coefficients and random coefficient autoregressive models. 
{\em Comm. Statist. Stochastic Models} \,{\bf 7},\,no. 4,\,511--525 


\end{thebibliography}
\vfill

\appendix 
\tocless \chapter{}
\addcontentsline{toc}{chapter}{Appendix}
\section{Appendix}

\newpage
\thispagestyle{empty}
\newgeometry{textwidth=540pt,textheight=780pt,top=20pt,left=20pt,right=20pt}
\begin{figure}[ht]
\begin{flushright}
\includegraphics[width=0.5\textwidth,natwidth=310,natheight=10]{Untitled3.png}  
\end{flushright}
\end{figure}
\vfill
\begin{picture}(550,40)
\put(0,0){\colorbox{kuleuven}{\makebox(520,52){}}}
\end{picture}
\end{document}

答案1

\newgeometry{textwidth=540pt,textheight=780pt,top=20pt,left=20pt,right=20pt}

左右边距之和\textwidth必须是纸张宽度,因此您无法全部指定。您可以指定左和右并让其计算结果\textwidth,或者指定\textwidthleft并让其计算结果right

相关内容