如何自定义编辑器字段(仅在参考书目中且没有作者时!)

如何自定义编辑器字段(仅在参考书目中且没有作者时!)

此主题我问的是,如何为 \printbibliography 引入新的引用样式。现在,在迫切需要我的出版商有一件事情是我自己无法做到的:

  • 作者姓名 -> 小型大写
  • 无作者时的编辑姓名 -> 小型大写
  • 编辑者姓名(有作者时) -> normaltext

因此,在我的 MWE 中,“Caramello” 应该是普通文本。我该怎么做?

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode

\begin{filecontents}{archivio.bib}

@incollection{Rae:Rap,
    Author = {Gilbert Raes},
    Booktitle = {La S. Sindone. Ricerche e studi della commissione di esperti nominata dall'Arcivescovo di Torino},
    Editor = {P. Caramello},
    Pages = {79-83},
    Series = {Supplemento Rivista diocesana torinese},
    Title = {Rapport d'analyse},
    Year = {1976}}


@book{Hal:Sul,
    Address = {Vindobonae},
    Editor = {C. Halm},
    Number = {1},
    Publisher = {C. Geroldi filium bibliopolam academiae},
    Series = {\textsc{csel}},
    Title = {Sulpici Severi libri qui supersunt},
    Year = {1866}}


\end{filecontents}

\documentclass[11pt, openany]{book}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french}

\usepackage[]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
            language=auto,
            ibidpage=true,
            autolang=other,
            useprefix=true,
            giveninits=true,
            indexing=cite,
            dateabbrev=false,
            backend=biber,
        ]{biblatex}


%%%%%%%%%%%% SCHIZOPHRENIA---> STYLE CHANGES WHEN WE PRINT BIBLIOGRAPHY%%%%%%%%%%%%%%%%

\AtBeginBibliography{\renewcommand{\mkbibnamefamily}[1]{\MakeLowercase{\textsc{#1}}}}       %Cognomi in smallcaps, no maiuscole
\AtBeginBibliography{\renewcommand{\mkbibnamegiven}[1]{\MakeLowercase{\textsc{#1}}}}        %Nomi in smallcaps, no maiuscole
\AtBeginBibliography{\DeclareNameAlias{sortname}{given-family}}                             % Ordine di sorting cognome e nome


\addbibresource{archivio.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\textit{Book without author:}\\
\cite[]{Hal:Sul}\\

\textit{Incollection:}\\
\cite[]{Rae:Rap}\\

\printbibliography
\end{document}

答案1

sortname在这种情况下,最简单的方法可能是直接更改格式

\DeclareNameFormat{sortname}{%
  \renewcommand{\mkbibnamefamily}[1]{\textsc{\MakeLowercase{##1}}}%
  \renewcommand{\mkbibnamegiven}[1]{\textsc{\MakeLowercase{##1}}}%
  \ifgiveninits
    {\usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}}
    {\usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}}%
  \usebibmacro{name:andothers}}
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{Rae:Rap,
    Author = {Gilbert Raes},
    Booktitle = {La S. Sindone. Ricerche e studi della commissione di esperti nominata dall'Arcivescovo di Torino},
    Editor = {P. Caramello},
    Pages = {79-83},
    Series = {Supplemento Rivista diocesana torinese},
    Title = {Rapport d'analyse},
    Year = {1976}}

@book{Hal:Sul,
    Address = {Vindobonae},
    Editor = {C. Halm},
    Number = {1},
    Publisher = {C. Geroldi filium bibliopolam academiae},
    Series = {\textsc{csel}},
    Title = {Sulpici Severi libri qui supersunt},
    Year = {1866}}
\end{filecontents}

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french}

\usepackage[]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
            language=auto,
            ibidpage=true,
            autolang=other,
            useprefix=true,
            giveninits=true,
            indexing=cite,
            dateabbrev=false,
            backend=biber,
        ]{biblatex}

\DeclareNameFormat{sortname}{%
  \renewcommand{\mkbibnamefamily}[1]{\textsc{\MakeLowercase{##1}}}%
  \renewcommand{\mkbibnamegiven}[1]{\textsc{\MakeLowercase{##1}}}%
  \ifgiveninits
    {\usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}}
    {\usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}}%
  \usebibmacro{name:andothers}}

\addbibresource{\jobname.bib}

\begin{document}
\textit{Book without author:}\\
\cite[]{Hal:Sul}\\

\textit{Incollection:}\\
\cite[]{Rae:Rap}\\

\printbibliography
\end{document}

在此处输入图片描述

相关内容