报纸特殊规则 Biblatex 没有作者

报纸特殊规则 Biblatex 没有作者

我想对我的条目做一些修改。

我想为报纸创建一个特殊规则作为特殊日记条目(我认为如果我将条目标记为“报纸”可能会有所帮助)。仅当它是一篇报纸文章并且没有作者时,我才会希望“日记”标题取代作者位置(在前面)但不是小写字母,而应该是斜体。

电流输出图像 它大概是什么样子的图像:)

这是我的 MWE:

\documentclass{scrreprt}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
%----------------------------------------------------------------------------
%   BIB
%----------------------------------------------------------------------------
 \usepackage[
    backend=biber,
    style=authoryear,
    sorting=nyvt, 
    maxnames=25,
    dashed=false, 
    isbn=false
  ]{biblatex}
 \addbibresource{library.bib}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand{\labelnamepunct}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand\postnotedelim{\addcolon\addspace}
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,unpublished]
  {title}{#1\isdot}
\DeclareFieldFormat
  [thesis]
  {title}{\mkbibemph{#1}\isdot}  % thesis title italic


% no period after addon titles
\usepackage{xpatch}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
\DeclareDelimFormat{titleaddondelim}{\addspace}
\xpatchbibmacro{title}
  {\printfield{titleaddon}}
  {\setunit{\printdelim{titleaddondelim}}%
   \printfield{titleaddon}}
  {}
  {}
\DeclareFieldFormat{booktitleaddon}{\mkbibbrackets{#1}}
\DeclareDelimFormat{booktitleaddondelim}{\addspace}    
\xpatchbibmacro{booktitle}
  {\printfield{booktitleaddon}}
  {\setunit{\printdelim{titleaddondelim}}%
   \printfield{booktitleaddon}}
  {}
  {}
\DeclareFieldFormat{maintitleaddon}{\mkbibbrackets{#1}}
\DeclareDelimFormat{maintitleaddondelim}{\addspace}  
\xpatchbibmacro{maintitle}
  {\printfield{maintitleaddon}}
  {\setunit{\printdelim{titleaddondelim}}%
   \printfield{maintitleaddon}}
  {}
  {}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\end{document}

加上测试条目:

@article{yomiuri.1981,
 journal = {Yomiuri Shimbun},
 type = {newspaper},
 year = {22.01.1981},
 pages = {20},
 location = {Kanagawa},
 note = {Morgenausgabe},
 title = {Atarashī taishū bunka sanmi ittai no dendō. Kawasaki ni manga shashin eizō bunka sentā},
 titleaddon = {Neuer Palast der Dreifaltigkeit der Populärkultur. Das Zentrum für Manga, Fotografie und visuelle Kultur in Kawasaki}
} 

@article{testauthor.1981,
 journal = {Yomiuri Shimbun},
 author = {Test, Author},
 type = {newspaper},
 year = {22.01.1981},
 pages = {20},
 location = {Kanagawa},
 note = {Morgenausgabe},
 title = {Atarashī taishū bunka sanmi ittai no dendō. Kawasaki ni manga shashin eizō bunka sentā},
 titleaddon = {Neuer Palast der Dreifaltigkeit der Populärkultur. Das Zentrum für Manga, Fotografie und visuelle Kultur in Kawasaki}
} 

抱歉给您带来不便。遗憾的是我不知道如何自己解决这个问题

答案1

这是一个相当棘手的要求,因为在这种情况下,人们希望journal从本质上接管所有的工作author。这个想法是让 Biber 使用源映射将journal字段复制到字段中。author

有作者的报纸文章和没有作者的报纸文章之间也存在一些细节差异,因此我们需要一种方法来指示这些特殊条目。这可以通过条目选项自动完成journalauthor

然后我们需要复制原始定义并为“journalauthor案例”添加测试。

正如聊天中讨论的那样,我根据 提出了建议biblatex-ext。我还对字段名称做了一些修改。我使用了entrysubtype = {newspaper},而不是type。“Morgenausgabe”的字段现在是issue而不是note

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}

\usepackage[
  backend=biber,
  style=ext-authoryear,
  sorting=nyvt,
  maxnames=25,
  dashed=false,
  isbn=false,
  innamebeforetitle=true,
  usetranslator=true,
  alldates=terse,
  labeldate=year,
]{biblatex}

\usepackage{hyperref}

\DefineBibliographyStrings{german}{%
  andothers = {et al\adddot},
  editor    = {Hg\adddot},
  editors   = {Hg\adddot},
  urlseen = {letzter Abruf},
}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=false]{
      \pertype{article}
      \step[fieldsource=entrysubtype, match=\regexp{\Anewspaper\Z}, final]
      \step[fieldsource=journal, final]
      \step[fieldset=author, origfieldval, final]
      \step[fieldsource=author, match=\regexp{\A(.*)\Z}, replace=\regexp{\{$1\}}]
      \step[fieldset=author+an, fieldvalue={1=journalauthor}]
      \step[fieldset=options, fieldvalue={journalauthor}]
    }
  }
}

\newtoggle{bbx@journalauthor}
\DeclareEntryOption[boolean]{journalauthor}[true]{%
\settoggle{bbx@journalauthor}{#1}}

\renewcommand{\mkbibnamefamily}[1]{%
  \ifitemannotation{journalauthor}
    {\mkbibemph{#1}}
    {\textsc{#1}}}

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

\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,unpublished,online]
  {title}{#1\isdot}
\DeclareFieldFormat
  [thesis]
  {title}{\mkbibemph{#1}\isdot} % thesis title italic


% no period after addon titles
\renewcommand*{\titleaddonpunct}{\addspace}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
\DeclareFieldAlias{booktitleaddon}{titleaddon}
\DeclareFieldAlias{maintitleaddon}{titleaddon}


\newbibmacro{online:editor+maintitle}{%
  \printnames{editor}%
  \setunit*{\addcolon\space}%
  \usebibmacro{maintitle}}

\usepackage{xpatch}
\xpatchbibdriver{online}
  {\usebibmacro{byeditor+others}}
  {\usebibmacro{online:editor+maintitle}}
  {}{}
\xpatchbibmacro{editorstrg}{\bibstring}{\bibcpstring}{}{}
\xpatchbibmacro{editorstrg}{\bibstring}{\bibcpstring}{}{}

\renewbibmacro*{in:}{%
  \iftoggle{bbx@journalauthor}
    {}
    {\printtext{%
     \bibstring{in}\intitlepunct}}}

\DeclareNameAlias{ineditor}{sortname}

\renewcommand*{\volnumdelim}{\addcomma\space}

\DeclareListWrapperFormat[article]{parenlocation}{\mkbibparens{#1}}
\DeclareListAlias{parenlocation}{location}
\renewbibmacro*{journal}{%
  \ifboolexpr{
    (test {\iffieldundef{journaltitle}}
     and
     test {\iffieldundef{journalsubtitle}})
    or
    togl {bbx@journalauthor}
  }
    {\ifboolexpr{
       togl {bbx@journalauthor}
       and
       test {\iffieldequalstr{entrysubtype}{newspaper}}
     }
       {\printlist{location}}
       {}}
    {\printtext[journaltitle]{%
       \printfield[titlecase]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{journalsubtitle}}%
     \iffieldequalstr{entrysubtype}{newspaper}
       {\setunit{\addspace}%
        \printlist[parenlocation]{location}}
       {}}}

\renewbibmacro*{issue+date}{%
  \usebibmacro{bbx:ifmergeddate}
    {}
    {\printtext[issuedate]{%
       \printdate}}%
  \setunit{\addcomma\space}%
  \printfield{issue}%
  \setunit{\addcomma\space}}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\jourvoldelim}%
  \iffieldundef{series}
    {}
    {\setunit*{\jourserdelim}%
     \printfield{series}%
     \setunit{\servoldelim}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\volnumdatedelim}%
  \iftoggle{bbx@journalauthor}
    {}
    {}
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}


\urlstyle{same}% boo
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\addcolon\space#1}}

\makeatletter
\renewbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[extblx@inner\blx@delimcontext delims]{%
       \printtext[bibhyperref]{%
         \iftoggle{bbx@journalauthor}
           {\printfield{issue}%
            \setunit{\addcomma\space}%
            \printtext[\blx@delimcontext labeldate]{%
              \printdateextra}}
           {\printtext[\blx@delimcontext labeldate]{%
              \printlabeldateextra}}}}}}
\makeatother

\renewcommand\postnotedelim{\addcolon\addspace}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}



%-------------
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{yomiuri.1981,
  journal      = {Yomiuri Shimbun},
  entrysubtype = {newspaper},
  date         = {1981-01-22},
  pages        = {20},
  location     = {Kanagawa},
  issue        = {Morgenausgabe},
  title        = {Atarashī taishū bunka sanmi ittai no dendō.
                  Kawasaki ni manga shashin eizō bunka sentā},
  titleaddon   = {Neuer Palast der Dreifaltigkeit der Populärkultur.
                  Das Zentrum für Manga, Fotografie und visuelle Kultur in Kawasaki}
}
@article{testauthor.1981,
  journal      = {Yomiuri Shimbun},
  author       = {Test, Author},
  entrysubtype = {newspaper},
  date         = {1981-01-22},
  pages        = {20},
  location     = {Kanagawa},
  issue        = {Morgenausgabe},
  title        = {Atarashī taishū bunka sanmi ittai no dendō.
                  Kawasaki ni manga shashin eizō bunka sentā},
  titleaddon   = {Neuer Palast der Dreifaltigkeit der Populärkultur.
                  Das Zentrum für Manga, Fotografie und visuelle Kultur in Kawasaki}
}
@incollection{Chua.2017,
  author    = {Chua, Beng Huat},
  year      = {2017},
  title     = {Regional soft power/creative industries competition},
  publisher = {Routledge},
  maintitle = {Routledge Handbook of East Asian Popular Culture},
  location  = {London},
  pages     = {242--253},
  editor    = {Iwabuchi, K\={o}ichi and Berry, Chris and Tsai, Eva}
}
@book{fukuzawa,
  author     = {Fukuzawa, Yukichi},
  title      = {Fukuzawa Yukichi -- Eine autobiographische Lebensschilderung},
  year       = {1971},
  editor     = {Gerhard  Linzbichler},
  translator = {Gerhard  Linzbichler},
  location   = {Tôkyô},
  publisher  = {Keiô  Gijuku  Daigaku},
}
@book{philippi,
  translator = {Philippi, Donald L.},
  year       = {1968},
  title      = {Kojiki},
  location   = {Tôkyô},
  publisher  = {University of Tokyo Press},
}

@article{Cho.2011,
author = {Cho, Younghan},
year = {2011},
title = {Desperately Seeking East Asia Amidst the Popularity of South Korean Pop Culture in Asia},
pages = {383--404},
volume = {25},
issn = {0950-2386},
journal = {Cultural Studies},
number = {3}
}
@suppcollection{Geertz.2001,
author = {Geertz, Clifford},
year = {2001},
title = {Introduction},
publisher = {Princeton University Press},
maintitle = {Schools of Thought},
mainsubtitle = {Twenty-Five Years of Interpretive Social Science},
pagetotal = {1--12},
location = {Princeton, New Jersey},
editor = {Scott, Joan W. and Keates, Deborah}
}

@book{Furuta.2002,
author = {Furuta, Hisateru and Robson, Dean},
year = {2002},
title = {Broadcasting in Japan},
publisher = {NHK Broadcasting Culture Research Institute},
isbn = {4990138708},
subtitle = {The Twentieth Century Journey from Radio to Multimedia},
location = {Tokyo},
organization = {Nihon h\={o}s\={o} ky\={o}kai h\={o}s\={o} bunka ch\={o}sa kenky\={u}jo},
}

@book{Ito.1978,
author = {It\={o}, Masami},
year = {1978},
title = {Broadcasting in Japan},
volume = {7},
publisher = {{Routledge and Kegan Paul: International Institute of Communications}},
isbn = {071000043X},
location = {London},
maintitle = {Case studies on broadcasting systems}
}

@book{keizaizasshi.1901,
date = {1897/1901},
maintitle = {Kokushi taikei},
maintitleaddon = {Kompendium nationaler Geschichte},
title = {Nihon kiryaku},
volume = {5},
author = {{Keizai Zasshi-sha-hen}},
publisher = {Keizai Zasshi-sha},
doi = {10.11501/991095},
addendum = {(letzter Abruf: 10.03.2019)}
}

@book{Kontentsu.2008,
author = {{Kontentsu bijinesu ch\={o}sa kenky\={u}-kai}},
year = {2008},
title = {Saishin kontentsu bijinesu no subete ga wakaru hon},
publisher = {{Nihon n\={o}ritsu ky\={o}kai manejimento sentā [JMA Management Center]}},
location = {T\={o}ky\={o}},
titleaddon = {Buch, mit dem Sie alles {\"u}ber das neue Contents Business verstehen}
}

@article{Takeda.2010,
author = {Takeda, Kazuya},
year = {2010},
title = {Heij\={o}-ky\={o} ato hakkutsu ch\={o}sa no ima},
titleaddon = {Ausgrabungsübersicht der Heijyo-ky\={o}-Ruinen},
pages = {8-12},
series = {Heijō\={o}-ky\={o} sento 1300-nen},
volume = {599},
journal = {Gekkan k\={o}ko-gaku j\={a}naru},
publisher = {Nara Women's University Academic Information Center}
}

@article{Yang.2012,
title = {From Korean Wave to Korean Living},
author = {Yang, Fang-Chih},
year = {2012},
month = {9},
volume = {43},
pages = {419--445},
journal = {Korea Observer},
issn = {0023-3919},
publisher = {Institute of Korean Studies},
number = {3}
}
@online{ShogakukanInc.2015b,
 year = {2015},
 title = {Shakai shugi keizai},
 url = {http://erf.sbb.spk-berlin.de/han/japanknowledge/https/japanknowledge.com/lib/display/?lid=1001000111175},
 urldate = {2019-02-10},
 author = {{Shogakukan Inc.}},
 maintitle = {Dejitaru daijisen},
 maintitleaddon = {Digitales einsprachiges japanisches Wörterbuch},
 keywords = {encyclopedia}
 } 

@online{Buritanika.2014,
 year = {2014},
 title = {Tahinshu sh\={o}ry\={o} seisan},
 url = {https://kotobank.jp/word/%E5%A4%9A%E5%93%81%E7%A8%AE%E5%B0%91%E9%87%8F%E7%94%9F%E7%94%A3-94128},
 urldate = {2019-02-10},
 author = {{Britannica Japan Co.}},
 maintitle = {Buritanika kokusai daihyakkajiten},
 maintitleaddon = {Britannica internationale Enzyklopädie},
 keywords = {encyclopedia}
 }

@online{JiyukokuminshaCo.2015,
 year = {2015},
 title = {Soren ky\={o}sant\={o}},
 url = {http://erf.sbb.spk-berlin.de/han/japanknowledge/https/japanknowledge.com/lib/display/?lid=500202018012390},
 urldate = {2019-02-10},
 author = {{Jiyukokuminsha Co., Ltd}},
 maintitle = {Gendai y\={o}go no kiso chishiki},
 maintitleaddon = {Basiswissen moderner Terminologien},
 keywords = {encyclopedia}
 }
\end{filecontents*}

\addbibresource{\jobname.bib}

\begin{document}
\autocite{yomiuri.1981} and \autocite{testauthor.1981} and \autocite{Chua.2017,fukuzawa}

\nocite{*}
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\end{document}

书目输出的最后一页的截图。

相关内容