Skip to content

Commit

Permalink
Provide option for single line title. (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zewbiee committed Jul 9, 2023
1 parent ffb7e96 commit c16073c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion baseinfo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 通用基本信息 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\thesisTitle
{基于 \LaTeX 系统的长沙理工大学\\本科生毕业论文模板} % 论文题目
{基于 \LaTeX 系统的长沙理工大学\\本科生毕业论文模板} % 论文题目,使用\\断行
{A CSUST Bachelor thesis template\\based on \LaTeX{} system} % 论文英文题目,英文摘要用

\thesisCompleteTime{\the\year}{\the\month}{9} % 论文完成时间,依次填写年、月、日
% \singleLineTitle % “题目”一栏默认显示两条横线,若要隐藏第二条横线,请取消该行注释。

\stuName{XXX} % 学生姓名

Expand Down
10 changes: 7 additions & 3 deletions csustThesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@
\def\csustThesis@title{#1}
\def\csustThesis@entitle{#2}
}
\newcommand{\csustThesis@title@secunderline}[1]{\underline{#1}}
\newcommand{\singleLineTitle}{
\def\csustThesis@title@secunderline{}
}

% 论文完成时间
\newcommand{\csustThesis@completeYear}{}
Expand Down Expand Up @@ -332,7 +336,7 @@
\settowidth{\maxwidth}{题目:}
\makebox[\maxwidth][s]{题目:}\underline{\makebox[\titleBoxLen][l]{\phantom{幻影}}}

\hspace*{\maxwidth}\underline{\makebox[\titleBoxLen][l]{\phantom{幻影}}}
\hspace*{\maxwidth}\csustThesis@title@secunderline{\makebox[\titleBoxLen][l]{\phantom{幻影}}}

\vspace*{-2\baselineskip} % 2.78cm
\hspace*{\maxwidth}
Expand Down Expand Up @@ -546,7 +550,7 @@
\settowidth{\maxwidth}{题目:}
\makebox[\maxwidth][s]{题目:}\underline{\makebox[\titleBoxLen][c]{\phantom{幻影}}}

\hspace*{\maxwidth}\underline{\makebox[\titleBoxLen][l]{\phantom{幻影}}}
\hspace*{\maxwidth}\csustThesis@title@secunderline{\makebox[\titleBoxLen][l]{\phantom{幻影}}}

\vspace*{-2\baselineskip}
\hspace*{\maxwidth}
Expand Down Expand Up @@ -620,7 +624,7 @@
\zihao{4}
\makebox[\maxwidth][l]{题\hspace{1.5em}目}\underline{\makebox[10cm][c]{\phantom{幻影}}}

\hspace*{\maxwidth}\underline{\makebox[10cm][l]{\phantom{幻影}}}
\hspace*{\maxwidth}\csustThesis@title@secunderline{\makebox[10cm][l]{\phantom{幻影}}}

\vspace*{-2\baselineskip}
\hspace*{\maxwidth}
Expand Down

0 comments on commit c16073c

Please sign in to comment.