2

biblatex-philosophy (modern) fails to make proper line breaks when there is no author/editor/translator, etc., to declare.

Here is the MWE:

\documentclass[12pt,a4paper]{article}  
\usepackage{filecontents}  
\begin{filecontents}{test2.bib}  

@online{guit:sito,  
    Date = {2012},  
    Date-Added = {2012-04-21 16:52:51 +0200},  
    Date-Modified = {2013-03-15 16:40:18 +0100},  
    Hyphenation = {italian},  
    Keywords = {esempio, web},  
    Title = {GuIT. Gruppo degli Utilizzatori Italiani di \TeX},  
    Url = {http://www.guitex.org},  
    Urldate = {2012-01-15},  
    Annote = {A Web site},  
    Bdsk-Url-1 = {http://www.guitex.org}  
}  

@periodical{jcg,  
  title        = {Computers and Graphics},  
  year         = 2011,  
  issuetitle   = {Semantic {3D} Media and Content},  
  volume       = 35,  
  number       = 4,  
  issn         = {0097-8493},  
  annotation   = {This is a \texttt{periodical} entry with an \texttt{issn}
                  field.},  
}  

\end{filecontents}  

\usepackage[backend=biber, style=philosophy-modern,   language=american,publocformat=loccolonpub]{biblatex}  
\addbibresource{test2.bib}  

\begin{document}  
\nocite{*}  
\printbibliography  

\end{document}

enter image description here

Using @moewe's modified macros, I make tests, and a new bug has seemingly appeared; here is a spurious line break after the title. Here is the MWE:

\documentclass[12pt,a4paper]{article}  
\usepackage{filecontents}  

\begin{filecontents}{test2.bib}  
@online{ctan,  
    Date = {2006},  
    Date-Added = {2011-06-02 17:33:32 +0200},  
    Date-Modified = {2013-03-15 16:35:26 +0100},  
    Hyphenation = {american},  
    Keywords = {esempio, web},  
    Label = {CTAN},  
    Subtitle = {The Comprehensive TeX Archive Network},  
    Title = {CTAN},  
    Url = {http://www.ctan.org},  
    Urldate = {2006-10-01},  
    Annote = {Note the \texttt{urldate} field and the \texttt{label} field, used for the citations.},  
    Bdsk-Url-1 = {http://www.ctan.org}}  
\end{filecontents}  

\usepackage[backend=biber, style=philosophy-modern, language=american,publocformat=loccolonpub]{biblatex}  
\addbibresource{test2.bib}  

\NewBibliographyString{origpubbare}  
\DefineBibliographyStrings{english}{origpubbare  = {orig\adddotspace pub\adddotspace}}  

\makeatletter  
\newbibmacro*{transorigstring}{%  
  \iffieldundef{reprinttitle}%  
  {\printtext{\ifdefstring{\bbx@origfields}{origed}  
      {\bibstring{origpubbare}}%  
      {\bibstring{translationas}}}\nopunct}%  
  {\printtext{\bibstring{reprint}}}\nopunct}  
\makeatother  

\makeatletter  
\renewbibmacro*{author}{%  
  \ifboolexpr{%  
    test \ifuseauthor  
    and  
    not test {\ifnameundef{author}}  
  }%  
    {\usebibmacro{bbx:dashcheck}%  
       {}%  
       {\usebibmacro{bbx:savehash}%  
        \printnames{author}%  
        \iffieldundef{nameaddon}  
          {}%  
          {\setunit{\addspace}%  
           \printtext[brackets]{\printfield{nameaddon}}}%  
        \iffieldundef{authortype}%  
          {}%  
          {\setunit{\addcomma\space}}%  
        \usebibmacro{authorstrg}}}%  
    {\global\undef\bbx@lasthash%  
     \usebibmacro{labeltitle}%  
     \setunit*{\addspace}}%  
  \postsep  
  \usebibmacro{date+extrayear}}%  

\renewbibmacro*{bbx:editor}[1]{%  
 \ifboolexpr{%  
    test \ifuseeditor  
    and  
    not test {\ifnameundef{editor}}  
  }%  
    {\usebibmacro{bbx:dashcheck}%  
       {}%  
       {\printnames{editor}%  
        \postsep%ADD  
        \usebibmacro{bbx:savehash}}}%  
    {\global\undef\bbx@lasthash%  
     \usebibmacro{labeltitle}%  
     \postsep}%  
  \usebibmacro{date+extrayear}%  
  \ifboolexpr{%  
    (test \ifuseeditor  
     and  
     not test {\ifnameundef{editor}})  
    and test {\iffieldundef{label}}  
  }%  
    {\usebibmacro{#1}%  
     \clearname{editor}%  
     \printtext{\addcomma\space}}  
    {\blx@initunit}}%  

\renewbibmacro*{bbx:translator}[1]{%  
 \ifboolexpr{%  
    test \ifusetranslator  
    and  
    not test {\ifnameundef{translator}}  
  }%  
    {\usebibmacro{bbx:dashcheck}%  
       {}%  
       {\printnames{translator}%  
        \postsep%ADD  
        \usebibmacro{bbx:savehash}}}%  
    {\global\undef\bbx@lasthash%  
     \usebibmacro{labeltitle}%  
     \postsep}%  
  \usebibmacro{date+extrayear}%  
  \ifboolexpr{%  
    (test \ifusetranslator  
     and  
     not test {\ifnameundef{translator}})  
    and test {\iffieldundef{label}}  
  }%  
    {\usebibmacro{#1}%  
     \clearname{translator}%  
     \printtext{\addcomma\space}}  
    {\blx@initunit}}%  
\makeatother  

\begin{document}  
\nocite{*}  
\printbibliography  

\end{document}  

enter image description here

1 Answer 1

1

This has been fixed in newer versions of biblatex-philosophy.

Whether this is intentional or not, I cannot say, but we can certainly make sure to get a line break after the title as well.

We only need to add a \postsep after \usebibmacro{labeltitle} in the author, editor:bbx and bbx:translator macros (for the latter see biblatex philosophy-modern: a bug?)

\makeatletter  
\renewbibmacro*{labeltitle}{%
  \iffieldundef{label}%
    {\iffieldundef{shorttitle}%
       {\printfield{title}\clearfield{title}}%
       {\printfield[title]{shorttitle}}}%
    {\printtext{\printfield{label}}}}

\renewbibmacro*{author}{%  
  \ifboolexpr{%  
    test \ifuseauthor  
    and  
    not test {\ifnameundef{author}}  
  }%  
    {\usebibmacro{bbx:dashcheck}%  
       {}%  
       {\usebibmacro{bbx:savehash}%  
        \printnames{author}%  
        \iffieldundef{nameaddon}  
          {}%  
          {\setunit{\addspace}%  
           \printtext[brackets]{\printfield{nameaddon}}}%  
        \iffieldundef{authortype}%  
          {}%  
          {\setunit{\addcomma\space}}%  
        \usebibmacro{authorstrg}}}%  
    {\global\undef\bbx@lasthash%  
     \usebibmacro{labeltitle}}%  
  \postsep  
  \usebibmacro{date+extrayear}}%  

\renewbibmacro*{bbx:editor}[1]{%  
 \ifboolexpr{%  
    test \ifuseeditor  
    and  
    not test {\ifnameundef{editor}}  
  }%  
    {\usebibmacro{bbx:dashcheck}%  
       {}%  
       {\printnames{editor}%  
        \postsep%ADD  
        \usebibmacro{bbx:savehash}}}%  
    {\global\undef\bbx@lasthash%  
     \usebibmacro{labeltitle}%  
     \postsep}%  
  \usebibmacro{date+extrayear}%  
  \ifboolexpr{%  
    (test \ifuseeditor  
     and  
     not test {\ifnameundef{editor}})  
    and test {\iffieldundef{label}}  
  }%  
    {\usebibmacro{#1}%  
     \clearname{editor}%  
     \printtext{\addcomma\space}}  
    {\blx@initunit}}%  

\renewbibmacro*{bbx:translator}[1]{%  
 \ifboolexpr{%  
    test \ifusetranslator  
    and  
    not test {\ifnameundef{translator}}  
  }%  
    {\usebibmacro{bbx:dashcheck}%  
       {}%  
       {\printnames{translator}%  
        \postsep%ADD  
        \usebibmacro{bbx:savehash}}}%  
    {\global\undef\bbx@lasthash%  
     \usebibmacro{labeltitle}%
     \postsep}%  
  \usebibmacro{date+extrayear}%  
  \ifboolexpr{%  
    (test \ifusetranslator  
     and  
     not test {\ifnameundef{translator}})  
    and test {\iffieldundef{label}}  
  }%  
    {\usebibmacro{#1}%  
     \clearname{translator}%  
     \printtext{\addcomma\space}}  
    {\blx@initunit}}%  
\makeatother  

In order to make sure that we get no spurious 'ed.'/'trans.' we also modify the last \if... a bit and add \blx@initunit to clean up the punctuation tracker.

4
  • I think a new bug has been introduced, so I have edited my question.
    – ashinpan
    Mar 19, 2017 at 13:49
  • @ashinpan I have modified the code once again. Please check it now.
    – moewe
    Mar 19, 2017 at 14:06
  • I think it is working now. Thanks a lot! I really appreciate your help.
    – ashinpan
    Mar 19, 2017 at 14:57
  • I beg your pardon; I am still new to the ways of Stackexchange; I will rectify accordingly.
    – ashinpan
    Mar 19, 2017 at 16:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .