引用两位作者/期刊:期刊(编号)

引用两位作者/期刊:期刊(编号)

不久前,我在这个平台上定制了 Bib 样式,从那以后它一直运行良好。现在,我必须稍微改变一下,但不知道该怎么做:每当我引用由两个人写的书/文章时,就会出现第二个作者名字的首字母。这本来不是问题,但现在有人告诉我应该把它去掉……我知道代码的不同部分的作用,但我认为仅仅删除部分代码是行不通的(至少对我来说还没有),所以我需要你的帮助!提前谢谢你!

编辑:我添加了整个(混乱的……)序言,因为我似乎已经失去了对所有内容的概述……我必须尽快解决这个问题。此外,我还添加了两个“有问题的” Bib 条目:knobel2007a 生成的是“Knobel/C. ( Lankshear (2007)”,而不是所需的“Knobel/Lankshear (2007)”(我知道基本问题在于我手动在其名称后添加了(eds.),但这会使其他条目变短)。另一个是 berg2012a 中的条目,它在参考书目“In: Written Language and Literacy 15.1”中生成,而我希望它是“In: Written Language and Literacy 15(1)”(期刊标题本身应保持草书,其余部分则为直立)。

如果还有缺失的信息,请告诉我,感谢您花时间帮助我!

\documentclass[paper=a4,12pt,numbers=endperiod]{scrartcl}
\usepackage{pgfplots}
\usepackage{xltxtra}

\usepackage[left=2cm,right=3cm,top=2cm,bottom=2cm,footskip=1cm]{geometry}
\usepackage{scrlayer-scrpage}

%\usepackage{fontspec}
\setmainfont[SmallCapsFont={* Caps}]{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Old Standard}
\newfontfamily\russianfont{Old Standard}
\newfontfamily\ipafont{Doulos SIL}
\newfontfamily\churchslavonicfont{Ponomar Unicode}

\usepackage{polyglossia}
\usepackage{churchslavonic}
\setdefaultlanguage{english}
%\setotherlanguages{german,romanian,russian,churchslavonic}
\usepackage[autostyle=true]{csquotes}

\usepackage{yfonts}
%\usepackage{tipa}
%\usepackage{ifxetex}
%\usepackage{combelow}
\usepackage{hanging}
\setlength\columnsep{20pt}

\usepackage{setspace}
\usepackage{filecontents}

\usepackage{graphicx}
\usepackage{float}
\usepackage{caption}

\usepackage[english]{fancyref}
\renewcommand{\fancyrefdefaultformat}{plain}
\renewcommand{\fancyrefdefaultspacing}{\fancyreftightspacing}
\newcommand*{\fancyrefapplabelprefix}{app}
\newcommand*{\appendname}{appendix}
\frefformat{plain}{\fancyrefapplabelprefix}{\appendname\fancyrefdefaultspacing#1}
\renewcommand*{\fancyrefseclabelprefix}{sec}
\newcommand*{\sectionname}{section}
\frefformat{plain}{\fancyrefseclabelprefix}{\sectionname\fancyrefdefaultspacing#1.}
\newcommand*{\fancyrefsublabelprefix}{sub}
\newcommand*{\subsectionname}{subsection}
\frefformat{plain}{\fancyrefsublabelprefix}{\subsectionname\fancyrefdefaultspacing#1.}
\renewcommand*{\fancyreftablabelprefix}{tab}
\renewcommand*{\tablename}{table}
\frefformat{plain}{\fancyreftablabelprefix}{\tablename\fancyrefdefaultspacing#1.}

\usepackage{multicol}

\usepackage{scrextend}
\addtokomafont{labelinglabel}{\sffamily}

%%Tables%%
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage[table]{colortbl}
\usepackage{multirow}
\usepackage{diagbox}

\usepackage{lipsum}

\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{url}

\usepackage[footnote,printonlyused]{acronym}
\usepackage{footnote}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\deffootnote[1.0em]{1.0em}{1.0em}
    {\textsuperscript{\thefootnotemark}\,\enskip}

\setkomafont{disposition}{\mdseries\rmfamily}
\onehalfspacing
\renewcommand{\baselinestretch}{1.5}

%%ToC%%
\KOMAoptions{
    toc=sectionentrydotfill,
    listof=totoc
}

\newkomafont{standardsection}{\Large}
\newkomafont{nsection}{\usekomafont{standardsection}\slshape}

\DeclareTOCStyleEntry[%
level=\sectiontocdepth,%
beforeskip=0pt plus .2pt,%
indent=0pt,%
numwidth=1.5em,%
entryformat=\usekomafont{sectionentry}\textsl%
]{section}{nsection}

\newcommand*\usensection{% define switch to nsection
    \addtocontents{toc}{\protect\addvspace{1em plus 1pt}}% additional space in TOC before the first nsection entry
    \setkomafont{section}{\usekomafont{nsection}}%
    \renewcommand\addsectiontocentry[2]{\addtocentrydefault{nsection}{##1}{##2}}%
}
\newcommand*\usestandardsection{% define switch to standard section
    \setkomafont{section}{\usekomafont{standardsection}}%
    \renewcommand\addsectiontocentry[2]{\addtocentrydefault{section}{##1}{##2}}%
}

\AfterTOCHead[toc]{\thispagestyle{empty}\pagestyle{empty}}
\AfterStartingTOC[toc]{\clearpage}

%%Bibliography%%
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{TransAlph.bib}
\DefineBibliographyStrings{english}{references={Bibliography}}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\renewbibmacro*{byeditor+others}{%
    \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
        \setunit{\addspace}%
        \usebibmacro{byeditor+othersstrg}%
        \clearname{editor}%
        \newunit}%
    \usebibmacro{byeditorx}%
    \usebibmacro{bytranslator+others}}
\renewbibmacro*{byeditor+othersstrg}{\usebibmacro{editor+othersstrg}}
\renewbibmacro*{bytranslator+othersstrg}{\usebibmacro{translator+othersstrg}}
\renewbibmacro*{bytypestrg}[2]{%
    \iffieldundef{#1type}
    {\bibstring{#2}}
    {\ifbibxstring{\thefield{#1type}}
        {\bibstring{\thefield{#1type}}}
        {\printtext{\thefield{#1type}}}}}

\renewcommand*{\multinamedelim}{/}
\renewcommand*{\finalnamedelim}{\multinamedelim}

\renewcommand*{\labelnamepunct}{\addcolon\space}
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}

\DeclareFieldFormat{superedition}{\textsuperscript{#1}}

\providecommand*{\iflabeldateisdate}{%
    \ifboolexpr{%
        not test {\iffieldundef{labeldatesource}}
        and 
        (test {\iffieldequalstr{labeldatesource}{}} 
        or test {\iffieldequalstr{labeldatesource}{year}})}}

\renewbibmacro*{date+extrayear}{%
    \iffieldundef{labelyear}
    {}
    {\usebibmacro{origdate}%
        \setunit*{\addspace}%
        \printtext[parens]{%
            \iflabeldateisdate
            {\iffieldnum{edition}
                {\printfield[superedition]{edition}%
                    \global\clearfield{edition}}
                {}%
                \printdateextra}
            {\printlabeldateextra}}}}

\newbibmacro*{origdate}{%
    \iffieldundef{origyear}
    {}
    {\printtext[brackets]{\printorigdate}}}

\renewcommand*{\bibpagespunct}{\addcolon\space}
\DeclareFieldFormat{pages}{#1}

\DeclareNameAlias{sortname}{family-given}

\renewcommand*{\labelnamepunct}{\addcolon\space}
\newcounter{SprachB}
\newcommand{\SprachB}[1]{\refstepcounter{SprachB}\label{#1}}

\usepackage{etoolbox}
\AtBeginEnvironment{quote}{\singlespacing\footnotesize}

\newcommand{\graphem}[1]{\guilsinglleft {#1}\guilsinglright}
\newcommand{\ipa}[1]{{\ipafont {#1}}}
\newcommand{\aks}[1]{{\churchslavonicfont {#1}}}
\newcommand{\rus}[1]{{\russianfont {#1}}}
\newcommand{\phonem}[1]{/\ipa{#1}/}
\newcommand{\phon}[1]{[\ipa{#1}]}

\newcommand{\sog}[1]{‘{#1}’}
\newcommand{\zit}[1]{“{#1}”}

\hyphenation{Script-Ora-lia}

\usepackage{silence}

\pagestyle{scrheadings}
\cfoot{}
\ofoot{\pagemark\hspace{-.5cm}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@Book{knobel2007a,
Title                    = {A New Literacies Sampler \textup{(New Literacies and Digital Epistemologies\,29)}},
Author                   = {Knobel, Michele and Lankshear, Colin (eds.)},
Keywords                 = {sek},
Location                 = {New\,York},
Publisher                = {Peter Lang},
Year                     = {2007}
}
@Article{berg2012a,
Title                    = {Identifying Graphematic Units. Vowel and Consonant Letters},
Author                   = {Berg, Kristian},
Journal                  = {Written Language \& Literacy},
Keywords                 = {sek},
Number                   = {1},
Pages                    = {26--45},
Volume                   = {15},
Year                     = {2012}
}
\end{filecontents}

\begin{document}
Example sentence \textcite[cf.][3--6]{knobel2007a}.\\
Another example sentence \parencite[][39]{berg2012a}.
\bibliography{\jobname}
\end{document}

答案1

删除不必要的内容并使代码可编译后,我的输出是

例句 Knobel/Lankshear(参见 2007:3–6)。另一个例句(Berg 2012:39)。\Berg,Kristian(2012): “识别字形单位。元音和辅音字母”。在:书面语言和读写能力 15.1:26–45。Knobel,Michele/Lankshear,Colin(编辑)(2007):新读写能力样本(新读写能力和数字认识论 29)。纽约:Peter Lang。\

所以我无法重现这个奇怪的名字问题。

但仍然

author = {Knobel, Michele and Lankshear, Colin (eds.)},

knobel2007a错误的。如果这两个人都是编辑,他们应该被正确地标记为编辑

editor = {Knobel, Michele and Lankshear, Colin},

Biber/BibTeX 可能会在解析名称和附加内容时产生混淆(eds.),并因此产生奇怪的输出。您看到的可以如果您有由 Colin Lankshear(或任何其他 Lankshear)撰写或编辑的第二个来源,则需要解释。在这种情况下,该uniquename功能会尝试区分Lankshear, ColinLanksehar, Colin (eds.)认为这两个人是不同的人,因此它会添加姓名首字母,因为Lanksehar, Colin (eds.)这不是最好的输入,Biber 认为首字母是“C. (. Lankshear”并打印出来。姓名消歧义可以关闭,如中所述biblatex,authoryear 样式:文内引用显示某些参考书目条目的名字首字母含有 Biber 的文献会产生奇怪的引用:名字出现不规律

在我看来,它knobel2007a实际上是一个@collection而不是一个@book。一个@book通常是由同一组作者完整撰写的作品,而一个则@collection是,嗯……由编辑挑选的不同作者的作品的集合。

对于volumenumber)的事情,您只需要重新定义 bibmacrovolume+number+eid并更改 的字段格式number。请参阅下面的 MWE。

我对你的biblatex3.11 代码进行了稍微的现代化,因此

\documentclass[paper=a4,12pt,numbers=endperiod]{scrartcl}

\usepackage[backend=biber,style=authoryear]{biblatex}
\DefineBibliographyStrings{english}{references={Bibliography}}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
     \setunit{\addspace}%
     \usebibmacro{byeditor+othersstrg}%
     \clearname{editor}%
     \newunit}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}
\renewbibmacro*{byeditor+othersstrg}{\usebibmacro{editor+othersstrg}}
\renewbibmacro*{bytranslator+othersstrg}{\usebibmacro{translator+othersstrg}}
\renewbibmacro*{bytypestrg}[2]{%
  \iffieldundef{#1type}
    {\bibstring{#2}}
    {\ifbibxstring{\thefield{#1type}}
       {\bibstring{\thefield{#1type}}}
       {\printtext{\thefield{#1type}}}}}

\DeclareDelimFormat{multinamedelim}{\addslash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}

\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}

\DeclareFieldFormat{superedition}{\textsuperscript{#1}}

\renewbibmacro*{date+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\usebibmacro{origdate}%
     \setunit*{\addspace}%
     \printtext[parens]{%
       \iflabeldateisdate
         {\iffieldnum{edition}
            {\printfield[superedition]{edition}%
             \global\clearfield{edition}}
            {}%
          \printdateextra}
         {\printlabeldateextra}}}}

\newbibmacro*{origdate}{%
  \iffieldundef{origyear}
    {}
    {\printtext[brackets]{\printorigdate}}}

\renewcommand*{\bibpagespunct}{\addcolon\space}
\DeclareFieldFormat{pages}{#1}

\DeclareNameAlias{sortname}{family-given}

\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  %\setunit*{\adddot}%<- comment this
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@collection{knobel2007a,
  title     = {A New Literacies Sampler},
  editor    = {Knobel, Michele and Lankshear, Colin},
  keywords  = {sek},
  location  = {New York},
  publisher = {Peter Lang},
  year      = {2007},
  series    = {New Literacies and Digital Epistemologies},
  number    = {29},
}
@article{berg2012a,
  title    = {Identifying Graphematic Units. Vowel and Consonant Letters},
  author   = {Berg, Kristian},
  journal  = {Written Language \& Literacy},
  keywords = {sek},
  number   = {1},
  pages    = {26--45},
  volume   = {15},
  year     = {2012}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Example sentence \textcite[cf.][3--6]{knobel2007a}.
Another example sentence \parencite[][39]{berg2012a}.

\printbibliography
\end{document}

我们获得

例句 Knobel/Lankshear(参见 2007: 3–6)。另一个例句(Berg 2012: 39)。\Berg, Kristian (2012):“识别字形单位。元音和辅音字母”。在:书面语言与读写能力 15(1): 26–45。\Knobel, Michele/Lankshear, Colin (eds.) (2007): 新读写能力样本。新读写能力和数字认识论 29。纽约:Peter Lang。

相关内容