整理我在 Overleaf 中整篇论文中使用 Garamond 的序言

整理我在 Overleaf 中整篇论文中使用 Garamond 的序言

我对 LaTeX 还不是很熟悉,正在用它写我的博士论文。我想从头到尾都使用 Garamond,但实现起来却非常困难。我阅读了很多有关各种软件包的指南,不得不在整个序言中对 \fontspec 进行一些疯狂的实现,才能看到我想要的输出。请问有人能帮我整理一下序言,并帮助在整个论文中实现 Garamond 吗?我非常感谢任何帮助!在有人提出建议之前,我尝试了以下方法:

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ebgaramond}

这是我所拥有的(很抱歉它太丑了)。这使我获得了 Garamond 字体,除了我的参考书目(我也希望用这种字体!)、目录和本地目录的超链接之外,所有内容都带有正常数字。

\documentclass[a4paper,12pt]{report}
\usepackage{luatextra}
\usepackage{fontspec}
    \setmainfont[Numbers=Lining]{EB Garamond}
\usepackage{color}
\usepackage{graphicx}
    \graphicspath{ {Figures/} }
\usepackage{subcaption}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{xcolor}
\usepackage{sectsty}
    \allsectionsfont{\fontspec{EB Garamond}}
    \definecolor{burgundy}{rgb}{0.5, 0.0, 0.13}
    \chapterfont{\color{burgundy}}  % sets colour of chapters
    \sectionfont{\fontspec{EB Garamond}} % sets colour of sections
    \subsectionfont{\fontspec{EB Garamond}}
    \subsubsectionfont{\fontspec{EB Garamond}}
\usepackage{caption}
    \DeclareCaptionLabelSeparator{bar}{ | }
    \DeclareCaptionFont{garabody}{\small \fontspec[Numbers=Lining]{EB Garamond}}
    \DeclareCaptionFont{garalabel}{\small \fontspec[Numbers=Lining]{EB Garamond} \color{burgundy}}
    \captionsetup{labelsep=bar,font=garabody, labelfont=garalabel}
\usepackage{etoc}
    \etocsettocstyle{}{}{\fontspec[Numbers=Lining]{EB Garamond}}
    \titleformat{\chapter}[display]   
    {\huge}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
    \renewcommand{\familydefault}{\sfdefault}
    \titlespacing\chapter{0pt}{12pt plus 4pt minus 2pt}{12pt plus 4pt minus 2pt}
\usepackage[margin=1in]{geometry}
\usepackage[section]{placeins}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage[backend=bibtex,style=numeric-comp,sorting=none,giveninits=true, url=false, doi=false, isbn=false, eprint= false, maxbibnames=99]{biblatex}
\bibliography{1-PhD.bib}
\usepackage{hyperref}
    \definecolor{darkgreen}{rgb}{0.0, 0.5, 0.0}
    \hypersetup{colorlinks, allcolors=darkgreen}
\usepackage{fancyhdr}
    \fancypagestyle{plain}{%
    \fancyhf{} % clear all header and footer fields
    \fancyfoot[C]{\fontspec[Numbers=Lining]{EB Garamond}\selectfont\thepage} % except the center
    \renewcommand{\headrulewidth}{0pt}
    \renewcommand{\footrulewidth}{0pt}}
    \pagestyle{plain}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\onehalfspacing


\begin{document}
\fontspec[Numbers=Lining]{EB Garamond}
\onehalfspacing

.....

\newpage\chapter{Overall Discussion} 
\input{chapters/Chapter9_Discussion.tex}

\appendix
\chapter{Appendix}
\input{chapters/Appendix}
\pagebreak

\newpage 
\chapter{Bibliography}
\printbibliography[heading=none]
\end{document}

相关内容