Biblatex:如何在 newrefcontext 之后关闭 dashed=true

Biblatex:如何在 newrefcontext 之后关闭 dashed=true

我正在寻找一个输入来更改(特别是禁用)文本中的破折号选项。

我得到了这个代码。

\usepackage[
  style=verbose-trad1,
  sorting=nyt,
  giveninits=true,
  citetracker=true,
  ibidtracker=context,
  idemtracker=context,
  loccittracker=context,
  opcittracker=true,
  singletitle=true,
  uniquework=true,
  idemtracker=true,
  ibidpage=true,
  citepages=omit,
  strict=true,
  refsection=none,
  citereset=chapter,
  autocite=inline
]{biblatex}
\usepackage{csquotes}

我认为您还需要阅读我的代码的下一行。

% Formato autore
% \AtBeginBibliography{
    \def\ifmknamesc{%
      \ifboolexpr{ test {\ifcurrentname{labelname}}
                   or test {\ifcurrentname{author}}
                   or ( test {\ifnameundef{author}} and test {\ifcurrentname{editor}} ) }}
    \renewcommand*{\mkbibnameprefix}[1]{%
      \ifmknamesc{\textsc{#1}}{#1}}
    \renewcommand*{\mkbibnamefamily}[1]{%
      \ifmknamesc{\textsc{#1}}{#1}}
% }

\AtBeginBibliography{\DeclareNameFormat{sortname}{\ifgiveninits{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}{\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}\usebibmacro{name:andothers}}}

% Attivare funzione idem - previo idemtracker:true
\makeatletter
\newbibmacro{ifrepeatauthor}{\ifciteidem}
\newbibmacro{repeatedauthor}{%
    \bibstring[\mkibid]{idem\thefield{gender}}}%
    % \bibstring[\mkbibsc]{idem\thefield{gender}}}%
    % \iftoggle{cbx:scauthorscite}{\bibstring[\mkbibsc]{idem\thefield{gender}}}{}}%
    \AtBeginBibliography{%
        \renewbibmacro{ifrepeatauthor}{\usebibmacro{bbx:dashcheck}}%
        \renewbibmacro{repeatedauthor}{\bibnamedash}%
    }
    \renewbibmacro*{author}{%
        \ifboolexpr{
            test \ifuseauthor
            and
            not test {\ifnameundef{author}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{author}%
        \setunit{\printdelim{authortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{authorstrg}}
        {\global\undef\bbx@lasthash}}
    \renewbibmacro*{bbx:editor}[1]{%
        \ifboolexpr{
            test \ifuseeditor
            and
            not test {\ifnameundef{editor}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{editor}%
        \setunit{\printdelim{editortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{#1}%
        \clearname{editor}}
        {\global\undef\bbx@lasthash}}
    \renewbibmacro*{bbx:translator}[1]{%
        \ifboolexpr{
            test \ifusetranslator
            and
            not test {\ifnameundef{translator}}
        }
        {\usebibmacro{ifrepeatauthor}
        {\usebibmacro{repeatedauthor}}
        {\printnames{translator}%
        \setunit{\printdelim{translatortypedelim}}%
        \usebibmacro{bbx:savehash}}%
        \usebibmacro{#1}%
        \clearname{translator}}
        {\global\undef\bbx@lasthash}}
\makeatother

请注意,我只想改变 biblist 中发生的事情,特别是当我输入newrefcontext命令之后。

实际上,我已经得到了整个示例,但在提交之前它是受保护的。我可以为您描述一下:我有一个通用参考列表,用于任何未标有关键字的条目。然后,更多的书目列表随之而来,每个列表都引用单个关键字。我想保留第一个通用参考列表中的破折号,因此;并为其他列表禁用它。

\documentclass[12pt]{book}%the bibliography package and options before copied follows

\begin{document}

\printbibliography[heading=bibintoc,title={\refname},notkeyword={law},notkeyword={judgment},notkeyword={softlaw}]

\newrefcontext[sorting=juris]% Of course,
% I already defined juris (and it consists on date order instead of alpha order);
% but, entries output is in the same form (e.g. author, title, organization ecc., date)

% I think: is this the place where input the option to disenable dash?

\printbibheading[heading=bibintoc,title={Law sources}]
\printbibliography[heading=subbibintoc,heading=subbibliography,title={Laws},keyword={law}]
\printbibliography[heading=subbibintoc,heading=subbibliography,title={Judgments},keyword={judgment}]
\printbibliography[heading=subbibintoc,heading=subbibliography,title={Soft law},keyword={softlaw}]
\end{document}

谢谢。

答案1

足以说明

\renewbibmacro*{bbx:dashcheck}[2]{#2}

之后你的\newrefcontext[sorting=juris]

只要您想禁用此后所有内容的虚线功能,这就会起作用\newrefcontext[sorting=juris]

如果您之后需要重新启用破折号,最简单的方法可能是使用\begingroup...\endgroup

相关内容