Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make location a key list (core of #1390) #1403

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, origlocation, and venue fields.

# RELEASE NOTES FOR VERSION 3.20
- Added new option settings `minyearinit` and `minyearfull` for
Expand Down
23 changes: 13 additions & 10 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 @@ -1212,9 +1212,10 @@ \subsubsection{Data Fields}

The access date of the address specified in the \bibfield{url} field. See also \secref{bib:use:dat}.

\fielditem{venue}{literal}
\fielditem{venue}{key}

The location of a conference, a symposium, or some other event in \bibtype{proceedings} and \bibtype{inproceedings} entries. This field may also be useful for the custom types listed in \secref{bib:typ:ctm}. Note that the \bibfield{location} list holds the place of publication. It therefore corresponds to the \bibfield{publisher} and \bibfield{institution} lists. The location of the event is given in the \bibfield{venue} field. See also \bibfield{eventdate} and \bibfield{eventtitle}.
You can also use bibstrings in this field if you want to have the venue name translated to the language of the bibliography.

\fielditem{version}{literal}

Expand Down Expand Up @@ -1451,7 +1452,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 +1539,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 +15083,8 @@ \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.
\item Make \bibfield{venue} a key field 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
3 changes: 2 additions & 1 deletion tex/latex/biblatex/biblatex.def
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@
\DeclareFieldFormat{type}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{venue}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
\DeclareFieldFormat{version}{\bibstring{version}~#1}
\DeclareFieldFormat{volume}{\bibstring{volume}~#1}% volume of a book
\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal
Expand Down Expand Up @@ -703,7 +704,7 @@

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

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