Entrysubtype больше не рассматривается

Entrysubtype больше не рассматривается

Я использовал подтип записи для article(называемый newspaper), чтобы внести некоторые поправки в bibliography, а именно, я хотел, чтобы газета отображалась курсивом, если нет автора. Однако, похоже, это больше не учитывается при компиляции, и сначала я думал, что это из-за моих custombibstyles, но та же проблема возникла, когда я их удалил. (Также я не уверен, почему здесь опущены японские скобки, но это незначительная проблема :))

Вот как это выглядело раньше (и как я хочу, чтобы это выглядело):*здесь**здесь*

Вот как это выглядит сейчас: *здесь* МВЭ:

    %----------------------------------------------------------------------------
%   COMPILING SORTING
%----------------------------------------------------------------------------
% arara: lualatex: { shell: true, synctex: true }
% arara: biber
% arara: lualatex: { shell: true, synctex: true }
% [arara:] clean: { extensions: [ aux, bbl, bcf, blg, ltjruby, run.xml, synctex.gz, glg, glstex, idx, ilg, ind, log, out, toc ] }
%----------------------------------------------------------------------------
%   LAYOUT
%----------------------------------------------------------------------------
\documentclass[
  12pt,
  a4paper,
  headings=standardclasses,
  listof=totoc,
  numbers=noenddot
]{scrartcl}

\usepackage{showframe}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
%----------------------------------------------------------------------------
%   BIB
%----------------------------------------------------------------------------
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Asahi.20170220,
 journal = {Asahi Shimbun},
 entrysubtype = {newspaper},
 date = {2017-02-20},
 pages = {23},
 location = {Pr{\"a}fektur Gunma},
 note = {Morgenausgabe},
 title = {Onsen m\={a}ku 「ganzo」 o PR},
 subtitle = {「Hasshō no ji」 An'naka Isobe onsen ga ibento},
 titleaddon = {PR zum \glq Ursprung\grq{} des Onsen-Symbols. Event in den \glq Herkunftsorten\grq{} Annaka und Isobe-Onsen }
} 

@article{Baseel.20161208,
 author = {Baseel, Casey},
 entrysubtype = {newspaper},
 title = {Japan's government reconsiders plan to change country's iconic hot spring symbol after backlash},
 url = {https://soranews24.com/2016/12/08/japans-government-reconsiders-plan-to-change-countrys-iconic-hot-spring-symbol-after-backlash/},
 urldate = {2019-09-01},
 journaltitle = {Sora News 24},
 date = {2016-12-08}
}
\end{filecontents*}
\begin{filecontents}{customstyles.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{
  journaltitleaddon}

\DeclareDatamodelEntryfields[article,periodical]{
  journaltitleaddon}

\DeclareDatamodelEntrytypes{law}
\DeclareDatamodelFields[type=field,datatype=literal]{
  lawsubtitle,
  lawtitle,
  lawtitleaddon,
}
\DeclareDatamodelFields[type=field, datatype=verbatim]{
  paragraph,
  subparagraph,
  article,
}
\DeclareDatamodelEntryfields[law]{
  paragraph,
  subparagraph,
  article,
  lawsubtitle,
  lawtitle,
  lawtitleaddon,
}
\end{filecontents}

\begin{filecontents*}{custombibstring-ngerman.lbx}
\ProvidesFile{custombibstring-ngerman.lbx}[2019/07/26 english with additions for law]
\InheritBibliographyExtras{ngerman}
\DeclareBibliographyStrings{%
  inherit      = {ngerman},
  andothers    = {{et al\adddot}{et al\adddot}},
  byeditor     = {{herausgegeben von}{hg\adddotspace von}},
  editor       = {{Herausgeber}{Hg\adddot}},
  editors      = {{Herausgeber}{Hg\adddot}},
  urlseen      = {{letzter Abruf}{letzter Abruf}},
  paragraph    = {{Paragraph}{\S}},
  subparagraph = {{Absatz}{Abs\adddot}},
  article      = {{Artikel}{Art\adddot}},
}
\end{filecontents*}
\usepackage[
  backend=biber,
  style=ext-authoryear,
  sorting=nyvt,
  datamodel=customstyles,
  maxnames=25,
  innamebeforetitle=true,
  usetranslator=true,
  alldates=terse,
  labeldate=year,
  dashed=false,
  isbn=false
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage[hidelinks, pdfencoding=auto]{hyperref}

% regarded in custombibstrings
\NewBibliographyString{bydirector,duration,episode,format,fsk,paragraph,subparagraph,article,byproducer,seriesseason}
\DeclareLanguageMapping{ngerman}{custombibstrings-ngerman}

\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}]
    }
  }
}

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

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

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

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

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

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

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

% editor in parentheses
\DeclareDelimFormat{editortypedelim}{\addspace} 
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,online]
  {title}{#1\isdot}
\DeclareFieldFormat
  [thesis,unpublished]
  {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}
\DeclareFieldAlias{journaltitleaddon}{titleaddon}
\DeclareFieldAlias{lawtitleaddon}{titleaddon}
\DeclareFieldAlias{subtitleaddon}{titleaddon}

\newbibmacro{online:editor+maintitle}{% organization in front of maintitle
  \printlist{organization}%
  \clearlist{organization}%
  \setunit*{\addcolon\space}%
  \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}

% set online sources as per IOA
\renewbibmacro*{addendum+pubstate}{%
  \setunit{\space}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}

 \DeclareListFormat[online,law]{organization}{% organization in caps 
  \textsc{%
    \usebibmacro{list:delim}{#1}%
    #1\isdot
    \usebibmacro{list:andothers}}} 

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

% set articles as per IOA
\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}}%
       \setunit{\titleaddonpunct}%
      \printfield{journaltitleaddon}%
     \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}

%----------------------------------------------------------------------------
%   CITING
%----------------------------------------------------------------------------
\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}}

%----------------------------------------------------------------------------
%   MAIN
%----------------------------------------------------------------------------
\begin{document}
\cite{Asahi.20170220}
\cite{Baseel.20161208}
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\clearpage
\end{document}

решение1

В smallcapsразделе мы находим следующее

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

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

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

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

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

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

Этот код переопределяет один и тот же макрос \mkbibnamefamilyтри раза. Только последнее переопределение будет иметь преимущество. Если вы хотите, чтобы все эти определения применялись одновременно, вам придется объединить их в одно. Это может произойти с \ifboolexpr, что позволяет нам оценивать произвольные булевы выражения.

\renewcommand{\mkbibnamefamily}[1]{%
  \ifboolexpr{
       test {\ifitemannotation{journalauthor}}
    or test {\ifitemannotation{director}}
    or test {\ifitemannotation{producer}}}
    {\mkbibemph{#1}}
    {\textsc{#1}}}

Весь блок тогда будет выглядеть так:

% smallcaps
\newtoggle{bbx@journalauthor}
\newtoggle{bbx@director}
\newtoggle{bbx@producer}

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

\renewcommand{\mkbibnamefamily}[1]{%
  \ifboolexpr{
       test {\ifitemannotation{journalauthor}}
    or test {\ifitemannotation{director}}
    or test {\ifitemannotation{producer}}}
    {\mkbibemph{#1}}
    {\textsc{#1}}}

Обратите внимание, что переключатели bbx@directorи bbx@producerопределены, но нигде в остальной части документа не используются. Только bbx@journalauthorиспользуется позже.

Это и остальная часть вашего стиля заставляет меня сомневаться, что вы на самом делехотетьопределения для producerи director. Так что, возможно, вы просто хотите удалить код для directorи producerи заменить весь блок только

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

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

Связанный контент