Clean Thesis 版本 v0.4.1 更改字型類型 2020/06/17

Clean Thesis 版本 v0.4.1 更改字型類型 2020/06/17

我正在使用乾淨的論文範本來寫論文。看起來不錯,但是我想將正文的字體更改為喜劇新

編輯:我在套件選項中傳遞使用 sans-serif 的選項: \PassOptionsToPackage{...., sansserif=true,...}{cleanthesis}

另外,我在 cleanthesis.sty 中找到了程式碼部分,其中假設範本使用定義字體類型從 Serif 更改為 Sans-Serif:

\RequirePackage[T1]{fontenc}        % font types and character verification
% \ifthenelse{\boolean{@sansserif}}%
\ifct@cthesis@sansserif
%   {
% Using sans-serif fonts
%       \RequirePackage{helvet}
%       \RequirePackage{opensans}
%       \RequirePackage{comicneue}
        \RequirePackage{libertine}
%       \RequirePackage{tgadventor}
        \renewcommand*\familydefault{\sfdefault}%
%   }{%
\else
        % Using serif fonts
%       \RequirePackage{lmodern}    % font set: Latin Modern
%       \RequirePackage{charter}    % font set: Charter
%   }
\fi

我取消了程式碼的註釋,因此模板使用喜劇新作為 SS 字體類型。但是,由於某種原因,字體沒有改變。

我將其更改為 libertine 以檢查程式碼是否正常工作,是的,字體發生了變化: 在此輸入影像描述

但是當我將其更改為喜劇新,字體「返回」到我看來是 scrreprt 類別的預設無襯線字體(我不知道這是否屬實)。

在此輸入影像描述

我在載入套件時嘗試了使用和不使用 [default] 選項,但沒有成功。

比具體的還多喜劇新字體類型,我正在尋找的是在正文中使用製作字母的字體類型AG看起來就像我們手工做的一樣。所以,我也嘗試過TEX Gyre Adventor tgadventor qag但沒有任何作用。有趣的是,我對章節字體使用相同的 qag 字體類型,並且模板接受它,但不接受正文。

\newcommand{\tgherosfont}{\fontfamily{qag}\selectfont}
\newcommand{\thesischapterfont}{\color{ctcolorblack}\nobreak\normalfont\huge\fontfamily{qag}\selectfont}
\newcommand{\thesissectionfont}{\color{ctcolorsection}\nobreak\normalfont\Large\tgherosfont}

有什麼建議嗎?

先致謝!

答案1

cleanthesis.sty我們發現

% own font definitions
\newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont}
\newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont}
\newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont}

\newcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\nobreak\book\fontsize{60}{60}\selectfont}
\newcommand{\thesispartfont}{\color{ctcolorparttext}\nobreak\normalfont\huge \tgherosfont\selectfont}
\newcommand{\thesischapterfont}{\color{ctcolorblack}\nobreak\normalfont\huge \fontfamily{phv}\selectfont}
%\newcommand{\thesissectionfont}{\color{ctcolormain}\nobreak\LARGE\bfseries \tgherosfont}
\newcommand{\thesissectionfont}{\color{ctcolorsection}\nobreak\normalfont\LARGE \tgherosfont}
\newcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\nobreak\normalfont\Large \tgherosfont}
\newcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\nobreak\tgherosfont\small\bfseries}

\newcommand{\ctfontfooterpagenumber}{%
    \color{ctcolorfooterpage}%
    \normalfont\normalsize\bfseries \tgherosfont%
}
\newcommand{\ctfontfootertext}{%
    \color{ctcolorfootertitle}%
    \normalfont\footnotesize \tgherosfont%
}
%
% headings
\setkomafont{part}{\thesispartfont} % for chapter entries
\setkomafont{chapter}{\thesischapterfont} % for chapter entries
\setkomafont{section}{\thesissectionfont} % for section entries
\setkomafont{subsection}{\thesissubsectionfont} % for section entries
\addtokomafont{subsubsection}{\tgherosfont}
%\addtokomafont{paragraph}{\tgherosfont}
\setkomafont{paragraph}{\thesisparagraphfont}

這確實是有爭議的。目前還不清楚為什麼qbk(Bookman)用於零件:它是一種襯線字體,與任何其他選擇確實不相容。為什麼要交替使用phv(Helvetica) 和qhv(Heros)?為什麼明顯是錯誤的\nobreak命令?

您可能想要變更要使用的章節標題的字體定義\normalfont

\documentclass[a4paper]{scrbook}
\usepackage[
  sansserif,
]{cleanthesis}
\usepackage[default]{comicneue}

\renewcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\fontsize{60}{60}\normalfont}
\renewcommand{\thesispartfont}{\color{ctcolorparttext}\normalfont\huge\bfseries}
\renewcommand{\thesischapterfont}{\color{ctcolorblack}\normalfont\huge\bfseries}
\renewcommand{\thesissectionfont}{\color{ctcolorsection}\normalfont\LARGE}
\renewcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\normalfont\Large}
\renewcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\normalfont\small\bfseries}
\renewcommand{\ctfontfooterpagenumber}{\color{ctcolorfooterpage}\normalfont\normalsize\bfseries}
\renewcommand{\ctfontfootertext}{\color{ctcolorfootertitle}\normalfont\footnotesize}

\begin{document}

\chapter{Test}

This is a test

\section{Test}

This is a test

\end{document}

在此輸入影像描述

這就是說,論文是嚴肅的文件.雖然 ComicNeue 不像 ComicSans 那樣醜陋,但它完全不合適對於一份嚴肅的文件。

您希望看到您的國家的憲法以這種方式印刷嗎?或者你相信有人會考慮在 ComicNeue 上印製教宗的詔書嗎?你的論文是多年學習的成果,不要嘲笑它。

當委員會開始審查你的論文時,你準備好接受揚眉甚至大笑嗎?我不這麼認為。

別管了cleanthesis。寫得很糟糕。如果您堅持,請不要選擇該sansserif選項。並保留這些重新定義,因此標題的字體不會設定為某種隨機字體。

\documentclass[a4paper]{scrbook}
\usepackage{cleanthesis}
\usepackage{cochineal}

\renewcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\fontsize{60}{60}\normalfont}
\renewcommand{\thesispartfont}{\color{ctcolorparttext}\normalfont\huge\bfseries}
\renewcommand{\thesischapterfont}{\color{ctcolorblack}\normalfont\huge\bfseries}
\renewcommand{\thesissectionfont}{\color{ctcolorsection}\normalfont\LARGE}
\renewcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\normalfont\Large}
\renewcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\normalfont\small\bfseries}
\renewcommand{\ctfontfooterpagenumber}{\color{ctcolorfooterpage}\normalfont\normalsize\bfseries}
\renewcommand{\ctfontfootertext}{\color{ctcolorfootertitle}\normalfont\footnotesize}

\begin{document}

\chapter{Test}

This is a test

\section{Test}

This is a test

\end{document}

在此輸入影像描述

相關內容