![\titleaddon 相当于 \publisher](https://linux22.com/image/357312/%5Ctitleaddon%20%E7%9B%B8%E5%BD%93%E4%BA%8E%20%5Cpublisher.png)
我正在使用 biblatex 并以 biber 作为后端。为了在字段后显示文本title
,有字段titleaddon
。是否也有与字段等效的字段publisher
,可用于在出版商名称后显示文本?如果没有,是否可以定义自定义字段?我还需要一个这样的附加字段,用于journal
文章字段(非斜体)和school
博士论文字段之后。
我使用芝加哥引用格式。下面是 MWE:
\documentclass[12pt]{article}
\usepackage{csquotes}
\usepackage{polyglossia}
\usepackage[notes,natbib,isbn=false,backend=biber]{biblatex-chicago}
\setdefaultlanguage{english}
\nocite{*}
\addbibresource{samplebib.bib}
\begin{document}
\printbibliography
\end{document}
以及samplebib.bib文件:
@article{smith1999,
author = {Peter Smith},
title = {Article Title},
year = {1999},
journal = {Journal Title ADDENDUM NOT ITALIC},
volume = {5},
number = {4},
pages = {119 - 145}
}
@book{smith2000,
author = {Peter Smith},
title = {Book Title},
year = {2011},
volumes = {2},
address = {New York},
publisher = {Publisher PUBLISHER ADDENDUM}
}
@phdthesis{smith1995,
author = {Peter Smith},
title = {PhD Title},
year = {1995},
school = {School SCHOOL ADDENDUM}
}
非常感谢!
答案1
通常,这就像创建一个新的.dbx
,在其中声明新字段,加载它,然后在相应的宏中使用新字段一样简单。请参阅将字段“tome”添加到 biblatex 条目。
要biblatex-chicago
修改的宏的数量可能非常大,并且宏可能包含相当多的行。
此外,biblatex-chicago
不允许选择datamodel
。这使事情变得复杂。我们需要复制包装器包biblatex-chicago.sty
在序言中所做的操作。
平均能量损失
\documentclass[12pt]{article}
\usepackage{csquotes}
\usepackage{polyglossia}
\usepackage{filecontents}
\begin{filecontents*}{addons.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{
journaltitleaddon,
publisheraddon,
institutionaddon}
\DeclareDatamodelEntryfields{
journaltitleaddon,
publisheraddon,
institutionaddon}
\end{filecontents*}
\usepackage[style=chicago-notes,natbib,isbn=false,backend=biber,datamodel=addons]{biblatex}
\ExecuteBibliographyOptions{%
pagetracker=true,autocite=footnote,abbreviate=false,alldates=comp,
citetracker=true,ibidtracker=constrict,usetranslator=true,
usenamec=true,loccittracker=constrict,dateabbrev=false,
maxbibnames=10,minbibnames=7,sorting=cms,sortcase=false}
\makeatletter
\newtoggle{cms@nomark}
\setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip}
\setlength{\bibhang}{2em}
\setlength{\lositemsep}{0.25\baselineskip plus 0.25\baselineskip}
\setcounter{biburllcpenalty}{5000}
\setcounter{biburlucpenalty}{9000}
\setcounter{biburlnumpenalty}{9000}
\renewcommand*{\bibnamedash}{\rule[.4ex]{3em}{.6pt}}
\iftoggle{cms@nomark}
{}
{\@ifclassloaded{memoir}%
{\blx@warning@noline{%
Since you are using the 'memoir' class,\MessageBreak
I'm leaving the formatting of the foot- and/or\MessageBreak
end-note mark and text to you.}}%
{\renewcommand\@makefntext[1]{% Provides in-line footnote marks
\setlength\parindent{1em}%
\noindent
\makebox[2.3em][r]{\@thefnmark.\,\,}#1}
\@ifpackageloaded{endnotes}% Provides in-line endnote marks
{\def\enotesize{\small}% This size recommended by the Manual
\renewcommand{\enoteformat}{%
\renewcommand{\makeenmark}{%
\hbox{\theenmark.\,\,}}
\rightskip\z@ \leftskip\z@ \parindent=2.3em
\leavevmode\llap{\makeenmark}}}
{}}}
\@ifpackageloaded{babel}
{\ifthenelse{\equal{\languagename}{american}}
{\DeclareLanguageMapping{american}{cms-american}}%
{\ifthenelse{\equal{\languagename}{english}}%
{\DeclareLanguageMapping{english}{cms-american}}%
{\DeclareLanguageMapping{american}{cms-american}}}}%
{\DeclareLanguageMapping{english}{cms-american}}
\DeclareLanguageMapping{british}{cms-british}
\DeclareLanguageMapping{german}{cms-german}
\DeclareLanguageMapping{french}{cms-french}
\DeclareLanguageMapping{finnish}{cms-finnish}
\DeclareLanguageMapping{ngerman}{cms-ngerman}
\DeclareLanguageMapping{icelandic}{cms-icelandic}
\DeclareLanguageMapping{norsk}{cms-norsk}
\DeclareLanguageMapping{nynorsk}{cms-nynorsk}
\DeclareLanguageMapping{swedish}{cms-swedish}
\ifundef\bbl@loaded{\let\bbl@loaded\@empty}{}% For old versions of babel
\makeatother
\setdefaultlanguage{english}
\nocite{*}
\begin{filecontents}{\jobname.bib}
@article{smith1999,
author = {Peter Smith},
title = {Article Title},
year = {1999},
journal = {Journal Title},
journaltitleaddon = {ADDENDUM NOT ITALIC},
volume = {5},
number = {4},
pages = {119 - 145}
}
@book{smith2000,
author = {Peter Smith},
title = {Book Title},
year = {2011},
volumes = {2},
address = {New York},
publisher = {Publisher},
publisheraddon = {PUBLISHER ADDENDUM},
}
@phdthesis{smith1995,
author = {Peter Smith},
title = {PhD Title},
year = {1995},
school = {School},
institutionaddon = {SCHOOL ADDENDUM},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\makeatletter
\renewbibmacro*{journal+sub}{%
\iffieldundef{journaltitle}%
{}%
{\ifboolexpr{%
not test {\iffieldundef{shortjournal}}%
and
((
test {\ifcitation}%
and
togl {cms@citejtabb}%
)
or
(
test {\ifbibliography}%
and
togl {cms@bibjtabb}%
))
}%
{\clearlist{location}\printtext[shortjournal]{%
\printfield[jtsnoformat]{shortjournal}}}%
{\printtext[journaltitle]{%
\printfield[jtnoformat]{journaltitle}%
\setunit{\addcolon\addspace}%
\printfield[sjtnoformat]{journalsubtitle}}}%
\setunit{\addcomma\addspace}%
\printfield{journaltitleaddon}}}%
\renewbibmacro*{publ+loc+year}{% Revised for reprint
\ifboolexpr{%
togl {cms@reprint}%
and
not test {\ifentrytype{video}}%
}%
{\bibstring{reprint}%
\newcunit}%
{}%
\printlist{location}%
\iflistundef{publisher}%
{\setunit*{\addcomma\addspace}}%
{\setunit*{\addcolon\addspace}}%
\printlist{publisher}%
\setunit*{\addcomma\addspace}%
\printfield{publisheraddon}%
\setunit*{\addcomma\addspace}%
\usebibmacro{date}%
}
\renewbibmacro*{type+inst+year}{%
\printfield{type}%
\newcunit
\printlist{institution}%
\setunit*{\addcomma\addspace}%
\printfield{institutionaddon}%
\setunit*{\addcomma\addspace}%
\usebibmacro{cmsyear}}
\makeatother
\begin{document}
\printbibliography
\end{document}