我正在用 LaTeX 写我的硕士论文。应该说我以前没用过它,对我来说一切都是新的。我一直都很好,直到我在编译命令 \noindent 和 \hline 时遇到了一些麻烦。
我希望标题页底部有一条水平线,上面写着我工作的地点和日期。从主管姓名到底部边缘有一段很好的空白,但编译器会忽略这段空白,并将城市名称和行放在下一页。页面的框架告诉我还有空间可以放置文本。不用说,我用 [showframe] 加载了几何图形。
此外,我还收到一条因 \hline 引起的错误消息,提示“>misplaced \noalign”。
我不得不修改垂直边距的位置以及主体框的高度。这可能是最后一行跳转到下一页的原因吗?
%--------Code in the main.tex file, prior to any page-----------%
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx} %loads the graphics package, necessary for pictures
%\usepackage{fancyhdr}
%\usepackage{float}
\usepackage[showframe]{geometry} %allows to change margins and distances within the page's frame
%\usepackage{wallpaper}
\usepackage{framed} %to make frames, such as in the title page and abstract
\usepackage{hyperref}
\graphicspath{{images/}} %Direction where LaTeX will look for the images.
\usepackage{tabto}
\usepackage{lipsum}
\usepackage{booktabs}
\begin{document}
%-----------Here the Title Page starts, in a different .tex file-----------%
\begin{titlepage}
%% COMMANDS DEFINED FOR THE USER
\newcommand\textline[4][t]{%
\par\smallskip\noindent\parbox[#1]{.333\textwidth}{\large\raggedright\texttt{}#2}%
\parbox[#1]{.333\textwidth}{\large\centering\textbf{#3}}%
\parbox[#1]{.333\textwidth}{\raggedleft\texttt{#4}}\par\smallskip%
}
\newcommand\specialtxtl[4][t]{%
\par\smallskip\noindent\parbox[#1]{.2\textwidth}{\large\raggedright\texttt{}#2}%
\parbox[#1]{.6\textwidth}{\LARGE\centering\textbf{#3}}%
\parbox[#1]{.2\textwidth}{\raggedleft\texttt{#4}}\par\smallskip%
}
%------------------------------------------------%
\setlength{\voffset}{-2.5cm} %---This commands here are for changing the margin of the page, so the image can be placed up there. They must be before \begin{center} otherwise they don't work.
\setlength{\textheight}{690pt} %height of the box where the text is placed.
\begin{center}
\begin{figure}[h]
\hspace*{-3.0cm}
%\includegraphics{title_header}
\end{figure}
\vspace{0.0cm}
\LARGE
\begin{framed} %----Frame around the tile-----
\vspace{1cm}
\textbf{Experimental Characterization of Steady-State Applied Field Magnetoplasmadynamic Thruster SX3}
\vspace{1cm}
\end{framed}
\LARGE
\vspace{.5cm}
\textbf{Master Thesis}
%------------------------------------------------%
\vspace{.5cm}
\textline[t]{Submitted by:}{\LARGE My Name}{}
\textline[t]{Matriculation Number:}{\LARGE 123456789}{}
\vspace{.5cm}
\specialtxtl[t]{at:}{Master's program}{}
\textbf{"Aerospace Engineering"}
\vspace{1.0cm}
\specialtxtl[t]{Supervisor:}{Name Name}{}
\textbf{\LARGE Name Name}
\vspace{\fill}
\LARGE
\raggedright Stuttgart, 19/03/2015
\rule{\textwidt}{.5pt}
\end{center}
\end{titlepage}
%-------------------------------------------------------------%
\chapter*{Abstract} %--From here is just the template of the thesis, table of content and chapters.
Standard standard standard standard standard standard standard standard standard
\chapter{Aknowledgement}
I want to thank...
\tableofcontents
\chapter{Introduction}
Standard Standard standard standard standard standard
\end{document}
我将非常感激您的帮助。谢谢。
旅行者
答案1
这已经清理得非常干净了。请注意,我真的不知道你想做什么,所以我非常怀疑我的回答是否能帮助你做到这一点!
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage[showframe]{geometry}
\usepackage{framed}
\newcommand\textline[4][t]{%
\par\smallskip\noindent\parbox[#1]{.333\textwidth}{\large\raggedright\texttt{}#2}%
\parbox[#1]{.333\textwidth}{\large\centering\textbf{#3}}%
\parbox[#1]{.333\textwidth}{\raggedleft\texttt{#4}}\par\smallskip%
}
\newcommand\specialtxtl[4][t]{%
\par\smallskip\noindent\parbox[#1]{.2\textwidth}{\large\raggedright\texttt{}#2}%
\parbox[#1]{.6\textwidth}{\LARGE\centering\textbf{#3}}%
\parbox[#1]{.2\textwidth}{\raggedleft\texttt{#4}}\par\smallskip%
}
\begin{document}
\newgeometry{headheight=0pt,textheight=690pt}% doubt your really want voffset=-25mm as it pushes the content off the page
\begin{titlepage}
\centering
\hspace*{-3.0cm}
\includegraphics{title_header}
\LARGE
\begin{framed}
\vspace{1cm}
\textbf{Experimental Characterization of Steady-State Applied Field Magnetoplasmadynamic Thruster SX3}
\vspace{1cm}
\end{framed}
\LARGE
\vspace{.5cm}
\textbf{Master Thesis}
\vspace{.5cm}
\textline[t]{Submitted by:}{\LARGE My Name}{}
\textline[t]{Matriculation Number:}{\LARGE 123456789}{}
\vspace{.5cm}
\specialtxtl[t]{at:}{Master's program}{}
\textbf{``Aerospace Engineering''}
\vspace{1.0cm}
\specialtxtl[t]{Supervisor:}{Name Name}{}
\textbf{\LARGE Name Name}
\vspace{\fill}
\LARGE
\raggedright Stuttgart, 19/03/2015
\rule{\textwidth}{.5pt}
\end{titlepage}
\restoregeometry
\chapter*{Abstract}
Standard standard standard standard standard standard standard standard standard
\chapter{Aknowledgement}
I want to thank...
\tableofcontents
\chapter{Introduction}
Standard Standard standard standard standard standard
\end{document}