verbose-trad2
我正在使用一个经过大量修补的 style版本biblatex
。我是这个软件包的新手,我正在努力寻找一种方法,只在第一次引用时显示作者的首字母,并在参考书目中使用作者的全名(图片)。
我可能正在寻找一个命令,citeauthor
它可以影响这个字段和其他字段在引文中的显示方式(而不是正确的样式),与参考书目中的样式独立且并行。
免责声明:在 MWE 中,我\cite
为了简洁和易读而使用了。但在我的文档中,我将专门使用\footcite
梅威瑟:
\documentclass[11pt, twoside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage{cfr-lm}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{microtype}
\linespread{1.5}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[CO]{\textsc{\textls[50]{\MakeLowercase{\leftmark}}}}
\fancyhead[CE]{\textsc{\textls[50]{\MakeLowercase{\leftmark}}}}
\renewcommand{\headrulewidth}{0pt}
%%%%%%%%%%%%%%%%%%%% bibliografia %%%%%%%%%%%%%%%%%%%
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
language=italian,
useprefix=true,
citepages=omit,
backend=biber,
ibidpage=true,
]{biblatex}
\usepackage{biblatex-opcit-booktitle}
%
\begin{filecontents}{\jobname.bib}
@book{viora,
author = {Viora, Mario Enrico},
title = {Consolidazioni e codificazioni. Contributo alla storia della codificazione},
location = {Torino},
date = {1967},
shorttitle = {Consolidazioni}
}
@book{lopez,
author = {Lopez, Roberto Sabatino},
title = {La rivoluzione commerciale del Medioevo},
location = {Torino},
date = {1971},
shorttitle = {La rivoluzione commerciale},
}
\end{filecontents}
\addbibresource{\jobname.bib}
% style
%queste tre linee di codice per la compatibilità del titolo corrente della bib. in sc
\defbibheading{sc-comp}[\bibname]{%
\chapter*{#1}\markboth{#1}{}%
\addcontentsline{toc}{chapter}{\bibname} %questo per far venire la bib. nel toc
}
\ExecuteBibliographyOptions{giveninits=false, dashed=false, dateabbrev=false}
\DeclareNameAlias{sortname}{last-first}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
bibliography = {Bibliografia},
editor = {a cura di},
editors = {a cura di},
idem = {\textsc{Id}},
ibidemloccit = {\mkbibemph{\autocap{i}bid\adddot}},
ibidemnoloccit = {Ivi},
}
\renewbibmacro*{publisher+location+date}{%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printlist{location}%
\setunit*{\addspace}
\usebibmacro{date}%
\printfield{edition}%
\newunit}
%questa mette l'edizione in apice
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\textsuperscript{#1}}
{#1\isdot\setunit{\addcomma\space}}}
%questa per togliere la prima occorrenza del numero di edizione
\newcommand{\replaceedition}[1]{%
\xpatchbibdriver{#1}
{\printfield{edition}%
\newunit}
{}%
{}
{\typeout{failed to patch driver #1}}
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}
%questa stampa l'anno di edizione originale
\renewbibmacro*{date}{%
\printdate
\iffieldundef{origyear}{%
}{%
\setunit*{\addspace}%
\printtext[parens]{ed. or. \printorigdate}%
}%
}
% sostituisce "e" fra autori con virgola
\AtBeginBibliography{
\renewcommand*{\finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{}{}%
\addspace\addcomma\space}%
}
%volumi riviste
\renewbibmacro*{volume+number+eid}{%
\setunit*{\addcomma\space}%
\printfield{volume}%
%invece di \setunit*{\adddot}%
\setunit*{/}%
\printfield{number}%
}
\renewcommand*{\revsdnamepunct}{} %toglie virgola fra cognome e nome aut.
\renewcommand*{\intitlepunct}{\space} %toglie ":" dopo "in" dopo elementi in raccolte (art, inproc, incoll)
\renewcommand*{\newunitpunct}{\addcomma\space} %virgola fra aut. e titolo
\renewcommand*{\mkbibnamegiven}[1]{\textsc{#1}} %nome autore sc
\renewcommand*{\mkbibnameprefix}[1]{\textsc{#1}} %particella autore sc
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}} %cognome autore sc
%toglie "in" dopo titoli art. (solo art.) in riviste
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\nocite{*} %stampa tutta la bibliografia, anche roba non citata nel testo
\DeclareFieldFormat{journaltitle}{\enquote{#1\isdot}} %nome rivista in tondo fra caporali (=enquote)
\DeclareFieldFormat[article]{title}{\textit{#1}} %titolo art. in corsivo
\DeclareFieldFormat[article]{volume}{\textsc{#1}} %vol. rivista in sc (per num. romani)
\DeclareFieldFormat[incollection]{title}{\textit{#1}} %nome art. in miscell. in corsivo
\DeclareFieldFormat[inproceedings]{title}{\textit{#1}}%come sopra
\DeclareFieldFormat{editortype}{\mkbibparens{#1}} %a cura di fra parentesi
%segue macro per impostare ibidem ivi id in maniera corretta
\xpatchbibmacro{author}
{\printnames{author}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{author}}}
{\printnames{author}}}
{}{}
\xpatchbibmacro{bbx:editor}
{\printnames{editor}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{editor}}}
{\printnames{editor}}}
{}{}
\xpatchbibmacro{bbx:translator}
{\printnames{translator}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{translator}}}
{\printnames{translator}}}
{}{}
\renewbibmacro*{cite:ibid}{%
\printtext{%
\bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
\ifloccit
{\bibstring[\mkibid]{ibidemloccit}%
\global\toggletrue{cbx:loccit}}
{\bibstring[\mkibid]{ibidemnoloccit}}}}}
\begin{document}
What I get: \cite{viora}
What I want: {\sc M. E. Viora}, {\it Consolidazioni e codificazioni. Contributo alla storia della codificazione}, Torino 1967
Dummy quote to prevent \emph{ibidem}: \cite{lopez}
Second quote: \cite{viora} (correct)
\printbibliography[heading=sc-comp]
\end{document}
答案1
完整verbose-trad2
的第一个引用由 bibmacro 生成cite:full
。我们可以向该宏中注入一些代码,以将给定的名称缩短为首字母。有几种方法可以做到这一点,但一种特别简单的方法是切换内部切换abx@bool@giveninits
。
\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\global\toggletrue{cbx:fullcite}%
\printtext[bibhypertarget]{%
\usedriver
{\toggletrue{abx@bool@giveninits}%
\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}
在您的 MWE 上下文中(略微精简)
\documentclass[11pt, twoside, openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}
\usepackage[style=verbose-trad2,
useprefix=true,
citepages=omit,
backend=biber,
ibidpage=true,
]{biblatex}
\usepackage{biblatex-opcit-booktitle}
\defbibheading{sc-comp}[\bibname]{%
\chapter*{#1}\markboth{#1}{}%
\addcontentsline{toc}{chapter}{\bibname}%
}
\ExecuteBibliographyOptions{giveninits=false, dashed=false, dateabbrev=false}
\DeclareNameAlias{sortname}{family-given}
\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
bibliography = {Bibliografia},
editor = {a cura di},
editors = {a cura di},
idem = {\textsc{Id}},
ibidemloccit = {\mkbibemph{\autocap{i}bid\adddot}},
ibidemnoloccit = {Ivi},
}
\renewbibmacro*{cite:full}{%
\usebibmacro{cite:full:citepages}%
\global\toggletrue{cbx:fullcite}%
\printtext[bibhypertarget]{%
\usedriver
{\toggletrue{abx@bool@giveninits}%
\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}%
\usebibmacro{shorthandintro}}
\renewbibmacro*{publisher+location+date}{%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printlist{location}%
\setunit*{\addspace}%
\usebibmacro{date}%
\printfield{edition}%
\newunit}
\DeclareFieldFormat{edition}{%
\ifinteger{#1}
{\textsuperscript{#1}}
{#1\isdot\setunit{\addcomma\space}}}
\newcommand{\replaceedition}[1]{%
\xpatchbibdriver{#1}
{\printfield{edition}%
\newunit}
{}%
{}
{\typeout{failed to patch driver #1}}%
}
\replaceedition{book}
\replaceedition{collection}
\replaceedition{inbook}
\replaceedition{incollection}
\replaceedition{manual}
\renewbibmacro*{date}{%
\printdate
\iffieldundef{origyear}{%
}{%
\setunit*{\addspace}%
\printtext[parens]{ed. or. \printorigdate}%
}%
}
\DeclareDelimFormat{finalnamedelim}{%
\addspace\addcomma\space}
%volumi riviste
\renewbibmacro*{volume+number+eid}{%
\setunit*{\addcomma\space}%
\printfield{volume}%
%invece di \setunit*{\adddot}%
\setunit*{\addslash}%
\printfield{number}%
}
\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\intitlepunct}{\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\mkbibcompletename}{\textsc}
\newbibmacro*{in:}{%
\ifentrytype{article}
{}
{\bibstring{in}%
\printunit{\intitlepunct}}}
\DeclareFieldFormat{journaltitle}{\enquote{#1\isdot}}
\DeclareFieldFormat[article]{title}{\textit{#1}}
\DeclareFieldFormat[article]{volume}{\textsc{#1}}
\DeclareFieldFormat[incollection]{title}{\textit{#1}}
\DeclareFieldFormat[inproceedings]{title}{\textit{#1}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\xpatchbibmacro{author}
{\printnames{author}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{author}}}
{\printnames{author}}}
{}{}
\xpatchbibmacro{bbx:editor}
{\printnames{editor}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{editor}}}
{\printnames{editor}}}
{}{}
\xpatchbibmacro{bbx:translator}
{\printnames{translator}}
{\iffootnote
{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
{\usebibmacro{cite:idem}}
{\printnames{translator}}}
{\printnames{translator}}}
{}{}
\renewbibmacro*{cite:ibid}{%
\printtext{%
\bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
\ifloccit
{\bibstring[\mkibid]{ibidemloccit}%
\global\toggletrue{cbx:loccit}}
{\bibstring[\mkibid]{ibidemnoloccit}}}}}
\begin{filecontents}{\jobname.bib}
@book{viora,
author = {Viora, Mario Enrico},
title = {Consolidazioni e codificazioni.
Contributo alla storia della codificazione},
location = {Torino},
date = {1967},
shorttitle = {Consolidazioni}
}
@book{lopez,
author = {Lopez, Roberto Sabatino},
title = {La rivoluzione commerciale del Medioevo},
location = {Torino},
date = {1971},
shorttitle = {La rivoluzione commerciale},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
What I get: \cite{viora}
What I want: {\scshape M. E. Viora},
{\itshape Consolidazioni e codificazioni.
Contributo alla storia della codificazione}, Torino 1967
Dummy quote to prevent \emph{ibidem}: \cite{lopez,sigfridsson}
Second quote: \cite{viora} (correct)
\printbibliography[heading=sc-comp]
\end{document}