我目前正在与清洁论文包。到目前为止,自定义这个东西还可以,但现在我遇到了一个真正的问题。在尝试使用时minted
,我浪费了很多时间,直到我发现它可以工作,但不适用于我当前的cleanthesis
项目。为了测试目的,我用这个 MNWE 创建了一个新文件:
% **************************************************
% Document Class Definition
% **************************************************
\documentclass[%
paper=A4, % paper size --> A4 is default in Germany
twoside=true, % onesite or twoside printing
openright, % doublepage cleaning ends up right side
parskip=full, % spacing value / method for paragraphs
chapterprefix=true, % prefix for chapter marks
11pt, % font size
headings=normal, % size of headings
bibliography=totoc, % include bib in toc
listof=totoc, % include listof entries in toc
titlepage=on, % own page for each title page
captions=tableabove, % display table captions above the float env
draft=true, % value for draft version
]{scrreprt}%
% **************************************************
% Debug LaTeX Information
% **************************************************
\listfiles
\usepackage[utf8]{inputenc} % defines file's character encoding
% **************************************************
% Information and Commands for Reuse
% **************************************************
\newcommand{\thesisTitle}{}
\newcommand{\thesisName}{}
\newcommand{\thesisSubject}{Masterarbeit}
\newcommand{\thesisDate}{}
\newcommand{\thesisVersion}{0.1}
\newcommand{\thesisFirstReviewer}{}
\newcommand{\thesisFirstReviewerUniversity}{\protect{}}
\newcommand{\thesisFirstReviewerDepartment}{}
\newcommand{\thesisSecondReviewer}{ }
\newcommand{\thesisSecondReviewerUniversity}{\protect{}}
\newcommand{\thesisSecondReviewerDepartment}{\thesisFirstReviewerDepartment}
\newcommand{\thesisFirstSupervisor}{}
\newcommand{\thesisSecondSupervisor}{}
\newcommand{\thesisUniversity}{\protect{Universität Bielefeld}}
\newcommand{\thesisUniversityDepartment}{Technische Fakultät}
\newcommand{\thesisUniversityInstitute}{}
\newcommand{\thesisUniversityGroup}{\thesisFirstReviewerDepartment}
\newcommand{\thesisUniversityCity}{Bielefeld}
\newcommand{\thesisUniversityStreetAddress}{}
\newcommand{\thesisUniversityPostalCode}{33615 Bielefeld}
% **************************************************
% Load and Configure Packages
% **************************************************
\usepackage[ngerman]{babel} % babel system, adjust the language of the content
\usepackage[ % clean thesis style
figuresep=colon,%
sansserif=false,%
hangfigurecaption=true,%
hangsubsection=true,%
colorize=full,%
colortheme=bluemagenta,%
bibsys=biber,%
bibfile=refs,%
bibstyle=numeric,%
]{cleanthesis}
\usepackage{minted}
\begin{document}
\begin{minted}{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}
有什么想法可能导致这个问题吗?
答案1
您正在传递draft=true
给\documentclass
,因此它是一个全局选项;也minted
理解并接受它。
解决方案:
\usepackage[draft=false]{minted}