plk / biblatex

biblatex is a sophisticated bibliography system for LaTeX users. It has considerably more features than traditional bibtex and supports UTF-8
517 stars 118 forks source link

Package keyval Error: <BDS>UL-3pimOcrqJm</BDS> undefined #855

Closed hushidong closed 5 years ago

hushidong commented 5 years ago

! Package keyval Error: UL-3pimOcrqJm undefined

env:windows,texlive2018,biblatex3.12

When I use a set with authoryear style,I encounter an error ! Package keyval Error: <BDS>UL-3pimOcrqJm</BDS> undefined。The MWE is this:

\documentclass[twoside]{article}
\usepackage[colorlinks]{hyperref}
\usepackage[backend=biber,style=authoryear]{biblatex}%sorting=nyt

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@Book{Yi2013--,
  Title                    = {Supersonic and hypersonic nozzle design},
  Address                  = {Beijing},
  Author                   = {Yi, Shi he and Zhao, Yu xin and He, Lin and Zhang, Min li},
  Publisher                = {National Defense Industry Press},
  Year                     = {2013}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min-li and Yi, Shi-he and Zhao, Yu-xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}
\end{filecontents}

\addbibresource{\jobname.bib}

    \begin{document}

    \section{ref:single}
    \begin{refsection}

    single\cite{Zhang2007-500-503,Yi2013--}

    \printbibliography
    \end{refsection}

    \section{ref:set}
    \begin{refsection}
    \defbibentryset{zhangetal2007}{Zhang2007-500-503,Yi2013--}

    set\cite{zhangetal2007};\par

    \printbibliography
    \end{refsection}

\end{document}

and the error info is:


Package hyperref Warning: Rerun to get /PageLabels entry.

*geometry* driver: auto-detecting
*geometry* detected driver: xetex
(./testallformat1.bbl)

! Package keyval Error: <BDS>UL-3pimOcrqJm</BDS> undefined.

See the keyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.41     single\cite{Zhang2007-500-503,Yi2013--}

the main reason is the referenceZhang2007-500-503,which is a member of the set zhangetal2007。 but it‘s quite wierd that after changing the sequence of the section of the set and single cite,no error occured,the wme like this:

\documentclass[twoside]{article}
\usepackage[colorlinks]{hyperref}
\usepackage[backend=biber,style=authoryear]{biblatex}%sorting=nyt

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@Book{Yi2013--,
  Title                    = {Supersonic and hypersonic nozzle design},
  Address                  = {Beijing},
  Author                   = {Yi, Shi he and Zhao, Yu xin and He, Lin and Zhang, Min li},
  Publisher                = {National Defense Industry Press},
  Year                     = {2013}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min-li and Yi, Shi-he and Zhao, Yu-xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}
\end{filecontents}

\addbibresource{\jobname.bib}

    \begin{document}

    \section{ref:set}
    \begin{refsection}
    \defbibentryset{zhangetal2007}{Zhang2007-500-503,Yi2013--}

    set\cite{zhangetal2007};\par

    \printbibliography
    \end{refsection}

    \section{ref:single}
    \begin{refsection}

    single\cite{Zhang2007-500-503,Yi2013--}

    \printbibliography
    \end{refsection}

\end{document}

and the numeric style work with no error for the previous MWEs:

\documentclass[twoside]{article}
\usepackage[colorlinks]{hyperref}
\usepackage[backend=biber,style=numeric]{biblatex}%sorting=nyt

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@Book{Yi2013--,
  Title                    = {Supersonic and hypersonic nozzle design},
  Address                  = {Beijing},
  Author                   = {Yi, Shi he and Zhao, Yu xin and He, Lin and Zhang, Min li},
  Publisher                = {National Defense Industry Press},
  Year                     = {2013}
}

@Article{Zhang2007-500-503,
  Title                    = {The design and experimental investigations of supersonic length shorted nozzle},
  Author                   = {Zhang, Min-li and Yi, Shi-he and Zhao, Yu-xin},
  Journal                  = {ACTA AERODYNAMICA SINICA},
  Number                   = {4},
  Pages                    = {500-503},
  Volume                   = {25},
  Year                     = {2007}
}
\end{filecontents}

\addbibresource{\jobname.bib}

    \begin{document}

    \section{ref:single}
    \begin{refsection}

    single\cite{Zhang2007-500-503,Yi2013--}

    \printbibliography
    \end{refsection}

    \section{ref:set}
    \begin{refsection}
    \defbibentryset{zhangetal2007}{Zhang2007-500-503,Yi2013--}

    set\cite{zhangetal2007};\par

    \printbibliography
    \end{refsection}

\end{document}
moewew commented 5 years ago

Thank you very much for reporting this issue. The issue can be reproduced in

\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}

\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson}

\printbibliography

\newrefsection
\defbibentryset{myset}{sigfridsson}
\cite{sigfridsson}

\printbibliography
\end{document}

It goes away if we comment out the \defbibentryset{myset}{sigfridsson} line.

@plk This seems to be a Biber issue since the .bbl contains obvious nonsense

% $ biblatex auxiliary file $
% $ biblatex bbl format version 3.0 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated by
% biber as required.
%
\begingroup
\makeatletter
\@ifundefined{ver@biblatex.sty}
  {\@latex@error
     {Missing 'biblatex' package}
     {The bibliography requires the 'biblatex' package.}
      \aftergroup\endinput}
  {}
\endgroup

\refsection{0}
  \datalist[entry]{nyt/global//global/global}
    \entry{sigfridsson}{article}{}
      \name{author}{2}{<BDS>UL-1k4Qn7S4WI</BDS>}{%
        {{<BDS>UNS-1l8bpzQATm</BDS>,<BDS>UNP-1l8bpzQATm</BDS>,hash=484061f383fb3b729627e12ab42c1963}{%
           family={Sigfridsson},
           familyi={S\bibinitperiod},
           <BDS>UNP-family-1l8bpzQATm</BDS>,
           given={Emma},
           giveni={E\bibinitperiod},
           <BDS>UNP-given-1l8bpzQATm</BDS>}}%
        {{<BDS>UNS-1lYggT6iYo</BDS>,<BDS>UNP-1lYggT6iYo</BDS>,hash=b7e299b632e5db12681c2decc8ce023f}{%
           family={Ryde},
           familyi={R\bibinitperiod},
           <BDS>UNP-family-1lYggT6iYo</BDS>,
           given={Ulf},
           giveni={U\bibinitperiod},
           <BDS>UNP-given-1lYggT6iYo</BDS>}}%
      }
      \strng{namehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{fullhash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{bibnamehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{authorbibnamehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{authornamehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{authorfullhash}{d9015d9f08448ab0cb194bd964d7b44b}
      \field{sortinit}{S}
      \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
      \field{extradatescope}{labelyear}
      \field{labeldatesource}{}
      \field{labelnamesource}{author}
      \field{labeltitlesource}{title}
      \field{abstract}{Four methods for deriving partial atomic charges from the quantum chemical electrostatic potential (CHELP, CHELPG, Merz-Kollman, and RESP) have been compared and critically evaluated. It is shown that charges strongly depend on how and where the potential points are selected. Two alternative methods are suggested to avoid the arbitrariness in the point-selection schemes and van der Waals exclusion radii: CHELP-BOW, which also estimates the charges from the electrostatic potential, but with potential points that are Boltzmann-weighted after their occurrence in actual simulations using the energy function of the program in which the charges will be used, and CHELMO, which estimates the charges directly from the electrostatic multipole moments. Different criteria for the quality of the charges are discussed.}
      \field{annotation}{An \texttt{article} entry with \texttt{volume}, \texttt{number}, and \texttt{doi} fields. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}
      \field{indextitle}{Methods for deriving atomic charges}
      \field{journaltitle}{Journal of Computational Chemistry}
      \field{langid}{english}
      \field{langidopts}{variant=american}
      \field{number}{4}
      \field{title}{Comparison of methods for deriving atomic charges from the electrostatic potential and moments}
      \field{volume}{19}
      \field{year}{1998}
      \field{dateera}{ce}
      \field{pages}{377\bibrangedash 395}
      \range{pages}{19}
      \verb{doi}
      \verb 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P
      \endverb
    \endentry
  \enddatalist
\endrefsection

\refsection{1}
  \datalist[entry]{nyt/global//global/global}
    \entry{myset}{set}{}
      \set{sigfridsson}
      \field{sortinit}{S}
      \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
    \endentry
    \entry{sigfridsson}{article}{}
      \inset{myset}
      \name{author}{2}{}{%
        {{hash=484061f383fb3b729627e12ab42c1963}{%
           family={Sigfridsson},
           familyi={S\bibinitperiod},
           given={Emma},
           giveni={E\bibinitperiod}}}%
        {{hash=b7e299b632e5db12681c2decc8ce023f}{%
           family={Ryde},
           familyi={R\bibinitperiod},
           given={Ulf},
           giveni={U\bibinitperiod}}}%
      }
      \strng{namehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{fullhash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{bibnamehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{authorbibnamehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{authornamehash}{d9015d9f08448ab0cb194bd964d7b44b}
      \strng{authorfullhash}{d9015d9f08448ab0cb194bd964d7b44b}
      \field{sortinit}{S}
      \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
      \field{labeldatesource}{}
      \field{labelnamesource}{author}
      \field{labeltitlesource}{title}
      \field{abstract}{Four methods for deriving partial atomic charges from the quantum chemical electrostatic potential (CHELP, CHELPG, Merz-Kollman, and RESP) have been compared and critically evaluated. It is shown that charges strongly depend on how and where the potential points are selected. Two alternative methods are suggested to avoid the arbitrariness in the point-selection schemes and van der Waals exclusion radii: CHELP-BOW, which also estimates the charges from the electrostatic potential, but with potential points that are Boltzmann-weighted after their occurrence in actual simulations using the energy function of the program in which the charges will be used, and CHELMO, which estimates the charges directly from the electrostatic multipole moments. Different criteria for the quality of the charges are discussed.}
      \field{annotation}{An \texttt{article} entry with \texttt{volume}, \texttt{number}, and \texttt{doi} fields. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}
      \field{indextitle}{Methods for deriving atomic charges}
      \field{journaltitle}{Journal of Computational Chemistry}
      \field{langid}{english}
      \field{langidopts}{variant=american}
      \field{number}{4}
      \field{title}{Comparison of methods for deriving atomic charges from the electrostatic potential and moments}
      \field{volume}{19}
      \field{year}{1998}
      \field{dateera}{ce}
      \field{pages}{377\bibrangedash 395}
      \range{pages}{19}
      \verb{doi}
      \verb 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P
      \endverb
    \endentry
  \enddatalist
\endrefsection
\endinput
plk commented 5 years ago

Please try 2.13 DEV from SF.

moewew commented 5 years ago

The MWE compiles fine with the dev version. But

\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}

\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson}

\printbibliography

\newrefsection
\defbibentryset{myset}{sigfridsson}
\cite{sigfridsson}

\printbibliography
\end{document}

now produces

Sigfridsson and Ryde 1998 Sigfridsson and Ryde 1998b

i.e. in the refsection with the set and sigfridsson, sigfridsson becomes Sigfridsson and Ryde 1998b (presumably because the set is Sigfridsson and Ryde 1998a), but the set itself can't really be cited, so it does not really make sense to give it an extradate.

plk commented 5 years ago

What output would you expect for this example? It seems quite a fringe case. The problem is that the members of a dynamic set have their members set to "dataonly" internally to prevent them influencing uniquename etc. generation but this breaks when the same entry is cited normally. Currently, I can get the following but even this looks very odd:

screenshot 2019-01-09 at 4 01 pm
moewew commented 5 years ago

I think I want the current behaviour back. I agree that this is a fringe case and I don't really think sets are a good idea for authoryear, but I think what 2.12 does is sensible.

Let's switch back to an example that works under both 2.12 and 2.13 dev.

\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}

\addbibresource{biblatex-examples.bib}
\begin{document}
\defbibentryset{myset}{sigfridsson,worman}
\cite{sigfridsson}

\printbibliography
\end{document}

2.13 dev gives

Sigfridsson and Ryde 1998b
References
Sigfridsson, Emma and Ulf Ryde (1998b). “Comparison of methods for deriving
atomic charges from the electrostatic potential and moments”. In: Journal
of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-
987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P; Worman, Nancy (2002).
The Cast of Character. Style in Greek Literature. Austin: University of Texas
Press.

Note that Sigfridsson and Ryde 1998a is nowhere to be seen. Not even in the .bbl!

2.12 gives

Sigfridsson and Ryde 1998
References
Sigfridsson, Emma and Ulf Ryde (1998). “Comparison of methods for deriving
atomic charges from the electrostatic potential and moments”. In: Journal
of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-
987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P; Worman, Nancy (2002).
The Cast of Character. Style in Greek Literature. Austin: University of Texas
Press.

which I find more reasonable.

plk commented 5 years ago

Ok, it's back to how it was. Unless there is some good reason to mess about with this, I say we leave it. Mixed sets and citations of set members in non-numeric/alpha styles are a thorny hedge of edge cases.

moewew commented 5 years ago

Oh sorry, I must have been unclear. If I read the commit correctly, it reverts the entire fix.

plk commented 5 years ago

Yes, naturally I see that fix is necessary. What about this output for the latest example? This looks more correct to me as the set, according to the docs, should be in the bibliography as it performs a \nocite equivalent:

screenshot 2019-01-09 at 4 51 pm
moewew commented 5 years ago

Better, but I would not expect a separate entry for Sigfridsson in the bibliography. In analogy to numeric sets, I would expect that citing sigfridsson cites the entire set here (since the entire set was already \nocited).

plk commented 5 years ago

Both examples should be ok now I think. This was actually quite hard to solve properly but it has brought to light some edge cases where there was bleed-over between refsections so it was worth fixing. DEV 2.13 binaries have been updated.

moewew commented 5 years ago

The results with the newest 2.13 dev look good indeed. Thank you very much.

hushidong commented 5 years ago

I am a windows user, i'd like to test it , is there a built binary of biber dev 2.13? or if i have to build it from the source code? if a perl env is needed?

moewew commented 5 years ago

You can find pre-built binaries for the development version of Biber at https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/development/binaries/

To test those, you will also have to run the development version of biblatex, which you can get at https://sourceforge.net/projects/biblatex/files/development/. Since biblatex is a big package you need to make sure that all files of the development version are found correctly. You can install it locally https://texfaq.org/FAQ-inst-wlcf (and many other questions), but for short tests I usually just unpack and flatten the folder structure so that all of the many files in the tex/latex/biblatex path of the archive live in my test directory. When I then run LaTeX in that working directory the version is picked up without "installing".

hushidong commented 5 years ago

ok, thanks very much

moewew commented 5 years ago

biblatex 3.13 and Biber 2.13 with a fix for the error are out now.