biber icon indicating copy to clipboard operation
biber copied to clipboard

Problem with the name of the datafield set

Open matteofg opened this issue 1 year ago • 8 comments

If the name of the datafield set contains uppercase characters...

\DeclareDatafieldSet{NAME}{
  \member[...]
}

\DeclareStyleSourcemap{
  \maps{
    \map[foreach={NAME}]{
      \step[fieldsource=\regexp{$MAPLOOP}, match=..., replace=...]
    }
  }
}

... the sourcemapping fails.

Is there any particular reason why loopval must be written in lower case?

matteofg avatar Aug 06 '24 18:08 matteofg

Looks like a bug. Which combinations of upper/lower for the set name and loopval don't work?

plk avatar Aug 07 '24 09:08 plk

  • set name can be written in any way (upper case, CamelCase, etc.)
  • loopval can be written only in lower case
  • if set name is written in upper case and loopval is written in lower case, the sourcemapping works fine
  • but, if set name is written in lower case and loopval is written in upper case, the sourcemapping fails

matteofg avatar Aug 07 '24 11:08 matteofg

Can you try 2.20 DEV version from SF? I think this should be fixed.

plk avatar Aug 07 '24 15:08 plk

I just downloaded and installed biber 2.21 (beta). Unfortunately, nothing has changed.

matteofg avatar Aug 08 '24 07:08 matteofg

Works now for me - which platform binary did you download of 2.20?

\documentclass{article}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareDatafieldSet{TEST}{
  \member[field=title]
}
\DeclareStyleSourcemap{
  \maps{
    \map[foreach={TEST}]{
      \step[fieldsource=\regexp{$MAPLOOP}, match=a, replace=z]
    }
  }
}
\begin{document}
\cite{kastenholz}
\printbibliography
\end{document}

plk avatar Aug 08 '24 09:08 plk

I'm typesetting on macos 14.5 (Sonoma, latest version) and use the MacTeX-2024 Distribution. I downloaded and installed the binary compressed into biber-darwin_x86_64.tar

matteofg avatar Aug 08 '24 11:08 matteofg

Hmm, can you get 2.21 dev version from sourceforge? This works for me with the above example.

plk avatar Aug 08 '24 17:08 plk

I just reinstalled. Now it works, thanks.

matteofg avatar Aug 08 '24 18:08 matteofg