评论

评论

我很快就会开始写我的硕士论文。我喜欢在论文中写一个序言。我使用basic-miktex-2.9.5105TeXmaker 作为编辑器——安装在 Windows 机器上。

另外:我能找到包含所有当前 LaTeX 软件包的发行版或软件包,比如 MikTeX(或其某个版本)吗?

答案1

通常我建议从头开始构建每个文档,因为每一个文档有自己的要求。但是,第二次看你的问题时,我认为确实有一些事情几乎每一个论文需要做的。因此,这里是论文的“最低限度的工作序言”:

\documentclass{report} % or even: book | or the koma classes: scrreprt, scrbook
% or for a small thesis 'article' or the corresponding 'scrartcl'
\usepackage{microtype}
\usepackage[<encoding>]{fontenc} % probabilly: T1
\usepackage[<encoding>]{inputenc} % probabilly: utf8
%\usepackage{palatino} % just as a matter of taste
\usepackage[<your language(s)>]{babel}
\usepackage{geometry} % and then \geometry{<settings>}
\usepackage{csquotes} % probabilly with the option: autostyle=true
\usepackage{ellipsis}
\usepackage{natbib} % or biblatex
\usepackage{graphicx}
%\graphicspath{ {images/} } % or whatever your "images"-directory is
\usepackage{todonotes} % or fixme
\usepackage{fancyhdr}
\usepackage{emptypage}
\usepackage{hyperref}

...

%declaration environment
\usepackage{titling}

\makeatletter
\newif\if@decltotoc
\newcommand\declarationname{Declaration of Authorship}
\newcommand\ltx@sectionings{chapter,section,subsection,subsubsection,subparagraph}
\newcommand\decl@rationsect{chapter}
\ifdefined\chapter\else\renewcommand\decl@rationsect{section}\fi
\newenvironment{declaration}[2][\decl@rationsect]{%
  \edef\@tempa{\decl@rationsect}%
  \edef\reserved@a{#1}%
  \gdef\theplace{#2}%
  \@decltotocfalse
  \@ifundefined{#1}{\@latex@warning{#1 not defined}}{%
    \@tempswafalse%
    \@for\sec:=\ltx@sectionings\do{\ifx\sec\reserved@a\@tempswatrue\fi}%
    \if@tempswa\let\@tempa\reserved@a\else
      \@latex@warning{#1 is not a sectioning command, so I overrode it}\fi}
  \csname\@tempa\endcsname*{\declarationname}
  \if@decltotoc\addcontentsline{toc}{\@tempa}{\declarationname}\fi
}{%
  \par\vskip6em\par\noindent\theauthor\hfill\theplace,\space\thedate\par
  \global\let\declaration\gobble@env
  \global\let\enddeclaration\relax
  \global\expandafter\let\csname enddeclaration*\endcsname\relax
}
\expandafter\def\csname declaration*\endcsname{\let\@decltotocfalse\@decltotoctrue\declaration}
\expandafter\let\csname enddeclaration*\endcsname\enddeclaration
\def\gobble@env{\@ifnextchar[{\@gobble@env}{\@gobble@env[]}}
\def\@gobble@env[#1]{\@bsphack\@@gobble@env}
\def\@@gobble@env#1\end{\@esphack\end}
\makeatother

代码的最后一部分将declaration环境定义为作者声明,这几乎是每篇论文不可或缺的一部分。它的使用非常简单:

\begin{declaration}{City}
  Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
  sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
  Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{declaration}

如果它应该出现在目录中,您可以说\begin{declaration*}{City}...\end{declaration*}

评论

  • 对于较大的论文,您很可能需要一个支持\chapter分段的文档类。无论如何,这里还有几个类需要考虑。为此,您可能需要查看CTAN 类概述
  • 一些包实际上在某种程度上是所有地方的默认包(假设是 pdfLaTeX):microtype包括 pdfTeXs 微排版扩展,inputencfontenc控制编码;如果你使用 XeLaTeX 或 LuaLaTeX,则这些包不可用
  • babel确保语言相关任务正确完成
  • 每所大学都对页面提出了(很可能是荒谬的)要求geometry
  • 您很可能需要引用:csquotes;作为补充ellipsis\dots,它纠正了文本模式下经常出现的错误空格
  • 您肯定需要以定制的风格引用:natbibbiblatex, ETC。
  • 如果你有外部数据:graphicx
  • 在撰写大型项目时,它可以方便地存储待办事项 - 这些事项必须在最终版本中排除,因此todonotes;人们通常喜欢使用替代方法fixme因为它克服了包装中todonotes关于纸币放置的界限
  • 通常你想要有可点击的交叉引用:hyperref;请注意,您必须加载hyperref(几乎)最后一个包以确保您的文档正确编译。这里您可以找到有关此主题的详尽讨论 - 例如,您必须geometry在之后加载hyperref;上面的序言在技术上是错误的;它只是因为列表中的“层次结构”而处于更高的位置
  • 最后两个或多或少是可选的:fancyhdr是设置页眉和页脚的标准工具,emptypage如果您希望空白页确实是空白的,则可以包括在内
  • 除了该todonotes包之外,你可能还想使用comment包作为伪版本控制系统
  • 根据您的主题,或者如果您需要在 LaTeX 中制作图纸和图表,您可能还需要

附录

值得注意的是,memoir文档用整整一章(21.“论文设计示例”,第 357-375 页)来解释如何设计论文风格。可能有一些关于可能想要纳入自己的序言中的附加功能的线索。然而,还应该说,本手册从包/类设计器的角度重点介绍了论文风格。

相关内容