Biblatex:定制文章和书籍

Biblatex:定制文章和书籍

我最近开始使用 Biblatex 并根据你们的一些答案对它进行了一些定制(实际上有很多!!)但我仍然对我喜欢的一些功能感到困惑,因为遗憾的是,我不太了解大多数命令...

首先,我想向您展示我已经做的事情,因为可能有很多话要说!

    \usepackage[language=french,sorting=nyt, hyperref=true,urldate=long,
    bibstyle=authortitle,citestyle=verbose,dateabbrev=false]{biblatex}

    \addbibresource{These.bib}

    \defbibheading{bibliography}{
    \setcounter{secnumdepth}{-1}
    \chapter{Bibliographie thématique}
    \markboth{\itshape Bibliographie thématique}{}
    }       

                        %******** Custom Bibliography *********

    \makeatletter
    \def\MKbibnamefirst#1{\expandafter\mkbibnamefirst@i#1..\@nil}
    \def\mkbibnamefirst@i#1.#2.#3\@nil{#1}

    \renewbibmacro*{name:last-first}[4]{%
      \ifuseprefix
        {\usebibmacro{name:delim}{#3#1}%
         \usebibmacro{name:hook}{#3#1}%
         \ifblank{#3}{}{%
           \ifcapital
             {\mkbibnameprefix{{#3}}\isdot}
         {\mkbibnameprefix{#3}}%
           \ifpunctmark{'}{}{\addhighpenspace}}%
         \mkbibnamelast{#1}\isdot
         \ifblank{#4}{}{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
         \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#2}}}
        {\usebibmacro{name:delim}{#1}%
         \usebibmacro{name:hook}{#1}%
         \mkbibnamelast{#1}\isdot
         \ifblank{#4}{}{\addlowpenspace\mkbibnameaffix{#4}\isdot}%
    %     \ifblank{#2#3}{}{\addcomma}%
         \ifblank{#2}{}{\addlowpenspace\MKbibnamefirst{#2}}%
    %     \ifblank{#3}{}{\addlowpenspace\mkbibnameprefix{#3}\isdot}
    }}
    \makeatother

    % Commas as separators
    \renewcommand*{\newunitpunct}{\addcomma\space}

    % Comma before and after journal volume
    \renewbibmacro*{volume+number+eid}{%
      \setunit*{\addcomma\space}% NEW
      \printfield{volume}%
      \setunit*{\addcomma\space}% NEW
      \printfield{number}%
      \setunit{\addcomma\space}%
      \printfield{eid}}

    % Prefixes for journal volume and number
    \DeclareFieldFormat[article]{volume}{\bibstring{volume}~#1}% volume of a journal
    \DeclareFieldFormat[article]{number}{\bibstring{number}~#1}% number of a journal

    % Comma before date; date not in parentheses
    \renewbibmacro*{issue+date}{%
      \setunit*{\addcomma\space}% NEW
        \iffieldundef{issue}
          {\usebibmacro{date}}
          {\printfield{issue}%
           \setunit*{\addspace}%
        \usebibmacro{date}}% NEW
      \newunit}

    % Issue/date macros removed after journal number
    \renewbibmacro*{journal+issuetitle}{%
      \usebibmacro{journal}%
      \setunit*{\addspace}%
      \iffieldundef{series}
        {}
        {\newunit
         \printfield{series}%
         \setunit{\addspace}}%
      \usebibmacro{volume+number+eid}%
      \newunit}

    % "In:" removed for articles; issue/date macros added after note+pages macro
    \DeclareBibliographyDriver{article}{%
      \usebibmacro{bibindex}%
      \usebibmacro{begentry}%
      \usebibmacro{author/translator+others}%
      \setunit{\labelnamepunct}\newblock
      \usebibmacro{title}%
      \newunit
      \printlist{language}%
      \newunit\newblock
      \usebibmacro{byauthor}%
      \newunit\newblock
      \usebibmacro{bytranslator+others}%
      \newunit\newblock
      \printfield{version}%
      \newunit\newblock
      \usebibmacro{journal+issuetitle}%
      \newunit
      \usebibmacro{byeditor+others}%
      \newunit
      \usebibmacro{note+pages}%
      \setunit{\addspace}
      \usebibmacro{issue+date}
      \setunit{\addcolon\space}
      \usebibmacro{issue}
      \newunit\newblock
      \iftoggle{bbx:isbn}
        {\printfield{issn}}
        {}%
      \newunit\newblock
      \usebibmacro{doi+eprint+url}%
      \newunit\newblock
      \usebibmacro{addendum+pubstate}%
      \setunit{\bibpagerefpunct}\newblock
      \usebibmacro{pageref}%
      \usebibmacro{finentry}}

    \DeclareFieldFormat[book]{title}{\mkbibquote{\mkbibemph{#1}}}

%Switch t. to vol.
\DeclareFieldFormat[article]{volume}{vol.~#1}

%Put ibid, op cit & co in italics
\renewcommand*{\mkibid}{\emph}

%Interligne entre les items Biblio
\DeclareFieldFormat{shorthandwidth}{#1}
\setlength{\bibitemsep}{6pt}

%Change p. to pp.
\DefineBibliographyStrings{french}{%
  pages = {pp\adddot},

    \begin{document}
    (...)
    \nocite{*}
    \begin{singlespace}
    \hyphenpenalty 10000
    \printbibheading
    \printbibliography[keyword=enreg,heading=subbibliography,title=Enregistrements audiovisuels des auditions]
    \printbibliography[keyword=justice,heading=subbibliography,title=Justice]
    \printbibliography[keyword=management,heading=subbibliography,title=Management et modernisation]
    \printbibliography[keyword=visio,heading=subbibliography,title=Visioconférence]
    \end{singlespace}
    \end{document}

我想修改我的文章和书籍的外观:

对于文章:
我得到了:
姓氏 名字,“头衔”,杂志,第 10 卷,第 3 期,第 56-79 页,月份年份。
我想要:
姓氏名字,“头衔”,杂志,月年,第 10 卷,第 3 期,第 56-79 页。
这意味着:
- 获取日记帐后的月年块

对于书籍:
我得到了:
姓氏 名字,«标题», 地址:出版商,年份,271 页。
我想要:
姓氏名字,«标题»,出版商,地址,年份,271 页。
这意味着:
- 获取地址后的年份
- 按顺序获取出版商,并用逗号将其与地址隔开

我知道要求太多了!!但我的实验毫无进展,而且我没有时间再做更多令人悲伤的失败!!

非常感谢任何帮助,或对我目前的修改发表评论!;-)

答案1

此答案尚在完善中,很可能无法涵盖所有​​请求。也就是说,请执行以下操作:

  • 删除代码行\DeclareRangeCommands{\pno\ppno}
  • 添加代码行\DeclareFieldFormat[book]{title}{\mkbibquote{\mkbibemph{#1}}}
  • 添加包选项dateabbrev=false

将文章中的“t.”改为“vol.”的方法之一是选择language=english。这是你想要的吗?请解释一下。

编辑:对于@book 条目,使用pagetotal字段而不是字段pages

编辑 2:对于@book 和朋友,将以下内容添加到您的序言中:

\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}

为了保持一致,您还应该按照这些思路更改 bibmacrosinstitution+location+dateorganization+location+date。(原文位于standard.bbx。)

编辑 3:对于@article,以下内容乍一看似乎有效(我没有仔细检查):

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \setunit{\addcomma\space}%
  \usebibmacro{volume+number+eid}%
  \newunit}

@Doompa:现在就这样了。如果你的风格仍然需要微调,请将任何要求添加到你原来的问题中(你的编辑让我很困惑)。另外考虑一下为什么你想要一个特定的改变。

答案2

对于@ARTICLES,我找到了如何将“t。”转换为“vol。”:

\DeclareFieldFormat[article]{volume}{Vol.~#1\addcomma} 

今天是我的幸运日!我刚刚找到了解决页面问题的答案:对于@ARTICLES,将 p. 切换为 pp.:

\DefineBibliographyStrings{french}{%
  pages = {pp\adddot},
}

相关内容