1

I want articles to appear as

Kowalski Jan, "Reforma reformatorska", Przeglad Historyczny 1 (1953), pp. 101-152.

Inbook and incollection must appears as

Kwiatkowska Anna, "Liczenie dla dzieci" [in:] Studia matematyczne,Warszawa: DiG, 2014, pp. 247-272.

Please pay attention on delimiters in both cases (comma before journal title for articles, and no comma before and after "in" for inbooks).

My code looks like:

\documentclass{article}

\usepackage[style=verbose-trad1]{biblatex}

%comma instead of dot as default delimiter
\renewcommand*{\newunitpunct}{\addcomma\space}

%no comma between first name and last name
\renewcommand*{\revsdnamepunct}{}

\renewbibmacro*{in:}{%
  \ifentrytype{article}
    {}
    {\setunit{\space}%
       \printtext{%
       %\mkbibbrackets{\bibstring{in}\addcolon}}}}
       \bibstring{in}\addcolon}}}

\begin{filecontents}{\jobname.bib}
    @article{a1,
          author        ={Kowalski, Jan},
          title         ={Reforma reformatorska},
          journaltitle  ={Przeglad Historyczny},
          date          ={1953},
          number        ={1},
          pages         ={101-152},
    }
@inbook{b1,
  author        ={Kwiatkowska, Anna},
  location      ={Warszawa},
  publisher     ={DiG},
  booktitle     ={Studia matematyczne},
  title         ={Liczenie dla dzieci},
  pages         ={247-272},
  date          ={2014},
}
\end{filecontents}

\addbibresource{\jobname.bib}


\begin{document}
a\footcite{a1}

b\footcite{b1}

\printbibliography

\end{document}

Everything would be fine if I didn't need the parentheses. But if I use \mkbibbrackets{\bibstring{in}\addcolon} instead of \bibstring{in}\addcolon there is redundant comma after [in:]. How can I remove that comma after [in:] and preserve everything else?

Result with brackets and redundant comma:

with_brackets

Result without comma but also without brackets: no_brackets

2

In your solution of in: you were just missing a way to make sure that the punctuation printed after the "[in:]" is always a space. That could be done with \printunit{\addspace}. Note that \printunit is also used in the current standard definition of in: (ll. 2927-2929 of biblatex.def), your redefinition seems to have been based on an older version of in:.

Based on the new code and following the principle that one should never have a bare \mkbibbrackets in a bibmacro I suggest

\documentclass{article}

\usepackage[style=verbose-trad1]{biblatex}

\renewcommand*{\newunitpunct}{\addcomma\space}

\renewcommand*{\revsdnamepunct}{}

\renewbibmacro*{in:}{%
  \ifentrytype{article}
    {}
    {\setunit{\addspace}%
     \printtext[brackets]{%
       \bibstring{in}%
       \addcolon}%
     \printunit{\addspace}}}

\begin{filecontents}{\jobname.bib}
@article{a1,
  author        = {Kowalski, Jan},
  title         = {Reforma reformatorska},
  journaltitle  = {Przeglad Historyczny},
  date          = {1953},
  number        = {1},
  pages         = {101-152},
}
@inbook{b1,
  author        = {Kwiatkowska, Anna},
  location      = {Warszawa},
  publisher     = {DiG},
  booktitle     = {Studia matematyczne},
  title         = {Liczenie dla dzieci},
  pages         = {247-272},
  date          = {2014},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
Lorem \autocite{a1}

ipsum \autocite{b1}

\printbibliography
\end{document}

Kowalski Jan, “Reforma reformatorska”, Przeglad Historyczny 1 (1953), pp. 101–152.
Kwiatkowska Anna, “Liczenie dla dzieci” [in:] Studia matematyczne, Warszawa: DiG, 2014, pp. 247–272.

1
  • You are absolutely reliable. Thanks!
    – andc
    Sep 9 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.