Skip to content

Commit

Permalink
Extend style options to more scopes (#875)
Browse files Browse the repository at this point in the history
For now only `dashed` and the citation style options `citepages`,
`ibidpage`, `strict`, `pageref` stay global-only as they rely on
tracking features where it is not entirely clear what the expected
outcome would be if they were controlled on a per-entry basis.
  • Loading branch information
moewew committed Mar 1, 2019
1 parent 1d35a96 commit 92c8cde
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 25 deletions.
5 changes: 5 additions & 0 deletions doc/latex/biblatex/CHANGES.md
Expand Up @@ -27,6 +27,11 @@
`loccittracker`, `opcittracker`, `singletitle`, `skipbib`, `skipbiblist`,
`skipbiblab` `terseinits`, `uniquelist`, `uniquename`, `uniquetitle`,
`uniquebaretitle`, `uniquework`, `uniqueprimaryauthor`).
- Furthermore, the standard style options `doi`, `eprint`, `isbn`, `url`,
`related` are now available also on a per-type and per-entry level.
The same holds for `mergedate`, `subentry` and the options of `reading.bbx`.
This change has the potential to clash with custom styles that already define
the standard options at these scopes.
- Add `\ifvolcite` test to check if the current citation is in a `\volcite`
context.
- Add the special fields `volcitevolume` and `volcitepages` for finer control
Expand Down
23 changes: 12 additions & 11 deletions doc/latex/biblatex/biblatex.tex
Expand Up @@ -2510,7 +2510,7 @@ \subsubsection{Preamble Options}
\paragraph{Style-specific}
\label{use:opt:pre:bbx}

The following options are provided by all standard bibliography styles (as opposed to the core package). Technically, they are preamble options like those in \secref{use:opt:pre:gen}.
The following options are provided by all standard bibliography styles (as opposed to the core package). The options are available as preamble options like those in \secref{use:opt:pre:gen} and at a per-type and per-entry scope.

\begin{optionlist}

Expand All @@ -2536,7 +2536,7 @@ \subsubsection{Preamble Options}

\end{optionlist}

\subparagraph{\texttt{alphabetic}/\texttt{numeric}} Additionally, styles of the \texttt{alphabetic} and \texttt{numeric} family support the \opt{subentry} option.
\subparagraph{\texttt{alphabetic}/\texttt{numeric}} Additionally, styles of the \texttt{alphabetic} and \texttt{numeric} family support the \opt{subentry} option in global, per-type and per-entry scope.

\begin{optionlist}

Expand All @@ -2548,7 +2548,7 @@ \subsubsection{Preamble Options}

\end{optionlist}

\subparagraph{\texttt{authortitle}/\texttt{authoryear}} All bibliography styles of the \texttt{authoryear} and \texttt{authortitle} family as well as all bibliography styles of the \texttt{verbose} family---whose bibliography styles are based on \texttt{authortitle}---support the option \opt{dashed}.
\subparagraph{\texttt{authortitle}/\texttt{authoryear}} All bibliography styles of the \texttt{authoryear} and \texttt{authortitle} family as well as all bibliography styles of the \texttt{verbose} family---whose bibliography styles are based on \texttt{authortitle}---support the option \opt{dashed} in global scope.

\begin{optionlist}

Expand All @@ -2558,7 +2558,7 @@ \subsubsection{Preamble Options}

\end{optionlist}

\subparagraph{\texttt{authoryear}} Bibliography styles of the \texttt{authoryear} family provide the option \opt{mergedate}
\subparagraph{\texttt{authoryear}} Bibliography styles of the \texttt{authoryear} family provide the option \opt{mergedate} in global, per-type and per-entry scope.

\begin{optionlist}

Expand All @@ -2578,7 +2578,7 @@ \subsubsection{Preamble Options}
More in-depth examples of this option can be found in the style examples.
\end{optionlist}

\subparagraph{<ibid> styles} Citation styles with <ibid.> function, namely \texttt{authortitle-ibid}, \texttt{author\allowbreakhere title-icomp}, \texttt{author\allowbreakhere year-ibid}, \texttt{authoryear-icomp}, \texttt{ver\allowbreakhere bose-ibid}, \texttt{verbose-inote}, \texttt{verbose-trad1}, \texttt{verbose-trad2} and \texttt{verbose-trad3} provide the \opt{ibidpage} option.
\subparagraph{<ibid> styles} Citation styles with <ibid.> function, namely \texttt{authortitle-ibid}, \texttt{author\allowbreakhere title-icomp}, \texttt{author\allowbreakhere year-ibid}, \texttt{authoryear-icomp}, \texttt{ver\allowbreakhere bose-ibid}, \texttt{verbose-inote}, \texttt{verbose-trad1}, \texttt{verbose-trad2} and \texttt{verbose-trad3} provide the global \opt{ibidpage} option.

\begin{optionlist}

Expand All @@ -2588,7 +2588,7 @@ \subsubsection{Preamble Options}

\end{optionlist}

\subparagraph{\texttt{verbose}} All citation styles of the \texttt{verbose} family provide the option \opt{citepages}.
\subparagraph{\texttt{verbose}} All citation styles of the \texttt{verbose} family provide the global option \opt{citepages}.

\begin{optionlist}

Expand All @@ -2611,7 +2611,7 @@ \subsubsection{Preamble Options}

\end{optionlist}

\subparagraph{\texttt{verbose-trad}} The citation styles of the \texttt{verbose-trad} family support the option \opt{strict}.
\subparagraph{\texttt{verbose-trad}} The citation styles of the \texttt{verbose-trad} family support the global option \opt{strict}.

\begin{optionlist}

Expand Down Expand Up @@ -13827,15 +13827,15 @@ \section{Option Scope}
dateuncertain &\+&\+&\_&\_&\_&\_&\_\\
datezeros &\+&\+&\_&\_&\_&\_&\_\\
defernumbers &\+&\+&\_&\_&\_&\_&\_\\
doi &\+&\+&\_&\_&\_&\_&\_\\ % style
eprint &\+&\+&\_&\_&\_&\_&\_\\ % style
doi &\+&\+&\_&\+&\+&\_&\_\\ % style
eprint &\+&\+&\_&\+&\+&\_&\_\\ % style
$<$namepart$>$inits &\+&\+&\_&\+&\+&\+&\+\\
gregorianstart &\+&\+&\_&\_&\_&\_&\_\\
hyperref &\+&\+&\_&\_&\_&\_&\_\\
ibidtracker &\+&\+&\_&\+&\+&\_&\_\\
idemtracker &\+&\+&\_&\+&\+&\_&\_\\
indexing &\+&\+&\_&\+&\+&\_&\_\\
isbn &\+&\+&\_&\_&\_&\_&\_\\ % style
isbn &\+&\+&\_&\+&\+&\_&\_\\ % style
julian &\+&\+&\_&\_&\_&\_&\_\\
labelalpha &\+&\+&\_&\+&\+&\_&\_\\
labelalphanametemplatename &\_&\_&\+&\_&\+&\+&\+\\
Expand Down Expand Up @@ -13882,6 +13882,7 @@ \section{Option Scope}
punctfont &\+&\+&\_&\_&\_&\_&\_\\
refsection &\+&\+&\_&\_&\_&\_&\_\\
refsegment &\+&\+&\_&\_&\_&\_&\_\\
related &\+&\+&\_&\+&\+&\_&\_\\ % style
safeinputenc &\+&\+&\_&\_&\_&\_&\_\\
seconds &\+&\+&\_&\_&\_&\_&\_\\
singletitle &\+&\+&\_&\+&\+&\_&\_\\
Expand All @@ -13907,7 +13908,7 @@ \section{Option Scope}
uniquebaretitle &\+&\+&\_&\+&\+&\_&\_\\
uniquework &\+&\+&\_&\+&\+&\_&\_\\
uniqueprimaryauthor &\+&\+&\_&\+&\+&\_&\_\\
url &\+&\+&\_&\_&\_&\_&\_\\
url &\+&\+&\_&\+&\+&\_&\_\\ % style
useprefix &\+&\+&\_&\+&\+&\+&\+\\
use$<$name$>$ &\+&\+&\_&\+&\+&\_&\_\\
\end{longtable}
Expand Down
2 changes: 1 addition & 1 deletion tex/latex/biblatex/bbx/alphabetic.bbx
Expand Up @@ -6,7 +6,7 @@

\providebool{bbx:subentry}

\DeclareBibliographyOption[boolean]{subentry}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{subentry}[true]{%
\setbool{bbx:subentry}{#1}}

\DeclareNameAlias{author}{default}
Expand Down
2 changes: 1 addition & 1 deletion tex/latex/biblatex/bbx/authoryear.bbx
Expand Up @@ -9,7 +9,7 @@
\renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}}
{\renewbibmacro*{bbx:savehash}{}}}

\DeclareBibliographyOption[boolean]{mergedate}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{mergedate}[true]{%
\ifcsdef{bbx@opt@mergedate@#1}
{\csuse{bbx@opt@mergedate@#1}}
{\PackageError{biblatex}
Expand Down
2 changes: 1 addition & 1 deletion tex/latex/biblatex/bbx/numeric.bbx
Expand Up @@ -6,7 +6,7 @@

\providebool{bbx:subentry}

\DeclareBibliographyOption[boolean]{subentry}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{subentry}[true]{%
\setbool{bbx:subentry}{#1}}

\DeclareNameAlias{author}{default}
Expand Down
12 changes: 6 additions & 6 deletions tex/latex/biblatex/bbx/reading.bbx
Expand Up @@ -102,21 +102,21 @@
\newbool{bbx:library}
\newbool{bbx:file}

\DeclareBibliographyOption[boolean]{entryhead}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{entryhead}[true]{%
\ifcsdef{bbx@item@#1}
{\letcs\bbx@item{bbx@item@#1}}
{\PackageError{biblatex}
{Invalid option 'header=#1'}
{Valid values: header=true, false, full, name.}}}
\DeclareBibliographyOption[boolean]{entrykey}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{entrykey}[true]{%
\setbool{bbx:entrykey}{#1}}
\DeclareBibliographyOption[boolean]{annotation}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{annotation}[true]{%
\setbool{bbx:annotation}{#1}}
\DeclareBibliographyOption[boolean]{abstract}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{abstract}[true]{%
\setbool{bbx:abstract}{#1}}
\DeclareBibliographyOption[boolean]{library}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{library}[true]{%
\setbool{bbx:library}{#1}}
\DeclareBibliographyOption[boolean]{file}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{file}[true]{%
\setbool{bbx:file}{#1}}

\ExecuteBibliographyOptions{loadfiles,entryhead,entrykey,annotation,abstract,library,file}
Expand Down
10 changes: 5 additions & 5 deletions tex/latex/biblatex/bbx/standard.bbx
Expand Up @@ -7,15 +7,15 @@
\newtoggle{bbx:eprint}
\newtoggle{bbx:related}

\DeclareBibliographyOption[boolean]{isbn}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{isbn}[true]{%
\settoggle{bbx:isbn}{#1}}
\DeclareBibliographyOption[boolean]{url}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{url}[true]{%
\settoggle{bbx:url}{#1}}
\DeclareBibliographyOption[boolean]{doi}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{doi}[true]{%
\settoggle{bbx:doi}{#1}}
\DeclareBibliographyOption[boolean]{eprint}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{eprint}[true]{%
\settoggle{bbx:eprint}{#1}}
\DeclareBibliographyOption[boolean]{related}[true]{%
\DeclareBiblatexOption{global,type,entry}[boolean]{related}[true]{%
\settoggle{bbx:related}{#1}}

\ExecuteBibliographyOptions{isbn,url,doi,eprint,related}
Expand Down

0 comments on commit 92c8cde

Please sign in to comment.