芝加哥作者日期要求像这样标明原始出版物:Smith [2008] 2020
,对于 2008 年首次出版的书,但我引用的是 2020 年的版本。
我按照此线程中的说明将其放入 Zotero 中的“Extra”字段中:https://forums.zotero.org/discussion/94398/include-original-date-of-publication-in-citation
我知道这从 Zotero 的角度来看是有效的,因为如果我在 LibreOffice Writer 中输入参考,它就会做正确的事情。
我如何在 LaTeX 中执行此操作以便将其转换为 PDF?
谢谢!
以下是一个例子:
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[a4paper, 12pt, oneside]{article}
\usepackage[a4paper, portrait, margin=1in]{geometry}
\usepackage{ulem}
\usepackage{float}
\normalem
\usepackage{soul}
\usepackage{graphicx}
\graphicspath{{"/home/me/Documents/Project/3 Things/Images/"}{}}
\usepackage{caption}
\usepackage{titling}
\author{My Name}
\title{My Title}
% HEADINGS & SECTIONS%
\usepackage[onehalfspacing]{setspace}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\large\bfseries\singlespacing}{\thesection}{1em}{}
\AddToHook{cmd/section/before}{\clearpage\setcounter{footnote}{0} }
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{calc}
\usepackage{etoolbox}
\makeatletter
\pretocmd{\@schapter}{\setcounter{footnote}{0}}{}{}
\pretocmd{\@chapter}{\setcounter{footnote}{0}}{}{}
\makeatother
\usepackage{xcolor}
% CITATION
% Load BibLaTeX and set the style to Author-Year
\usepackage[style=authoryear, backend=biber]{biblatex}
% Tell BibLaTeX to use the file `example.bib` for the bibliography database
\addbibresource{/home/me/Documents/Zotero/Library.bib}
% FOOTNOTES%
\usepackage[hang, flushmargin,splitrule,multiple]{footmisc}
\makeatletter%%
\patchcmd{\@makefntext}{%
\ifFN@hangfoot
\bgroup}%
{%
\ifFN@hangfoot
\bgroup\def\@makefnmark{\rlap{\normalfont\@thefnmark.}}}{}{}%
% %%%
\patchcmd{\@makefntext}{%
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\hss\@makefnmark}}%
{%
\ifdim\footnotemargin>\z@
\hb@xt@ \footnotemargin{\@makefnmark\hss}}{}{}%
\makeatother
\setlength{\footnotemargin}{1.25em} % Between marker and text
\setlength{\skip\footins}{1\baselineskip} % Between main text and note rule
\setlength{\footnotesep}{\skip\footins} % Between footnotes [= previous]
\renewcommand{\hangfootparskip}{0pt}
\renewcommand{\hangfootparindent}{1em}
%%
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
%\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
%\IfFileExists{microtype.sty}{% use microtype if available
% \usepackage[]{microtype}
% \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
%}{}
%\makeatletter
%\@ifundefined{KOMAClassName}{% if non-KOMA class
% \IfFileExists{parskip.sty}{%
% \usepackage{parskip}
% }{% else
% \setlength{\parindent}{0pt}
% \setlength{\parskip}{6pt plus 2pt minus 1pt}}
%}{% if KOMA class
% \KOMAoptions{parskip=half}}
%\makeatother
\usepackage{xcolor}
%\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
%\setlength{\emergencystretch}{3em} % prevent overfull lines
%\providecommand{\tightlist}{%
% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
% SECTION NUMBERING %
%\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
% Fake Sections that don't appear in the TOC or as Headers %
\newcommand{\fakesection}[1]{%
\par\refstepcounter{section}% Increase section counter
\sectionmark{#1}% Add section mark (header)
\addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}% Add section to ToC
% Add more content here, if needed.
}
%% FANCY HEADER %%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf[]{}
\fancyhead[R]{lastname \thepage}
\fancyhead[L]{}
\fancyfoot[]{}
\usepackage[a4paper, portrait, margin=1in]{geometry}
\fontsize{12pt}{12pt}\selectfont
\usepackage{setspace}
%\doublespacing
\newlength\FHoffset
\setlength\FHoffset{1cm}
\fancyheadoffset{\FHoffset}
\AtBeginEnvironment{quote}{\par\singlespacing\small}
\setlength{\parindent}{5em}
% START DOCUMENT %
\makeatletter
\begin{document}
$body$
\footcite{Hume1896Treatise}
\printbibliography
\end{document}
\makeatother
这是我的 .bib 文件中的相关条目:
@book{Hume1896Treatise,
title = {A Treatise of Human Nature},
author = {Hume, David},
editor = {Selby-Bigge, L. A. (Lewis Amherst)},
date = {1896},
origdate = {1739/1740},
publisher = {{Oxford, Clarendon press}},
url = {http://archive.org/details/treatiseofhumann01humeuoft},
urldate = {2022-11-26},
abstract = {book I. Of the understanding. 1739.--book II. Of the passions. 1739.--book III. Of morals. With an appendix. Wherein some passages of the foregoing volumes are illustrated and explain'd. 1740; 31},
editora = {{Kelly - University of Toronto}},
editoratype = {collaborator},
langid = {english},
pagetotal = {746},
keywords = {Important,Primary,Ultra Priority},
file = {/home/Zotero/storage/LMXV657W/treatiseofhumann01humeuoft.pdf}
}
(注意“origdate”变量)
我看过这个:Biblatex 上的原始出版日期
但它对我不起作用。
谢谢!
答案1
如果您想要芝加哥风格,您应该加载biblatex-chicago
(带有authordate
选项)而不仅仅是biblatex
它的标准authoryear
风格(\usepackage[style=authoryear, backend=biber]{biblatex}
)。
为了按照需要处理 origdate,您还需要设置选项cmsdate=both,
。
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[authordate, cmsdate=both, backend=biber]{biblatex-chicago}
\begin{filecontents}{\jobname.bib}
@book{Hume1896Treatise,
title = {A Treatise of Human Nature},
author = {Hume, David},
editor = {Selby-Bigge, Lewis Amherst},
date = {1896},
origdate = {1739/1740},
publisher = {Clarendon press},
location = {Oxford},
url = {http://archive.org/details/treatiseofhumann01humeuoft},
urldate = {2022-11-26},
editora = {{Kelly - University of Toronto}},
editoratype = {collaborator},
langid = {english},
pagetotal = {746},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{Hume1896Treatise}
ipsum \autocite{sigfridsson}
\printbibliography
\end{document}
如果你想在所有情况下强制使用方括号,你可能想尝试添加
\renewbibmacro*{cite:bothyear+oldstyle}{%
\ifboolexpr{ (
test {\ifentrytype{music}}%
or
test {\ifentrytype{review}}%
or
test {\ifentrytype{standard}}%
or
test {\ifentrytype{suppperiodical}}%
or
test {\ifentrytype{video}}%
)
and
togl {cms@avdate}%
}%
{\usebibmacro{cite:av+labelyear+extrayear}}%
{\iftoggle{cms@switchdates}%
{\printtext[cmsyearhyper]{%
\bibopenbracket%
\usebibmacro{cite:labelyear+extrayear}%
\bibclosebracket%
\clearfield{extradate}\clearfield{extratitleyear}%
\addspace%
\printorigdateextra}}% \usebibmacro{origyear+endyear}
{\iffieldundef{origyear}% ???
{\iftoggle{cms@ordate}%
{}%
{\clearfield{extradate}\clearfield{extratitleyear}}%
\usebibmacro{cite:standard+labelyear+extrayear}}%
{\iftoggle{cms@ordate}% Added test for year field ???
{\iffieldundef{year}%
{\usebibmacro{cite:origfirst+labelyear+extrayear}}%
{\printtext[cmsyearhyper]{%
\bibopenbracket%
\usebibmacro{cite:origfirst+labelyear+extrayear}%
\bibclosebracket%
\setunit{\addspace}%\addspace% ???
\clearfield{extradate}\clearfield{extratitleyear}%
\printdateextra}}}%\usebibmacro{year+endyear}
{\iffieldundef{year}%
{\usebibmacro{cite:origfirst+labelyear+extrayear}}%
{\printtext[cmsyearhyper]{%
\bibopenbracket%
\clearfield{extradate}\clearfield{extratitleyear}%
\printorigdateextra%
% \usebibmacro{origyear+endyear}%
\bibclosebracket%
\addspace%
\usebibmacro{cite:standard+labelyear+extrayear}}}}}}}}%
您需要的参考书目
\renewbibmacro*{bothyear+oldstyle}{%
\ifboolexpr{ (
test {\ifentrytype{music}}%
or
test {\ifentrytype{review}}%
or
test {\ifentrytype{standard}}%
or
test {\ifentrytype{suppperiodical}}%
or
test {\ifentrytype{video}}%
)
and
togl {cms@avdate}%
}%
{\usebibmacro{av+labelyear+extrayear}}% \clearfield local to \printtext
{\iftoggle{cms@switchdates}%
{\printtext{%
\bibopenbracket%
\usebibmacro{labelyear+extrayear}%
\bibclosebracket%
\setunit{\addspace}%
\clearfield{extrayear}%
\printorigdateextra}% \usebibmacro{origyear+endyear}
\usebibmacro{clear+datefield}{}%
\usebibmacro{clear+datefield}{orig}}%
{\iffieldundef{origyear}%
{\iftoggle{cms@ordate}%
{}%
{\clearfield{extradate}\clearfield{extratitleyear}}%
\usebibmacro{standard+labelyear+extrayear}}%
{\iftoggle{cms@ordate}% ???
{\iffieldundef{year}%
{\usebibmacro{origfirst+labelyear+extrayear}}%
{\printtext{%
\bibopenbracket%
\usebibmacro{origfirst+labelyear+extrayear}%
\bibclosebracket%
\setunit*{\addspace}%
\clearfield{extradate}\clearfield{extratitleyear}%
\printdateextra}}}% \usebibmacro{year+endyear}
{\iffieldundef{year}%
{\usebibmacro{origfirst+labelyear+extrayear}}%
{\printtext{%
\bibopenbracket%
\clearfield{extradate}\clearfield{extratitleyear}%
\printorigdateextra%
% \usebibmacro{origyear+endyear}%
\bibclosebracket%
\setunit*{\addspace}%
\usebibmacro{standard+labelyear+extrayear}}}}%
\usebibmacro{clear+datefield}{orig}%
\usebibmacro{clear+datefield}{}}}}}%
在这两种情况下,我们都只是\bibopenparen
用\bibopenbracket
和\bibcloseparen
替换了\bibclosebracket
。