版權聲明:本文為博主原創文章,未經博主同意不得轉載。 https://blog.csdn.net/tengweitw/article/details/35570935
本文是對前面LaTeX論文排版文章的總結。前面的幾篇文章是分別從論文的幾個方面來講述LaTeX的排版問題,這里綜合了前面的內容。給出了論文排版的模版。
在上面的每條命令語句下插入該標題的相關內容就可以。效果顯演示樣例如以下圖:

模版的使用:
1、首先建立一個main.tex文件,該文件用於管理論文的總體構架,文件代碼為:
\documentclass[a4paper,12pt]{book}
\usepackage{ctexcap}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[super,square,comma,sort&compress]{natbib}%設置參考文獻的格式
%%%設置頁邊距
\usepackage{geometry}
\geometry{left=4cm,right=2cm,top=3cm,bottom=2cm}
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}% 設置換行
\graphicspath{{pics/},{figs/}}
\usepackage{float}%是圖片懸浮
\usepackage{bm}
\usepackage{times}
\usepackage{mathptmx} %設置為羅馬體
\usepackage{caption}
\captionsetup{labelsep=space}
%\usepackage[colorlinks,dvipdfm, %電子版時使用這個包
% bookmarksopenlevel=2,
% pdfpagemode=UseNone,
% pdfstartview=FitB,
% linkcolor=black,
% citecolor=blue,
% linkcolor=black,
% hyperindex=true,
% pagebackref=true,
% CJKbookmarks=true,
% colorlinks]{hyperref}
\renewcommand{\captionfont}{\zihao{5}\songti}
\renewcommand\theequation{\thechapter-\arabic{equation}}%公式編號
\usepackage{setspace}%使用間距宏包
\usepackage{comment}
\linespread{1.5}
\CTEXsetup[beforeskip={0pt}]{chapter}
\CTEXsetup[nameformat={\heiti\zihao{3}\centering}]{chapter}%章標題格式
\CTEXsetup[titleformat={\heiti\zihao{3}\centering}]{chapter}%章標題格式
\CTEXsetup[format={\songti\zihao{4}\centering}]{section}% 節標題格式
\CTEXsetup[format={\songti\zihao{-4}}]{subsection}%小節標題格式
\CTEXsetup[format={\songti\zihao{-4}}]{subsubsection}%小節標題格式
\usepackage{titletoc}
\begin{document}\songti\zihao{-4}%設置正文字體格式
\pagenumbering{Roman}
\include{Abstract}
\songti\zihao{-4}
\setcounter{tocdepth}{2}%設置文件夾深度
\thispagestyle{plain}
\titlecontents{chapter}
[0.0em]
{\songti\zihao{-4}\bfseries\addvspace{10bp minus 0bp}} %\song
{\thecontentslabel\hspace{0.5em}}
{}
{\normalfont\dotfill\textrm{\contentspage[{\bfseries\thecontentspage}]}}
\newgeometry{bottom=3cm,top=3cm}
\tableofcontents
\restoregeometry
%\include{chapter1}
%\include{chapter2}
%\include{chapter3}
%\include{chapter4}
%\include{chapter5}
%\include{thanks}
%\include{appendix}
%\include{reference}
\end{document}
在上面的代碼中。我將\include命令都給了凝視。能夠依據你論文的章節來去掉相應的%。
比方說,我的論文有5章,還有致謝、附錄和參考文獻部分,則我須要將上面代碼中include命令前的%去掉。同一時候,我須要新建chapter1.tex……chapter5.tex來編寫1-5章的內容。thanks.tex相應致謝部分,appendix.tex相應附錄部分,reference.tex相應參考文獻部分。你能夠依據實際情況來增、刪、改相應的部分。
2、對於每一章的內容,大體形式例如以下(以第一章chapter1.tex的框架為例):
\chapter{緒論}
\section{研究背景及意義}
\subsection{無線頻譜的分配與利用}
\subsection{提高頻譜利用效率的方法}
\section{認知無線電概述}
\subsection{認知無線電的定義}
\subsection{認知無線電的關鍵技術}
\subsection{國內外認知無線電的研究現狀}
\section{論文內容及結構}
在上面的每條命令語句下插入該標題的相關內容就可以。效果顯演示樣例如以下圖:

到如今為止,LaTeX論文排版最終告一段落了,盡管這些文章僅僅解說了一些簡單的問題,可是用來排版畢設論文已經足夠了。離畢設答辯都過去半個多月了,因為比較忙,到如今才剛將關於論文排版的文章寫完。說也羞愧,英語學習停止了大概一個多月了。下個月要將其補回來。BTW,前天舉辦了畢業典禮。有幸得到校長頒發學位證的機會,今天學院又進行了授位儀式,是真的要畢業了。