Unverified Commit 64e02f89 authored by liziwl's avatar liziwl Committed by GitHub
Browse files

Merge pull request #53 from SUSTech-CRA/fix/uppercase

允许论文题目和章节题目出现特殊的小写字母
parents a16b8f09 dd9cd543
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ Changelog 维护应保持最新版本在文件上面的原则,日期格式按

## [Unreleased](https://github.com/SUSTech-CRA/sustech-master-thesis/compare/v1.3.13...HEAD)

### Changed
- 允许论文题目和章节题目出现特殊的小写字母


## [1.3.13](https://github.com/SUSTech-CRA/sustech-master-thesis/compare/v1.3.12...v1.3.13)
### Added
- 增加数学字体配置选项 math-style。
+1 −1
Original line number Diff line number Diff line
% !TeX root = ../sustechthesis-example.tex

\chapter{English Example}
\chapter{English and $\text{lower-case}$ Example}

If your supervisor is a foreign resident, or if your supervisor or defense committee specifically allows writing in English, the thesis may be written in English as the primary language. Please check with your supervisor or department secretary to confirm if you can write in English.

+3 −2
Original line number Diff line number Diff line
@@ -18,9 +18,10 @@
  % 标题
  %   可使用“\\”命令手动控制换行
  %   如果需要使用副标题,取消 subtitle 和 subtitle* 的注释即可。
  %   特别字符允许小写,例如行内公式,其他所有字词全部大写。
  %
  title  = {南方科技大学学位论文 \LaTeX{} 模板 (Support English) 使用示例文档 v\version},
  title* = {An Introduction to \LaTeX{} Thesis Template of Southern University of Science and Technology v\version},
  title  = {南方科技大学学位论文 \LaTeX{} 模板 (Support English and $\text{lower-case}$) 使用示例文档 v\version{}},
  title* = {An Introduction to \LaTeX{} Thesis Template (Support $\text{lower-case}$) of Southern University of Science and Technology v\version{}},
  % subtitle = {可选的副标题可选的副标题可选的副标题可选的副标题可选的副标题可选的副标题},
  % subtitle* = {optional subtitle optional subtitle optional subtitle optional subtitle optional subtitle optional subtitle},
  %
+17 −11
Original line number Diff line number Diff line
@@ -1273,6 +1273,11 @@
\RequirePackage{xparse}
%    \end{macrocode}
%
% 利用 \pkg{textcase} 英文大小写转换。
%    \begin{macrocode}
\RequirePackage{textcase}
%    \end{macrocode}
%
%    \begin{macrocode}
\RequirePackage{geometry}%
%    \end{macrocode}
@@ -2277,7 +2282,7 @@
      }%
    \else
      \def\chaptermark##1{%
        \markboth{\MakeUppercase{\CTEXifname{\CTEXthechapter\quad}{}##1}}{}%
        \markboth{\CTEXifname{\MakeTextUppercase{\CTEXthechapter\quad}}{}##1}{}%
      }%
    \fi
  \fi
@@ -2880,8 +2885,7 @@
    \ctexset{%
      chapter = {
        format      = \centering\sffamily\bfseries\fontsize{16bp}{20bp}\selectfont,
        nameformat  = \MakeUppercase,
        titleformat = \MakeUppercase,
        nameformat  = \MakeTextUppercase,
        name        = \chaptername\space,
      },
      section = {
@@ -3130,7 +3134,7 @@
    \else
      \titlecontents{chapter}
        [\z@]{\rmfamily \heiti}
        {\bfseries \contentspush{\MakeUppercase{\thecontentslabel}\quad}}{\bfseries}
        {\bfseries \contentspush{\MakeTextUppercase{\thecontentslabel}\quad}}{\bfseries}
        {\rmfamily\thu@leaders\thecontentspage}%
    \fi
    \titlecontents{section}
@@ -3143,19 +3147,21 @@
      {\thu@leaders\thecontentspage}%
  \fi
}
% 目录样式
% 南科大规定格式,英文论文,chapter 全部大写,包括目录内的章节条目,页眉,正文章节标题。
% 使用 MakeTextUppercase 而不是 MakeUppercase,这样不会影响特殊字符。
\ifthu@main@language@english
  \ifdefined\texorpdfstring\else\newcommand{\texorpdfstring}[2]{#1}\fi
  \let\oldchapter\chapter
  \renewcommand{\chapter}{\@ifstar{\@sChapter}{\@Chapter}}
  \newcommand{\@sChapter}[2][]{%
    \oldchapter*{\texorpdfstring{\MakeUppercase{#2}}{#2}}}
    \oldchapter*{\texorpdfstring{\MakeTextUppercase{#2}}{#2}}}
  \newcommand{\@Chapter}[2][]{%
    \def\shortsec{#1}%
    \ifx\shortsec\empty%
      \oldchapter{\texorpdfstring{\MakeUppercase{#2}}{#2}}
      \oldchapter{\texorpdfstring{\MakeTextUppercase{#2}}{#2}}
    \else%
      \oldchapter[\texorpdfstring{\MakeUppercase{#1}}{#1}]{\texorpdfstring{\MakeUppercase{#2}}{#2}}
      \oldchapter[\texorpdfstring{\MakeTextUppercase{#1}}{#1}]{\texorpdfstring{\MakeTextUppercase{#2}}{#2}}
    \fi}
\fi
\thu@set@toc@format
@@ -3462,11 +3468,11 @@

    % 18 bp*1.3默认行距比例*1.25行距 = 29.25
    % 16 bp*1.3默认行距比例*1.25行距 = 26
    {\fontsize{18bp}{29.25bp}\selectfont \textbf{\MakeUppercase{\thu@title@en} \\} }
    {\fontsize{18bp}{29.25bp}\selectfont \textbf{\MakeTextUppercase{\thu@title@en} \\} }
    \ifx\thu@subtitle@en\empty
      \relax%
    \else
      {\fontsize{16bp}{26bp}\selectfont \textbf{\MakeUppercase{\thu@subtitle@en} \\} }
      {\fontsize{16bp}{26bp}\selectfont \textbf{\MakeTextUppercase{\thu@subtitle@en} \\} }
    \fi
    \vfill

@@ -3687,11 +3693,11 @@ Thesis for the degree of \degree@level@en@noun \ of \thu@degree@domain@en%
      \centering
      % 22 bp*1.15默认行距比例*1.25行距 = 31.625
      % 18 bp*1.15默认行距比例*1.25行距 = 25.875
      {\fontsize{22bp}{31.625bp}\selectfont \textbf{\MakeUppercase{\thu@title@en} \\}}
      {\fontsize{22bp}{31.625bp}\selectfont \textbf{\MakeTextUppercase{\thu@title@en} \\}}
      \ifx\thu@subtitle@en\empty
        \relax%
      \else
        {\fontsize{18bp}{25.875bp}\selectfont \textbf{\MakeUppercase{\thu@subtitle@en} \\}}
        {\fontsize{18bp}{25.875bp}\selectfont \textbf{\MakeTextUppercase{\thu@subtitle@en} \\}}
      \fi
      }
    \par