![标题页布局设计问题](https://linux22.com/image/343136/%E6%A0%87%E9%A2%98%E9%A1%B5%E5%B8%83%E5%B1%80%E8%AE%BE%E8%AE%A1%E9%97%AE%E9%A2%98.png)
我的标题页上有一行(“挪威科技大学”)太长,页面放不下。但是这行超出了页面范围(所以我们看不到它),而不是另起一行。我不知道如何更改这种情况。
我使用的模板来自一个朋友,因为我刚接触 TeX。我不太清楚他在这个模板中做了什么。
我希望有一个人可以帮助我!
\documentclass{scrreprt}
\begin{document}
\newcommand{\TYP} {Bachelor Thesis}
\newcommand{\TITEL} {bla bla bla}
\newcommand{\Pruefer} {Prof. Dr.-Ing. E. Nergy}
\newcommand{\AUTORJ} {Donald Duck}
\newcommand{\SEMESTER} {Wintersemester 2016 / 2017}
\newcommand{\TAG} {28}
\newcommand{\MONAT} {February}
\newcommand{\JAHR} {2017}
\newcommand{\ORT} {Entenhausen, }
\newcommand{\NTNU} {Norwegian University of Science and Technology}
\newcommand{\BETREUER} {Prof. Dr.-Ing. Dagobert Duck}
\newcommand{\TITELscriptsize}{\fontsize{12pt}{9pt}}
\newcommand{\TITELnormalsize}{\fontsize{16pt}{16pt}}
\newcommand{\TITELLARGE}{\fontsize{20pt}{20pt}}
\newcommand{\TITELLarge}{\fontsize{30pt}{30pt}}
\newcommand{\TITELlarge}{\fontsize{24pt}{24pt}}
\thispagestyle{empty}
\definecolor{tuhh}{rgb}{0.2,0.8,0.8}
\newlength{\logobreite} \setlength{\logobreite}{30mm}
\newlength{\strichre} \setlength{\strichre}{10mm}
\newlength{\gap} \setlength{\gap}{2mm}
\newlength{\randabstand} \setlength{\randabstand}{15mm}
\newlength{\ueberhang} \setlength{\ueberhang}{210mm/2 - \textwidth/2 -\randabstand}
\newlength{\strichli} \setlength{\strichli}{\textwidth-\logobreite-\strichre-\gap-\gap+\ueberhang+\ueberhang}
\setlength{\hoffset}{5mm}
\begin{center}
\vspace{2.0cm}
{\TITELlarge\mdseries\sffamily\bfseries \TYP}\\
\vspace{1.5cm}
{\TITELLarge\sffamily\bfseries \TITEL}\\
\vspace{1.5cm}
\begin{tabular}{ll}\\
\fontsize{20}{20}\selectfont
\\
{\TITELLARGE\mdseries Student:} & {\TITELLARGE\mdseries \AUTORJ}\\
\\
{\TITELLARGE\mdseries First Examiner:} & {\TITELLARGE\mdseries \Pruefer}\\
\\
{\TITELLARGE\mdseries Second Examiner:} & {\TITELLARGE\mdseries \ZWEITPRUEFER}
\vspace{1.0cm}\\
{\TITELLARGE\mdseries In cooperation with:} & {\TITELLARGE\mdseries \NTNU}\\
\\
{\TITELLARGE\mdseries Supervisor:} & {\TITELLARGE\mdseries \BETREUER}
\vspace{1.5cm}\\
{\TITELLARGE\mdseries Semester:} & {\TITELLARGE\mdseries \SEMESTER}\\
\vspace{1cm}
\end{tabular}
\TITELnormalsize\mdseries \ORT \TAG. \MONAT\ \JAHR
\end{center}
\endgroup
\end{document}
答案1
您的 MWE 无法编译,所以我不得不更改代码。
注意! 您需要一个可缩放的字体才能拥有 30 pt 的标题!
将表的定义更改为
\begin{tabular}{lp{9cm}}
为了避免大学名称中出现连字符,您可以加载包大批并将定义更改为
\begin{tabular}{l>{\raggedright}p{9cm}}
此外,您必须将 更改\\
为\tabularnewline
。
或者,您可以将命令\raggedright
放在有问题的单元格中。
完成 MWE:
\documentclass{scrreprt}
\usepackage{xcolor, calc} %% <-- necessary for compilation
\usepackage{array} %% <- Alternatively, you may put the command
%% `\raggedright`in the offending cell.
\begin{document}
\newcommand{\TYP} {Bachelor Thesis}
\newcommand{\TITEL} {bla bla bla}
\newcommand{\Pruefer} {Prof. Dr.-Ing. E. Nergy}
\newcommand{\AUTORJ} {Donald Duck}
\newcommand{\SEMESTER} {Wintersemester 2016 / 2017}
\newcommand{\TAG} {28}
\newcommand{\MONAT} {February}
\newcommand{\JAHR} {2017}
\newcommand{\ORT} {Entenhausen, }
\newcommand{\NTNU} {Norwegian University of Science and Technology}
\newcommand{\BETREUER} {Prof. Dr.-Ing. Dagobert Duck}
\newcommand{\TITELscriptsize}{\fontsize{12pt}{9pt}}
\newcommand{\TITELnormalsize}{\fontsize{16pt}{16pt}}
\newcommand{\TITELLARGE}{\fontsize{20pt}{20pt}}
\newcommand{\TITELLarge}{\fontsize{30pt}{30pt}}
\newcommand{\TITELlarge}{\fontsize{24pt}{24pt}}
\thispagestyle{empty}
\definecolor{tuhh}{rgb}{0.2,0.8,0.8}
\newlength{\logobreite} \setlength{\logobreite}{30mm}
\newlength{\strichre} \setlength{\strichre}{10mm}
\newlength{\gap} \setlength{\gap}{2mm}
\newlength{\randabstand} \setlength{\randabstand}{15mm}
\newlength{\ueberhang} \setlength{\ueberhang}{210mm/2 - \textwidth/2 -\randabstand}
\newlength{\strichli} \setlength{\strichli}{\textwidth-\logobreite-\strichre-\gap-\gap+\ueberhang+\ueberhang}
\setlength{\hoffset}{5mm}
\begin{center}
\vspace{2.0cm}
{\TITELlarge\mdseries\sffamily\bfseries \TYP}\\
\vspace{1.5cm}
{\TITELLarge\sffamily\bfseries \TITEL}\\
\vspace{1.5cm}
\begin{tabular}{l>{\raggedright}p{9cm}}\\
\fontsize{20}{20}\selectfont
\\
{\TITELLARGE\mdseries Student:} & {\TITELLARGE\mdseries \AUTORJ}\\
\tabularnewline
{\TITELLARGE\mdseries First Examiner:} & {\TITELLARGE\mdseries \Pruefer}\\
\tabularnewline
{\TITELLARGE\mdseries Second Examiner:} & {\TITELLARGE\mdseries %\ZWEITPRUEFER% <- was not defined, commented out
}
\vspace{1.0cm}\tabularnewline
{\TITELLARGE\mdseries In cooperation with:} & {\TITELLARGE\mdseries \NTNU}\\
\tabularnewline
{\TITELLARGE\mdseries Supervisor:} & {\TITELLARGE\mdseries \BETREUER}
\vspace{1.5cm}\tabularnewline
{\TITELLARGE\mdseries Semester:} & {\TITELLARGE\mdseries \SEMESTER}\\
\vspace{1.5cm} %% <-- Change this figure to increase the distance
%% between the two elements. Remember a blank line
\end{tabular}
\TITELnormalsize\mdseries \ORT \TAG. \MONAT\ \JAHR
\end{center}
%\endgroup %% <- `\begingroup` not defined, commented out
\end{document}