Skip to content

Commit

Permalink
Make location a key list (core of plk#1390)
Browse files Browse the repository at this point in the history
No bibkeys provided yet.
  • Loading branch information
jspitz committed Dec 7, 2024
1 parent cdd65b0 commit d6e0842
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions doc/latex/biblatex/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
depending on the `citepagerange` value.
- Use `\mkautorange` in standard styles.
- Fix `\DeclareHyphenationExceptions` with polyglossia and language variants.
- Support bibstrings in location field.

# RELEASE NOTES FOR VERSION 3.20
- Added new option settings `minyearinit` and `minyearfull` for
Expand Down
19 changes: 10 additions & 9 deletions doc/latex/biblatex/biblatex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ \subsubsection{Regular Types}

\typeitem{patent}

A patent or patent request. The number or record token is given in the \bibfield{number} field. Use the \bibfield{type} field to specify the type and the \bibfield{location} field to indicate the scope of the patent, if different from the scope implied by the \bibfield{type}. Note that the \bibfield{location} field is treated as a key list with this entry type, see \secref{bib:fld:typ} for details.
A patent or patent request. The number or record token is given in the \bibfield{number} field. Use the \bibfield{type} field to specify the type and the \bibfield{location} field to indicate the scope of the patent, if different from the scope implied by the \bibfield{type}.

\reqitem{author, title, number, year/date}
\optitem{holder, subtitle, titleaddon, type, version, location, note, month, addendum, pubstate, doi, eprint, eprintclass, eprinttype, url, urldate}
Expand Down Expand Up @@ -788,9 +788,9 @@ \subsubsection{Data Types}

\begin{description}

\item[Literal lists] in the strict sense are handled as described above. The individual items are simply printed as is. Typical examples of such literal lists are \bibfield{publisher} and \bibfield{location}.
\item[Literal lists] in the strict sense are handled as described above. The individual items are simply printed as is. A typical examples of such a literal lists is \bibfield{publisher}.

\item[Key lists] are a variant of literal lists which may hold printable data or localisation keys. For each item in the list, styles should perform a test to determine whether it is a known localisation key (the localisation keys defined by default are listed in \secref{aut:lng:key}). If so, the localised string should be printed. If not, the item should be printed as is. The standard styles are set up to exhibit this behaviour for all key lists listed below. New key lists do not automatically perform this test, it has to be implemented explicitly via the list format. A typical example of a key list is \bibfield{language}.
\item[Key lists] are a variant of literal lists which may hold printable data or localisation keys. For each item in the list, styles should perform a test to determine whether it is a known localisation key (the localisation keys defined by default are listed in \secref{aut:lng:key}). If so, the localised string should be printed. If not, the item should be printed as is. The standard styles are set up to exhibit this behaviour for all key lists listed below. New key lists do not automatically perform this test, it has to be implemented explicitly via the list format. Typical example of a key list are \bibfield{language} and \bibfield{location}.

\end{description}
\end{description}
Expand Down Expand Up @@ -1062,9 +1062,9 @@ \subsubsection{Data Fields}

This field may be useful to record information such as a library name and a call number. This may be printed by a special bibliography style if desired. Not used by the standard bibliography styles.

\listitem{location}{literal}
\listitem{location}{key}

The place(s) of publication, \ie the location of the \bibfield{publisher} or \bibfield{institution}, depending on the entry type. Traditional \bibtex uses the field name \bibfield{address}, which is supported as an alias. See also \secref{bib:fld:als, bib:use:and}. With \bibtype{patent} entries, this list indicates the scope of a patent. This list may also be useful for the custom types listed in \secref{bib:typ:ctm}.
The place(s) of publication, \ie the location of the \bibfield{publisher} or \bibfield{institution}, depending on the entry type. Locations may be specified literally or as localisation keys. Traditional \bibtex uses the field name \bibfield{address}, which is supported as an alias. See also \secref{bib:fld:als, bib:use:and}. With \bibtype{patent} entries, this list indicates the scope of a patent. This list may also be useful for the custom types listed in \secref{bib:typ:ctm}.

\fielditem{mainsubtitle}{literal}

Expand Down Expand Up @@ -1112,7 +1112,7 @@ \subsubsection{Data Fields}

If the work is a translation, the language(s) of the original work. See also \bibfield{language}.

\listitem{origlocation}{literal}
\listitem{origlocation}{key}

If the work is a translation, a reprint, or something similar, the \bibfield{location} of the original edition. Not used by the standard bibliography styles. See also \bibfield{location} and \secref{bib:use:and}.

Expand Down Expand Up @@ -1451,7 +1451,7 @@ \subsubsection{Field Aliases}

\begin{fieldlist}

\listitem{address}{literal}
\listitem{address}{key}

An alias for \bibfield{location}, provided for \bibtex compatibility. Traditional \bibtex uses the slightly misleading field name \bibfield{address} for the place of publication, \ie the location of the publisher, while \biblatex uses the generic field name \bibfield{location}. See \secref{bib:fld:dat,bib:use:and}.

Expand Down Expand Up @@ -1538,10 +1538,10 @@ \subsubsection{Corporate Authors and Editors}
%
Users switching from the \sty{jurabib} package to \biblatex should note that the \bibfield{shortauthor} field is treated as a name list.

\subsubsection{Literal Lists}
\subsubsection{Literal and Key Lists}
\label{bib:use:and}

The fields \bibfield{institution}, \bibfield{organization}, \bibfield{publisher}, and \bibfield{location} are literal lists in terms of \secref{bib:fld}. This also applies to \bibfield{origlocation}, \bibfield{origpublisher} and to the field aliases \bibfield{address} and \bibfield{school}. All of these fields may contain a list of items separated by the keyword <|and|>. If they contain a literal <|and|>, it must be wrapped in braces.
The fields \bibfield{institution}, \bibfield{organization}, \bibfield{publisher}, and \bibfield{location} are literal or key lists in terms of \secref{bib:fld}. This also applies to \bibfield{origlocation}, \bibfield{origpublisher} and to the field aliases \bibfield{address} and \bibfield{school}. All of these fields may contain a list of items separated by the keyword <|and|>. If they contain a literal <|and|>, it must be wrapped in braces.

\begin{lstlisting}[style=bibtex]{}
publisher = {William Reid <<{and}>> Company},
Expand Down Expand Up @@ -15082,6 +15082,7 @@ \section{Revision History}
\item Added \cmd{mkautorange} and \cmd{mkautorange*} which forwards to \cmd{mknormrange}, \cmd{mkcomprange} or \cmd{mkseqrange} (or their starred counterpart, respectively) depending on the \opt{citepagerange} value\see{aut:aux:msc}
\item Use \cmd{mkautorange} in standard styles.
\item Fix \cmd{DeclareHyphenationExceptions} with \sty{polyglossia} and language variants.
\item Make \bibfield{location}, \bibfield{origlocation} and their aliases key lists to support bibkeys.
\end{release}
\begin{release}{3.20}{2024-03-22}
\item Added new \opt{uniquename} options \see{use:opt:pre:int}
Expand Down
2 changes: 1 addition & 1 deletion tex/latex/biblatex/biblatex.def
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@

\DeclareListFormat{location}{%
\usebibmacro{list:delim}{#1}%
#1\isdot
\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}%
\usebibmacro{list:andothers}}

\DeclareListFormat[patent]{location}{%
Expand Down

0 comments on commit d6e0842

Please sign in to comment.