參考書目:實現自訂參考書目風格

參考書目:實現自訂參考書目風格

我需要設定biblatex以獲得以下引用樣式:

書:1. Doe, J.:書名。出版商、地點(日期)

文章:1. Doe, J.:標題。雜誌。編號(期),頁數(年份)

章:1. Doe, J.:章節標題。見:DoeEditor, J.(編)書名,頁碼。出版商、地點(年份)

會議記錄: 1. Doe, J.:標題。請參閱:會議論文集標題,頁碼。地點(年份)

據我所知,這是:

\documentclass{article}

\usepackage[style=numeric, 
            backend=biber,
            firstinits=true]{biblatex}
\addbibresource{references.bib}
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}
\renewcommand*{\labelnamepunct}{\addcolon\space}
\DeclareNameAlias{default}{last-first}
\DeclareFieldFormat[article, book, incollection, report]{title}{#1} 
\DeclareFieldFormat[proceedings, inproceedings]{maintitle}{#1} 
\DeclareFieldFormat[article]{journaltitle}{#1\adddot}
\DeclareFieldFormat[inproceedings, incollection]{booktitle}{#1\adddot}
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addspace}%
  \printfield[parens]{number}%
  \setunit{\addcomma\space}%
}

\begin{document}
Examples \cite{Doe2014} \cite{Doe2016} \cite{Doe2017} \cite{Doe32015}

\printbibliography
\end{document}

輸出是: 在此輸入影像描述

我的問題是:

  • 如何將年份作為欄位並在所有條目類型中使用 ( )?
  • 如何從頁面欄位中刪除該頁?
  • 如何從 inProceedings 標題中刪除“ ”?
  • 如何重新格式化書籍章節中的編輯欄位以使其更接近我的需要?

書目文件範本:

@Book{Doe2017,
  author    = {Doe, Jhon},
  title     = {A Book Title},
  year      = {2017},
  publisher = {Some Publisher},
  location  = {Some Location},
}

@Article{Doe2016,
  author  = {Doe, Jhon and Doe2, Jhon2},
  title   = {Some journal article},
  journal = {Fancy Journal},
  year    = {2016},
  volume  = {56},
  number  = {3},
  pages   = {1-99},
}

@InCollection{Doe32015,
  author    = {Doe3, Jhon3},
  title     = {A book chapter},
  booktitle = {A book title},
  year      = {2015},
  editor    = {Editor1, Name and Editor2, Name2},
  publisher = {Some publisher},
  location  = {Some location},
  pages     = {54-82},
}

@InProceedings{Doe2014,
  author    = {Doe, Martha},
  title     = {A conference paper},
  booktitle = {Fancy Conference Proceedings},
  year      = {2014},
  location  = {Touristy Location},
  pages     = {1-10},
}

答案1

嘗試

\documentclass{article}

\usepackage[style=numeric, 
            backend=biber,
            firstinits=true]{biblatex}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Doe2017,
  author    = {Doe, Jhon},
  title     = {A Book Title},
  year      = {2017},
  publisher = {Some Publisher},
  location  = {Some Location},
}

@Article{Doe2016,
  author  = {Doe, Jhon and Doe2, Jhon2},
  title   = {Some journal article},
  journal = {Fancy Journal},
  year    = {2016},
  volume  = {56},
  number  = {3},
  pages   = {1-99},
}

@InCollection{Doe32015,
  author    = {Doe3, Jhon3},
  title     = {A book chapter},
  booktitle = {A book title},
  year      = {2015},
  editor    = {Editor1, Name and Editor2, Name2},
  publisher = {Some publisher},
  location  = {Some location},
  pages     = {54-82},
}

@InProceedings{Doe2014,
  author    = {Doe, Martha},
  title     = {A conference paper},
  booktitle = {Fancy Conference Proceedings},
  year      = {2014},
  location  = {Touristy Location},
  pages     = {1-10},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareFieldFormat{labelnumberwidth}{#1\adddot}

\renewcommand*{\labelnamepunct}{\addcolon\space}

\DeclareNameAlias{default}{family-given}

\DeclareFieldFormat*{title}{#1} 
\DeclareFieldFormat*{maintitle}{#1} 
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addspace}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\DeclareFieldFormat*{date}{\mkbibparens{#1}}

\newbibmacro*{pubinstorg+location}[1]{%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcolon\space}}%
  \printlist{#1}%
  \newunit}

\renewbibmacro*{publisher+location+date}{\usebibmacro{pubinstorg+location}{publisher}}
\renewbibmacro*{institution+location+date}{\usebibmacro{pubinstorg+location}{institution}}
\renewbibmacro*{organization+location+date}{\usebibmacro{pubinstorg+location}{organization}}

\renewbibmacro*{issue+date}{%
  \iffieldundef{issue}
    {}
    {\printtext[parens]{\printfield{issue}}}%
  \newunit}

\newbibmacro*{addendum+pubstate}{%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}
\newbibmacro*{addendum+pubstate}{%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}%
  \setunit{\addspace}%
  \printdate}


\begin{document}
Examples \cite{Doe2014} \cite{Doe2016} \cite{Doe2017} \cite{Doe32015}

\printbibliography
\end{document}

看看用 biblatex 引用@inbook:如何將作者/編輯放在書名之前?在 biblatex 中的標題前移動編輯者姓名,後跟 (Ed./Eds.) 和逗號為編輯訂單。

相關內容