LaTeX备忘——参考文献示例

本文介绍LaTeX中参考文献表示方法之一。


操作系统:Ubuntu 20.04

编辑工具:TeXstudio 2.12.22

编译方式:LuaLaTeX

编译命令:lualatex -shell-escape -synctex=1 -interaction=nonstopmode %.tex


示例文件的完整代码如下:

% 开源中国,陆巍
\documentclass[oneside]{book}%

% 注意宏包顺序,有可能会报错
\usepackage{ctex}% 中文支持
\usepackage{geometry}% 用于页面设置
\usepackage[dvipsnames, svgnames, x11names]{xcolor} % 颜色支持
\usepackage{graphics}% 图形支持
\usepackage[
  colorlinks=true,
  linkcolor=Navy,
  urlcolor=Navy,
  citecolor=Navy,
  anchorcolor=Navy
]{hyperref}
\usepackage{enumerate}% 枚举支持
\usepackage{tcolorbox}% 支持更好的文本框
\usepackage[english]{babel}% 载入美式英语断字模板
\usepackage[cache=false]{minted}% 支持更好的代码显示

% 设置为A4纸,边距适中模式(永中office)
\geometry{%
  width = 210mm,%
  height = 297mm,
  left = 19.1mm,%
  right = 19.1mm,%
  top = 25.4mm,%
  bottom = 25.4mm%
}

\hyphenpenalty = 1000% 断字设置,值越大,断字越少。
\setmainfont{Ubuntu Mono}% 设置全局英文字体
\setlength{\parindent}{2em}% 缩进
\setlength{\parskip}{2ex} % 段间距
\setcounter{secnumdepth}{3} % 显示到第3级section的编号

% 修改参考文献的标题,默认是Bibliography,这里改为References
% 这里因为使用了babel宏包,所以命令如下。如果未使用babel宏包,则使用命令:
% \renewcommand{\bibname}{References}
\addto{\captionsenglish}{\renewcommand{\bibname}{References}}

\begin{document}
  % ------------------ 目录 -------------------
  \tableofcontents  % 生成目录
  
  % ------------------ 前言 -------------------
  \frontmatter

  % ------------------ 正文 -------------------
  \mainmatter%
  \chapter{参考文献示例}
  ……
  
  解决这些问题的一个关键是可重用性。软件重用的想法并不新鲜。但是,尽管取得了一些成功,可重用性并没有成为软件开发的推动力。许多不成功的重用方法都没有满足重用性的基本要求\cite{ref1}。
  
  ……
  
  阻碍开发可重复使用组件的因素之一是,建造可重复使用的单元需要更多的时间和精力\cite{ref3,ref4}。
  
  ……
  
  
  \begin{thebibliography}{7}
    \bibitem{ref1}Basili, V. R., and H. D. Rombach, “Support for Comprehensive Reuse,” \textit{Software Engineering}, Vol. 6, No. 5, 1991, pp. 303–316.
    \bibitem{ref2}Brown, A. W., \textit{Large-Scale Component-Based Development}, Upper Saddle River, NJ: Prentice Hall, 2000.
    \bibitem{ref3}Crnkovic, I., and M. Larsson, “A Case Study: Demands on Component-Based Development,” \textit{Proc. 22nd Int. Conf. Software Engineering}, Limerick, Ireland, ACM Press, 2000.
    \bibitem{ref4}Szyperski, C., \textit{Component Software Beyond Object-Oriented Programming}, Reading, MA: Addison-Wesley, 1998, pp. 46–56.
    \bibitem{ref5}Maiden, N. A., and C. Ncube, “Acquiring COTS Software Selection Requirements,” \textit{IEEE Software}, Vol. 15, No. 2, 1998, pp. 46–56.
    \bibitem{ref6}Lamsweerde, A. V., “Requirements Engineering in the Year 00: A Research Perspective,” \textit{Proc. 22nd Int. Conf. Software Engineering}, Limerick, Ireland, ACM Press, 2000.
    \bibitem{ref7}Larsson, M., “Applying Configuration Management Techniques to Component-Based Systems,” Licentiate Thesis Dissertation 2000-007, Department of Information Technology, Uppsala University, Uppsala, Sweden, 2000.
  \end{thebibliography}
  
  
\end{document}

效果如下:

LaTeX参考文献示例

关于参考文献的标题,默认是Bibliography,修改的方法在代码中有详细描述。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章