Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

my department has very specific expectations for formatting the Works Cited. Usually, most parts are to be delimited (by a period, a comma, a colon…). I got around most of the issues, but one remains.

For articles, it is to be this:

Last Name, First Name. Year. “Title of Article.” Title of Book. Ed. Name(s) of editor(s). Place: Publisher. Pages of article.

Note how the period between Title of Article and Title of Book is missing. It is to be inside the article title. I can easily insert that one into my bib-file, but I would then have to get rid of the one that author year-comp sets.

So far I fiddled around with \xpatch with hints from biblatex: No period after book and collection titles, but I can’t seem to get it to work. I also looked in standard.bbx for anything that looks like what I’m looking for but I cannot seem to find anything.

Any help would be greatly appreciated, thanks!

Please find attached my .tex-file:

\documentclass[a4paper,12pt]{article}
\usepackage{xpatch}
     \usepackage{csquotes}
     \usepackage{polyglossia}
\setmainlanguage[variant=american]{english}
     \usepackage{fontspec,xltxtra,xunicode}
     \usepackage[style=authoryear-ibid,backend=biber,doi=false,isbn=false,url=false,autolang=hyphen]{biblatex}
     \addbibresource{Merkliste.bib}
     \renewcommand*{\postnotedelim}{\addcolon\space}
     \renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
    \renewcommand*{\intitlepunct}{\addspace}
     \renewcommand{\bibpagespunct}{\ifentrytype{incollection}{\addperiod\addspace}{\addcolon\addspace}}

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit*{\addperiod\space}%
  \printtext%
}{}{}
%\xpatchbibdriver{article}{\newunit\usebibmacro{title}}{%
%\setunit{\addspace}\newunit%
%\usebibmacro{publisher+location+date}%
%}{}{}

\AtEveryBibitem{\clearlist{language}} % clears language
\AtEveryBibitem{\clearfield{note}}    % clears notes
\AtEveryBibitem{\clearfield{series}}   % clears Series
\AtEveryBibitem{\ifentrytype{book}{\clearfield{number}}{}}
\AtEveryBibitem{\ifentrytype{book}{\clearfield{pages}}{}}
\begin{document}
\nocite{*}. 
\printbibliography
\end{document}

Commented out is the part with which I am trying to achieve the correct references.

Here is one example of such a journal in my .bib:

![@article{conrick_challenges_2006,
    Author = {Conrick, Maeve},
    Date-Modified = {2014-08-03 13:33:04 +0000},
    Doi = {10.1386/ijfs.9.3.311_1},
    Issn = {13682679},
    Journal = {International Journal of Francophone Studies},
    Keywords = {{BILINGUALISM}, Bill 101, {CANADA}, {CONFEDERATION}, 1867, Education, {FEDERAL} government, francophone, French, {GOVERNMENT} policy, {HISTORY}, {LANGUAGE} \& languages, language policy, linguistic duality, minority language communities, official languages, Quebec},
    Month = dec,
    Number = {3},
    Pages = {311--328},
    Shorttitle = {The challenges of linguistic duality for francophone Canada},
    Title = {The challenges of linguistic duality for francophone Canada: contact, conflict and continuity},
    Url = {http://www.redi-bw.de/db/ebsco.php/search.ebscohost.com/login.aspx%3fdirect%3dtrue%26db%3daph%26AN%3d24405708%26site%3dehost-live},
    Urldate = {2014-07-26},
    Volume = {9},
    Year = {2006}}][1]
share|improve this question
1  
This can most likely be dealt with by using csquotes and using the american quoting style. It would be much easier if you could provide us with a proper MWE, preferably with an example .bib entry and your relevant modifications. –  moewe Aug 3 at 15:00
    
I edited the question. Sorry for the rather massive MWE, but I felt I had to get all my edits in. Thanks! –  Moritz Aug 3 at 15:10

1 Answer 1

I added a patch to the title bib macro to do that:

\documentclass[a4paper,12pt]{article}

\usepackage{filecontents}
\usepackage{xpatch}
     \usepackage{csquotes}%[style = american]
     \usepackage{polyglossia}
\setmainlanguage[variant=american]{english}
     \usepackage{fontspec,xltxtra,xunicode}
     \usepackage[style=authoryear-ibid,backend=biber,doi=false,isbn=false,url=false,autolang=hyphen]{biblatex}
     \renewcommand*{\postnotedelim}{\addcolon\space}
     \renewbibmacro{in:}{\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
    \renewcommand*{\intitlepunct}{\addspace}
     \renewcommand{\bibpagespunct}{\ifentrytype{incollection}{\addperiod\addspace}{\addcolon\addspace}}

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{pages}{#1}

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit*{\addperiod\space}%
  \printtext%
}{}{}

\AtEveryBibitem{\clearlist{language}} % clears language
\AtEveryBibitem{\clearfield{note}}    % clears notes
\AtEveryBibitem{\clearfield{series}}   % clears Series
\AtEveryBibitem{\ifentrytype{book}{\clearfield{number}}{}}
\AtEveryBibitem{\ifentrytype{book}{\clearfield{pages}}{}}

%%%%% Patch added
\xpatchbibmacro{title}{\printfield[titlecase]{subtitle}}%
{\printfield[titlecase]{subtitle}\ifentrytype{article}{\addperiod}{}}%
{}{}%

\begin{filecontents}{\jobname.bib}
    @article{conrick_challenges_2006,
    Author = {Conrick, Maeve},
    Date-Modified = {2014-08-03 13:33:04 +0000},
    Doi = {10.1386/ijfs.9.3.311_1},
    Issn = {13682679},
    Journal = {International Journal of Francophone Studies},
    Keywords = {{BILINGUALISM}, Bill 101, {CANADA}, {CONFEDERATION}, 1867, Education, {FEDERAL} government, francophone, French, {GOVERNMENT} policy, {HISTORY}, {LANGUAGE} \& languages, language policy, linguistic duality, minority language communities, official languages, Quebec},
    Month = dec,
    Number = {3},
    Pages = {311--328},
    Shorttitle = {The challenges of linguistic duality for francophone Canada},
    Title = {The challenges of linguistic duality for francophone Canada: contact, conflict and continuity},
    Url = {http://www.redi-bw.de/db/ebsco.php/search.ebscohost.com/login.aspx%3fdirect%3dtrue%26db%3daph%26AN%3d24405708%26site%3dehost-live},
    Urldate = {2014-07-26},
    Volume = {9},
    Year = {2006}}
\end{filecontents}

\addbibresource{\jobname.bib}

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

enter image description here

share|improve this answer
    
Thank you ever so much! –  Moritz Aug 3 at 15:30
    
I’m trying to work out what this does (i.e. the syntax). \printfield, I gather, ends the block? titlecase is for printing in title case, I suppose, but where does subtitle come from and what does it do? And what exactly has made the period vanish? Sorry to be a nuisance but I’d like to know :) –  Moritz Aug 3 at 15:37
    
I quite approve your curiosityThe presence of subtitle comes from the original title macro. I suppose it's there because some titles may have subtitles, and it says how to format them. The patch only adds a full stop before the closing quotes, so that biblatex doesn't add one after the quotes. –  Bernard Aug 3 at 15:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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