我从以下网址借用了此代码清洁论文模板在颜色选择上略有修改。
\documentclass[b5paper,11pt]{scrbook}
\usepackage{lipsum}
\usepackage{mathpazo}
\usepackage{xcolor}
\renewcommand*\chapterheadstartvskip{\vspace*{-8.75em}}
\renewcommand*\chapterheadendvskip{\vspace*{2.5\baselineskip}}
\renewcommand*{\chapterformat}{%
\ctchapternumber{\thechapter}%
}
\renewcommand{\chapterlinesformat}[3]{%
\ctchaptertitle{#3}%
#2%
}
\newcommand{\ctchapternumber}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.3\textwidth}%
\raggedleft{%
{\color{red!50!black}\rule[-5pt]{2pt}{5cm}}%
\quad%
{\color{red!50!black}\fontsize{60}{60}\selectfont#1}%
}%
\end{minipage}%
}
\newcommand{\ctchaptertitle}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.7\textwidth}%
\vspace*{5.85em}%
\raggedright%
#1%
\end{minipage}%
}
\begin{document}
\chapter{Introduction}
\lipsum[1]
\end{document}
这是我得到的结果。
如您所见,我已经将字体大小设置为 60,但它并没有变大。它似乎\fontsize{60}{60}
对章节号字体大小没有影响。如何解决这个问题?
答案1
您的代码会产生警告:
LaTeX Font Warning: Font shape `OT1/cmss/bx/n' in size <60> not available
(Font) size <24.88> substituted on input line 36.
所以你必须使用像这样的可缩放字体lmodern
。
补充说明:不要重新定义\chapterstartvskip
和\chapterendvskip
,而应使用\RedeclareSectionCommand
with 选项afterindent=false
。
例子:
\documentclass[b5paper,11pt]{scrbook}
\usepackage{lipsum}
\usepackage{mathpazo}
\usepackage{xcolor}
\usepackage{lmodern}% added
\RedeclareSectionCommand[
afterindent=false,
beforeskip=-8.75em,
afterskip=2.5\baselineskip
]{chapter}
\renewcommand*{\chapterformat}{%
\ctchapternumber{\thechapter}%
}
\renewcommand{\chapterlinesformat}[3]{%
\ctchaptertitle{#3}%
#2%
}
\newcommand{\ctchapternumber}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.3\textwidth}%
\raggedleft{%
{\color{red!50!black}\rule[-5pt]{2pt}{5cm}}%
\quad%
{\color{red!50!black}\fontsize{60}{60}\selectfont#1}%
}%
\end{minipage}%
}
\newcommand{\ctchaptertitle}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.7\textwidth}%
\vspace*{5.85em}%
\raggedright%
#1%
\end{minipage}%
}
\begin{document}
\chapter{Introduction}
\lipsum[1]
\end{document}
\documentclass{scrbook}
\usepackage{blindtext}
\usepackage{scrlayer-scrpage}
\ifoot{Test}
\setkomafont{pagenumber}{}
\addtokomafont{pagehead}{\Huge}
\begin{document}
\Blinddocument
\end{document}
\documentclass{scrartcl}
%\usepackage{datatool}
\usepackage[%
main=ngerman,
%english,
british,
american,
french,
]{babel}
\begin{document}
test
\end{document}
结果: