书目:实现自定义书目样式

书目:实现自定义书目样式

我需要进行设置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 标题中删除“ ”?
  • 我如何重新格式化书籍章节中的编辑者字段以使其更接近我的需要?

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},
}

答案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.) 和标题前的逗号供编辑订购。

相关内容