연도 뒤의 점을 생략하고 \parencite에서 작성자 뒤에 쉼표를 추가하는 방법

연도 뒤의 점을 생략하고 \parencite에서 작성자 뒤에 쉼표를 추가하는 방법

뭔가를 할 때 \parencite연도 뒤에 점을 생략하고 저자 뒤에 쉼표를 추가하고 싶습니다. 다음 명령은 이미 내 서문에 있습니다.

\renewcommand*{\postnotedelim}{\addcolon\space} % add colon after year on \parencite
\DeclareFieldFormat{postnote}{#1} %no page prefix when citing
\DeclareFieldFormat{multipostnote}{#1} %no page prefix when citing

그러면 내가 인용한 출처가 다음과 같이 표시됩니다.

(저자 1975. : 49)

하지만 나는 그것들이 다음과 같이 표시되기를 원합니다.

(저자, 1975: 49)


MWE

\documentclass{article}
\usepackage[serbian]{babel}

\usepackage[backend=biber, style=authoryear]{biblatex}

\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \parencite[42]{sigfridsson}
\end{document}

답변1

serbian.lbx\adddot연도 뒤에 매크로를 입력 \mkbibdateshort하고 관련시킵니다. 에서 매크로를 다시 정의하여 점을 제거할 수 있습니다 \DefineBibliographyExtras{serbian}.

를 사용하여 작성자 뒤에 쉼표를 추가할 수 있습니다 \renewcommand*{\nameyeardelim}{\addcomma\space}.

\documentclass[serbian]{article}

\usepackage[T1]{fontenc}
\usepackage[serbian]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear]{biblatex}

\DefineBibliographyExtras{serbian}{%
  \renewcommand*\mkbibordinal[1]{\stripzeros{#1}}
  \renewcommand*\mkbibdateshort[3]{%
    \iffieldundef{#3}{}{\mkbibordinal{\thefield{#3}}%
      \iffieldundef{#2}{}{\addnbspace}}%
    \iffieldundef{#2}{}{\mkbibordinal{\thefield{#2}}%
      \iffieldundef{#1}{}{\addnbspace}}%
    \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}%
    {\dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}}%
  \renewcommand*\mkbibseasondateshort[2]{%
    \mkbibseason{\thefield{#2}}%
    \iffieldundef{#1}{}{\space}%
    \dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}%
    \renewcommand*\mkbibseasondatelong[2]{%
    \mkbibseason{\thefield{#2}}%
    \iffieldundef{#1}{}{\space}%
    \dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}}%
}

\renewcommand*{\postnotedelim}{\addcolon\space} % add colon after year on \parencite
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat{postnote}{#1} %no page prefix when citing
\DeclareFieldFormat{multipostnote}{#1} %no page prefix when citing


\begin{filecontents}{\jobname.bib}
@book{elk,
  author    = {Anne Elk},
  title     = {A Theory on Brontosauruses},
  year      = {1972},
  publisher = {Monthy \& Co.},
  location  = {London},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \parencite[380]{sigfridsson}
ipsum \parencite[42]{elk}

\printbibliography
\end{document}

이는 원하는 출력을 생성하는 것처럼 보이지만 부작용이 있을 수 있으며 다른 위치에서 문제가 발생할 수 있습니다.

여기에 이미지 설명을 입력하세요

관련 정보