在开始文档之前

在开始文档之前

我引用了一篇期刊论文。我使用以下代码:

\usepackage[turkish]{babel}
\usepackage[backend=biber, style=authoryear, sorting=nyt]{biblatex}
\addbibresource{my_references.bib}
\printbibliography[title={Kaynakça}]

它返回:

耶尔德勒姆,阿里来了。 (2009)。 “托卡特或其他重要人物的葬礼服务将持续进行,直到最后一刻”。内容:共和医学杂志31.4,第 356-366 节。

但是,我不想用括号括住年份,就像这样 (2009) -> 2009。我想删除这个“Içinde: ”,并且我希望有这个共和医学杂志没有斜体。

我怎样才能做到这一点?

Chatgpt 建议这样做:

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{year}
    {}
    {\printtext{\printdate}}}

但它没有作用。

我正在使用 overleaf。

答案1

在开始文档之前

\usepackage[backend=biber, style=authoryear, sorting=nyt, maxcitenames=2, mincitenames=1, maxbibnames=999, giveninits=true]{biblatex}
\renewbibmacro{in:}{
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}
}
\usepackage{xpatch}

\addbibresource{my_references.bib}
\xpatchbibmacro{date+extradate}{%
  \printtext[parens]%
}{%
  \setunit*{\adddot\space}%
  \printtext%
}{}{} 
\DeclareFieldFormat*{title}{``#1''\addcomma}
\DeclareFieldFormat*{journaltitle}{#1\addcomma}
\DefineBibliographyStrings{turkish}{%
  andothers = {vd\adddot}
}
\DeclareFieldFormat{pages}{#1}
\DeclareNameAlias{default}{family-given} % For newer versions of BibLaTeX
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{author}{family-given}

引用

\printbibliography[title={Kaynakça}]

模板代码

\documentclass[tikz,a4paper,9pt]{article}
\usepackage[backend=biber, style=authoryear, sorting=nyt, maxcitenames=2, mincitenames=1, maxbibnames=999, giveninits=true]{biblatex}
\renewbibmacro{in:}{
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}
}
\usepackage{xpatch}

\addbibresource{my_references.bib}
\xpatchbibmacro{date+extradate}{%
  \printtext[parens]%
}{%
  \setunit*{\adddot\space}%
  \printtext%
}{}{} 
\DeclareFieldFormat*{title}{``#1''\addcomma}
\DeclareFieldFormat*{journaltitle}{#1\addcomma}
\DefineBibliographyStrings{turkish}{%
  andothers = {vd\adddot}
}
\DeclareFieldFormat{pages}{#1}
\DeclareNameAlias{default}{family-given} % For newer versions of BibLaTeX
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{author}{family-given}
\begin{document}
Citation: \cite{yildirim2009tokat}

\printbibliography[title={Kaynakça}]  % This prints your bibliography section with the title "Kaynakça (References)"
\end{document}

.bib 文件供参考

@article{yildirim2009tokat,
  title={Tokat ili merkezinde {\c{c}}al{\i}{\c{s}}an hekimlerin t{\i}bbi uygulama hatalar{\i} ile ilgili bilgi, tutum ve davran{\i}{\c{s}}lar{\i}},
  author={Y{\i}ld{\i}r{\i}m, Ali and Aksu, Murat and {\c{C}}etin, {\.I}lhan and {\c{S}}ahan, Abdulkadir},
  journal={Cumhuriyet Medical Journal},
  volume={31},
  number={4},
  pages={356--366},
  year={2009}
}

输出

引文

参考

相关内容