plk / biblatex

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

citereset=<**> should be applied also on starred version #481

Closed maieul closed 7 years ago

maieul commented 7 years ago

See this MWE

\documentclass{book}
\usepackage[citereset=section,citestyle=verbose-trad2]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{toto,
  Author={Toto},
  Title={Titre}
}
\end{filecontents}
\bibliography{\jobname.bib}
\begin{document}

\cite{toto}

\section{s}

\cite{toto}

\section*{s}

\cite{toto}

\end{document}

The \section* does not reset the abreviation.

plk commented 7 years ago

Hmm, the obvious fix for this doesn't work because "section*" isn't handled nicely by \pretocmd it seems - I suspect this is why it was never implemented - perhaps you can have a look at \blx@refpatch@sect and see if you can work something out?

maieul commented 7 years ago
\def\blx@refpatch@sect@iii{%
  \toggletrue{blx@tempa}%
  \docsvlist{%       order does matter:
    \H@old@sectm@m,% memoir+hyperref (what a mess...)
    \M@sect,%        memoir
    \H@old@sect,%    hyperref
    \NR@sect,%       nameref
    \scr@sect,%      koma-script 3.x
    \@sect}%         latex
  \iftoggle{blx@tempa}
    {\blx@err@patch{\string\@sect}}
    {}%
  \let\do\noexpand}

should become


\def\blx@refpatch@sect@iii{%
  \toggletrue{blx@tempa}%
  \docsvlist{%       order does matter:
    \H@old@sectm@m,% memoir+hyperref (what a mess...)
    \M@sect,%        memoir
    \H@old@sect,%    hyperref
    \NR@sect,%       nameref
    \scr@sect,%      koma-script 3.x
    \@startsection}%         latex
  \iftoggle{blx@tempa}
    {\blx@err@patch{\string\@sect}}
    {}%
  \let\do\noexpand}

And

\def\blx@refpatch@chapter#1{%
  \ifundef\chapter
    {\blx@err@nodocdiv{chapter}}
    {\pretocmd\@makechapterhead{#1}
       {}
       {\blx@err@patch{\string\@makechapterhead}}}}

Should become

\def\blx@refpatch@chapter#1{%
  \ifundef\chapter
    {\blx@err@nodocdiv{chapter}}
    {\pretocmd\@makechapterhead{#1}
       {}
       {\blx@err@patch{\string\@makechapterhead}}
     \pretocmd\@makeschapterhead{#1}
       {}
       {\blx@err@patch{\string\@makeschapterhead}}
    }
}
plk commented 7 years ago

Done in 3.7 dev version, thanks.