我必须使用大学的文档类别和样式来撰写我的硕士论文。但他们似乎将标题放在了longtable
右下方,而不是居中。在普通表格下,它工作得很好。
\documentclass[a4paper,10pt,openright]{unibe-msc}
\usepackage{unibe-msc}
\usepackage[english]{babel}
\usepackage[caption=off]{subfig}
\usepackage{longtable}
\usepackage{booktabs}
\begin{document}
\begin{longtable}{l*{4}{l}}
\toprule
\multicolumn{4}{c}{Parameters of the body segments}\\
Body Segment & Parameters & Value & Unit\\
\midrule
\endfirsthead
Body Segment & Parameters & Value & Unit\\
\midrule
\endhead
Head & R & & $mm$ \\
& RR & & $mm$ \\
& SL & & $mm$ \\
& SW & & $N$ \\
& SIXX & & $kg \cdot mm^4$\\
& SIYY & & $kg \cdot mm^4$\\
& SIZZ & & $kg \cdot mm^4$\\
\bottomrule
\caption{Parameters of the body segments}
\label{tab:bsegparam}
\end{longtable}
\end{document}
这是我使用的课程:
\NeedsTeXFormat{LaTeX2e}[2001/01/01]
\ProvidesClass{unibe-msc}
[2009/10/28 v2.1 Document Class for UniBE MSc Theses]
\newif\if@uthesis@electronic \@uthesis@electronicfalse
\DeclareOption{electronic}{\@uthesis@electronictrue}
\def\@uthesis@setpapersize@afour{%
\setstocksize{297mm}{210mm}
\settrimmedsize{297mm}{210mm}{*}
\settypeblocksize{49pc}{33pc}{*}}
\def\@uthesis@setpapersize@gfive{%
\if@uthesis@electronic
\setstocksize{239mm}{169mm}
\settrimmedsize{239mm}{169mm}{*}
\ifpdf
\else
\special{papersize=169mm,239mm}
\fi
\else
\setstocksize{297mm}{210mm}
\settrimmedsize{239mm}{169mm}{*}
\setlength{\trimtop}{\stockheight}
\addtolength{\trimtop}{-\paperheight}
\setlength{\trimtop}{0.5\trimtop}
\setlength{\trimedge}{\stockwidth}
\addtolength{\trimedge}{-\paperwidth}
\ifpdf
\AtBeginDocument{%
\setlength{\pdfpagewidth}{\stockwidth}
\setlength{\pdfpageheight}{\stockheight}}
\fi
\fi
\settypeblocksize{43pc}{30pc}{*}}
\DeclareOption{g5paper}{\def\uthesis@trimmedsize{gfive}}
\DeclareOption{a3paper}{\OptionNotUsed}
\DeclareOption{a4paper}{\def\uthesis@trimmedsize{afour}}
\DeclareOption{a6paper}{\OptionNotUsed}
\DeclareOption{a5paper}{\OptionNotUsed}
\DeclareOption{b3paper}{\OptionNotUsed}
\DeclareOption{b4paper}{\OptionNotUsed}
\DeclareOption{b5paper}{\OptionNotUsed}
\DeclareOption{b6paper}{\OptionNotUsed}
\DeclareOption{letterpaper}{\OptionNotUsed}
\DeclareOption{legalpaper}{\OptionNotUsed}
\DeclareOption{executivepaper}{\OptionNotUsed}
\DeclareOption{ebook}{\OptionNotUsed}
\DeclareOption{landscape}{\OptionNotUsed}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ExecuteOptions{g5paper}
\ProcessOptions\relax
\LoadClass[a4paper]{memoir}
\AtBeginDocument{\RequirePackage{graphics}}
\@nameuse{@uthesis@setpapersize@\uthesis@trimmedsize}
\setlrmargins{*}{*}{*}
\setulmargins{*}{*}{*}
\checkandfixthelayout
\def\subtitle{\gdef\thesubtitle}
\def\frontsignature{\gdef\thefrontsignature}
\def\unibelogo{\gdef\theunibelogo}
\def\htilogo{\gdef\thehtilogo}
\def\place{\gdef\theplace}
\def\faculty{\gdef\thefaculty}
\def\affiliation{\gdef\theaffiliation}
\def\examiner{\gdef\theexaminer}
\def\discipline{\gdef\thediscipline}
\def\supervisor{\gdef\thesupervisor}
\def\origin{\gdef\theorigin}
\let\thesubtitle\relax
\let\theunibelogo\relax
\let\thehtilogo\relax
\let\theplace\relax
\let\thefaculty\relax
\let\theaffiliation\relax
\let\thediscipline\relax
\let\thesupervisor\relax
\let\theorigin\relax
\def\maketitle{%
\begingroup
%\sffamily
\pagestyle{empty}
\renewcommand*{\thepage}{title-\arabic{page}}
\vspace*{-30mm}
\noindent
\scalebox{0.525}{\includegraphics{\thehtilogo}} \hfill
\scalebox{0.35}{\includegraphics{\theunibelogo}}
\parbox[b][0.65\textheight]{\textwidth}{\centering\noindent
\vskip2cm
{\large\mdseries \thefaculty \par \thediscipline}\par
\vskip1cm
\Large\mdseries\thesubtitle\par
\vskip2cm
\huge\bfseries\thetitle\par
\vskip2cm
\large\mdseries by
\vskip2cm
\LARGE\bfseries\theauthor\par\vfill
\vskip1cm
\large\mdseries of \theorigin
}
\vfill\noindent
\parbox[b]{\textwidth}{\centering\noindent
\large\mdseries Supervisors \\ \thesupervisor\par
\vskip1cm
\large\mdseries Institutions \\ \theaffiliation\par
\vskip1cm
\large\mdseries Examiners \\ \theexaminer
\vskip1cm
\large\mdseries\thefrontsignature\\
% {\color{red}This report is confidential.} {\tiny(Delete this statement in the file ``unibe-msc.cls'' if the report is not confidential.)}
}
\cleardoublepage
\endgroup
}
\endinput
和风格:
\ProvidesPackage{unibe-msc}[2009/10/28]
%% Customization for the unibe-msc class
\maxsecnumdepth{subsection}
\setsecnumdepth{subsection}
\maxtocdepth{subsection}
\settocdepth{subsection}
\renewcommand{\bf}{\bfseries}
\renewcommand{\partnamefont} {\usefont{T1}{lmss}{m}{n}\boldmath\huge}
\renewcommand{\partnumfont} {\usefont{T1}{lmss}{m}{n}\boldmath\huge}
\renewcommand{\parttitlefont}{\usefont{T1}{lmss}{m}{n}\boldmath\Huge}
\renewcommand{\chapnamefont} {\usefont{T1}{lmss}{m}{n}\boldmath\huge} %
\renewcommand{\chapnumfont} {\usefont{T1}{lmss}{m}{n}\boldmath\huge}
\renewcommand{\chaptitlefont}{\usefont{T1}{lmss}{m}{n}\boldmath\Huge}
\setsecheadstyle {\usefont{T1}{lmss}{m}{n}\boldmath\Large\raggedright}
\setsubsecheadstyle{\usefont{T1}{lmss}{m}{n}\boldmath\large\raggedright}
\setsubsubsecheadstyle{\usefont{T1}{lmss}{m}{n}\boldmath\normalsize\raggedright}
\setparaheadstyle {\usefont{T1}{cbr}{sbc}{n}\normalsize\bfseries\boldmath}
\setsubparaheadstyle{\usefont{T1}{cbr}{sbc}{n}\normalsize\bfseries\boldmath}
\makeevenhead{headings}%
{\normalfont\small\thepage}{}{\normalfont\small\leftmark}
\makeoddhead{headings}%
{\normalfont\small\rightmark}{}{\normalfont\small\thepage}
\setlength{\@tempdima}{\textwidth}
\addtolength{\@tempdima}{-2\leftmargini}
\captionwidth{\@tempdima}
\changecaptionwidth
\captiondelim{. }
\captionnamefont{\normalfont\footnotesize\bfseries}
\captiontitlefont{\normalfont\footnotesize}
\setlength{\parskip}{0pt}
\endinput