对于我的学士论文,我想在开头添加引文来完善我的工作。我该怎么做才能让它看起来像这样
提前致谢!
编辑 1:MWE
好的,这是一个 MWE,希望它能帮助解答这个问题。MWE 参考应该看起来像图中的参考。
\documentclass[12pt,a4paper,onecolumn,oneside,draft=on]{article}
\usepackage[left=4cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage{titlesec}
\usepackage[nottoc]{tocbibind}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{float}
\usepackage[backend=biber,bibencoding=utf8,natbib=true,style=apa]{biblatex}
\addbibresource{Reftester.bib}
\usepackage{subcaption}
\usepackage{pdfpages}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em} {0.5em}}
\makeatletter
\def\@biblabel#1{\hspace*{-\labelsep}}
\makeatother
\makeatletter
\renewcommand{\@cite}[1]{#1}
\makeatother
\setlength{\parindent}{0 cm}
\setlength{\parskip}{6 pt}
\setcounter{tocdepth}{100}
\begin{document}
"This is a famous reference and should be higlighted as in the picture of this post." \citet{Mokyr1999}
\printbibliography[ title={7 References}]
\end{document}
编辑 2:MWE 的 Bibtex 条目
@InBook{Mokyr1999,
chapter = {The New Economic History and the Industrial Revolution.},
pages = {1--127},
title = {The British Industrial Revolution: An Economic Perspective},
publisher = {Boulder: Westview.},
year = {1999},
author = {Mokyr, Joel},
editor = {Mokyr, Joel},
edition = {2nd. ed.},
}
答案1
这个答案只关注所需输出的引用方面。为了更好地格式化引文本身,请查看章节开头的“励志”引言以及许多相关问题。
我不太清楚除了条目类型之外的条目的引用@inbook
应该是什么样子。我推断了一下,但这将需要調整。
我们只需定义一个新的引用命令,\fancyquotecite
即可使用它来代替通常的\cite
、\textcite
等。\fancyquotecite
它由参考书目宏提供动力fancyquotecite
,并打印标签名称(与作品/条目相关的主要名称,通常是author
或editor
)和标题。
\documentclass[12pt,a4paper,onecolumn,oneside]{article}
\usepackage[english,ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa]{biblatex}
\DeclareCiteCommand{\fancyquotecite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{fancyquotecite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\newbibmacro{fancyquotecite}{%
\printnames[given-family]{labelname}%
\setunit{\addcomma\space}%
\printfield{maintitle}%
\setunit{\addcomma\space}%
\printfield{booktitle}%
\setunit{\addcomma\space}%
\printfield{title}%
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@InBook{Mokyr1999,
title = {The New Economic History and the Industrial Revolution},
pages = {1--127},
booktitle = {The British Industrial Revolution},
booksubtitle = {An Economic Perspective},
publisher = {Westview},
location = {Boulder},
year = {1999},
author = {Mokyr, Joel},
editor = {Mokyr, Joel},
edition = {2},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\fancyquotecite{Mokyr1999}
\printbibliography[heading=bibnumbered]
\end{document}
请注意我如何更改文件中某些字段的内容.bib
以更好地与 配合使用。还请注意,在中biblatex
包含章节编号是个坏主意,请改用。title
\printbibliography
heading=bibnumbered