封面页排版在标题过长时出现问题以及可能的解决方案 #43
-
在使用本模板创建毕设文章时发现如果标题过长,封面页的标题栏会超出下划线宽度,如下所示: \RequirePackage{ulem}
\newcommand{\ulinecentered}[1]{\uline{\makebox[20em][c]{#1}}} 如果需要实现标题过长时的自动换行,需要对 \RequirePackage{lineno}
\makeatletter
\newlength\underlineMinSep
\setlength\underlineMinSep{1em}
\newcommand\ulinecentered[1]{%
\hskip\underlineMinSep
\begin{minipage}[t]{20em}
\centering
% see `texdoc lineno`, sec. 7.4
\internallinenumbers
\renewcommand\makeLineNumber{\hss
\rlap{\hskip-\underlineMinSep
\rule[.5\dimexpr\f@size pt-\baselineskip]{\dimexpr\textwidth+2\underlineMinSep}{.4pt}}}%
#1
\end{minipage}%
}
\makeatother 同时需要对 % 设置封面
\newcommand{\MakeCover}[0]{
\begin{titlepage}
\begin{center}
\thisfancyput(-0.75cm,-13cm){}
% \vspace*{\fill}
\includegraphics[height=2.25cm]{figures/tongji.pdf}
\zihao{-2}\MakeUppercase{\textbf{\tongjiuniversityeng}}
\vskip 30pt
% 符合毕业设计模板(理工类),标题使用黑体小初
\zihao{-0}\heiti{本科毕业设计(论文)}
\vskip 60pt
% 符合毕业设计模板(理工类),此处使用黑体小二
\begin{information}{M{5em}M{22em}}
\zihao{-2}\heiti{课题名称} & \ulinecentered{\tongjithesistitle} \\
\zihao{-2}\heiti{副\enskip{}标\enskip{}题} & \ulinecentered{\tongjithesissubtitle} \\
\zihao{-2}\heiti{学\quad{}\quad{}院} & \ulinecentered{\tongjischool} \\
\zihao{-2}\heiti{专\quad{}\quad{}业} & \ulinecentered{\tongjimajor} \\
\zihao{-2}\heiti{学生姓名} & \ulinecentered{\tongjiauthor} \\
\zihao{-2}\heiti{学\quad{}\quad{}号} & \ulinecentered{\tongjiauthornumber} \\
\zihao{-2}\heiti{指导教师} & \ulinecentered{\tongjithesisadvisor} \\
\zihao{-2}\heiti{日\quad{}\quad{}期} & \ulinecentered{\tongjithesisyear{}年\tongjithesismonth{}月\tongjithesisday{}日} \\
\end{information}
\vspace*{\fill}
\end{center}
\end{titlepage}
} 修改后的排版效果如下: |
Beta Was this translation helpful? Give feedback.
Answered by
RizhongLin
Apr 25, 2024
Replies: 1 comment
-
你好!谢谢你的提议。请参见 #44。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AiDenZee
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好!谢谢你的提议。请参见 #44。