如何为论文中选定的章节添加摘要

如何为论文中选定的章节添加摘要

我正在尝试为我的论文中的一些选定章节添加摘要。我正在使用 shareLatex,并选择了他们免费提供的模板(剑桥模板)。问题是该文件中有很多文件夹,您必须独立处理每个文件。我对 latex 的这种方式还不太熟悉,我希望得到详细的解释。例如,在这个 shareLatex 中,其中一个文件夹称为“Macros”,其他文件夹称为“Classes”,依此类推。thesis.tex 具有以下 %input 宏(即编写您自己的宏文件 MacroFile1.tex)

%\include{Macros/MacroFile1}

 \documentclass[oneside,12pt]{Classes/CUEDthesisPSnPDF}


\ifpdf
    \pdfinfo { /Title  (CUED PhD and MPhil Thesis Classes)
               /Creator (TeX)
               /Producer (pdfTeX)
               /Author (######@gmail.com)
               /CreationDate (D:20030101000000)  %format D:YYYYMMDDhhmmss
               /ModDate (D:20030815213532)
               /Subject (Writing a PhD thesis in LaTeX)
               /Keywords (PhD, Thesis)}
    \pdfcatalog { /PageMode (/UseOutlines)
                  /OpenAction (fitbh)  }
\fi

\title{Writing a PhD Thesis\\[1ex]
        in \LaTeXe}

\ifpdf
  \author{\href{mailto:####[email protected]}{######}}
  \collegeordept{\href{http://business-school.exeter.ac.uk/research/areas/topics/economics}{Department of Economics}}
  \university{\href{http://www.exeter.ac.uk}{University of Exeter}}
% insert below the file name that contains the crest in-place of 'UnivShield'
  \crest{\includegraphics[width=90mm]{UnivShield}}
\else
  \author{####}
  \collegeordept{######}
  \university{#######}
% insert below the file name that contains the crest in-place of 'UnivShield'
  \crest{\includegraphics[bb = 0 0 292 336, width=30mm]{UnivShield}}
\fi
%
% insert below the file name that contains the crest in-place of 'UnivShield'
% \crest{\IncludeGraphicsW{UnivShield}{40mm}{14 14 73 81}}
%
%\renewcommand{\submittedtext}{change the default text here if needed}
\degree{Doctor of Philosophy}
\degreedate{Yet to be decided}

% turn of those nasty overfull and underfull hboxes
\hbadness=10000
\hfuzz=50pt

% Put all the style files you want in the directory StyleFiles and usepackage like this:
\usepackage{StyleFiles/watermark}

% Comment out the next line to get single spacing
\onehalfspacing

\usepackage{natbib}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{etex,etoolbox}
\usepackage{amsthm,amssymb}
\usepackage{thmtools}
\usepackage{environ}
\usepackage{thmtools,thm-restate}
% ------------------------------------------------------------------------

\bibliographystyle{agsm}

% ------------------------------------------------------------------------


\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{claim}{Claim}
\newtheorem{fact}{Fact}
\newtheorem{corollary}{Corollary}
\newtheorem{assumption}{Assumption}
\newtheorem{algoritheorem}{Algoritheorem}
\newtheorem{remark}{Remark}
\newtheorem{definition}{Definition}



\newtheoremstyle{named}{}{}{\itshape}{}{\bfseries}{.}{.5em}{\thmnote{#3's }#1}
\theoremstyle{named}
\newtheorem*{namedtheorem}{Theorem}



% ------------------------------------------------------------------------    
\newcommand\equDis{\,{\buildrel d \over =}\,} 
\newcommand\AsyDis{\xrightarrow[]{d}}
\newcommand\AsyArrow{\xrightarrow[]{}}

% ------------------------------------------------------------------------    


% ------------------------------------------------------------------------
\DeclareMathOperator{\PR}{\mathbb{P}}
\DeclareMathOperator{\RNB}{\mathbb{R}} % Real NUmber Bold
\DeclareMathOperator{\sign}{sign} % sign Operator 

% ------------------------------------------------------------------------




\begin{document}

%\language{english}

% A page with the abstract on including title and author etc may be
% required to be handed in separately. If this is not so, then comment
% the below 3 lines (between '\begin{abstractseparte}' and 
% 'end{abstractseparate}'), normally like a declaration ... needs some more
% work, mind as environment abstracts creates a new page!
% \begin{abstractseparate}
%   \input{Abstract/abstract}
% \end{abstractseparate}




% Using the watermark package which is in StyleFiles/
% and to remove DRAFT COPY ONLY appearing on the top of all pages comment out below line
%\watermark{DRAFT COPY ONLY}


\maketitle

%set the number of sectioning levels that get number and appear in the contents
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\frontmatter % book mode only
\pagenumbering{roman}
\include{Dedication/dedication}
\include{Acknowledgement/acknowledgement}
\include{Abstract/abstract}

\tableofcontents
\listoffigures
\printnomenclature  %% Print the nomenclature
\addcontentsline{toc}{chapter}{Nomenclature}

\mainmatter % book mode only
\include{Introduction/introduction}
\include{Chapter1/chapter1}
\include{Chapter2/chapter2}
\include{Chapter3/chapter3}
\include{Conclusions/conclusions}

\backmatter % book mode only
\appendix
\include{Appendix1/appendix1}
\include{Appendix2/appendix2}



\renewcommand{\bibname}{References} % changes default name Bibliography to References
\bibliography{References/references} % References file

\end{document}

答案1

通过互联网,似乎很明显每个 latex 文件在 latex 中都有自己的文档类 (\documentclass)。在我使用的模板中,我应该访问一个名为“Classes”的文件夹并按照“CUEDthesisPSnPDF”进行操作。在文件“CUEDthesisPSnPDF”中,我在此文件下搜索了摘要,我编写了以下环境

\newenvironment{chapabstract}
{
    \begin{center}%
    \vspace*{1.5cm}
      \Large \bfseries Abstract \vspace{-.5em}\vspace{0pt}
    \end{center}
    \list{}{%
    \setlength{\leftmargin}{5mm}% <---------- CHANGE HERE
    \setlength{\rightmargin}{\leftmargin}%
  }%
  \item\relax
}
{\par}
\makeatother

因此,在每一章中,我都做了以下工作

\chapter{Hello}
\begin{chapabstract}
     I am good
\end{chapabstract}
\section{ One}

相关内容