9

I have seen that in between texlive 2011 and 2012, there were a lot of new styles developed. But I still have to see a style intended for the Council of Science Editors Citation Style. I'm definitely useless with hardcore tex codes but I definitely tried to read and understand the biblatex manual and the source files for the biblatex style files but I could not start to comprehend where to start so I would be very thankful if someone out there tries to develop a CSE style, specifically the Name-Year Citation Sequence?

Also, does someone out there have an easy work-around without having to develop a CSE style?

Update: December 24, 2012

What I am trying to achieve can be seen in the following external sites:

hpesoj626
  • 17,282
  • Never heard of them. Could you provide a link and examples of the style? – Joseph Wright Jul 22 '12 at 11:01
  • 2
    Have a look at http://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles – lockstep Jul 22 '12 at 11:28
  • 1
    The following links can give you some ideas of the style. The first is the official website of the group. www.councilscienceeditors.org/; http://wvlc.uwaterloo.ca/biology475/CSEStyle%20Manual.pdf; http://www.pc.maricopa.edu/departments/library/guides/cse_examples.pdf; http://www.mcgill.ca/files/library/CSE-name-year-citation-style-guide.pdf. There is a bibtex style called cbe in texlive but it does not come that close to the descriptions in cse. – hpesoj626 Jul 23 '12 at 03:34
  • @Joseph Wright. Ops. I have pasted the wrong url. Here is the one I was talking about: http://www.oxfordjournals.org/our_journals/molbev/for_authors/msprep_submission.html – hpesoj626 Jul 24 '12 at 05:55
  • A quick look at the style makes me think the 'author-date' style of biblatex-chicago would be a good starting point, especially if you don't need all the types the manual lists. But a full implementation would take some time. One work around is to do the bibliography by hand. You could also try your luck with the librarian package, which ships with a basic author-year style. – jon Jul 24 '12 at 21:26

1 Answers1

5

There is NO CSE Name-Year biblatex style package yet. But I am trying to work on it. Pardon me for the ugly code. If you have some suggestions, please tell me so that I can learn from you, or better yet, improve the code yourself.

I have several hesitations in answering this question since it happens to be too broad. Perhaps that is partly because this being my first question, I did not know how to ask. I have borrowed answers from several posts, notably:

And here is the biblatex.cfg file.

\ProvidesFile{biblatex.cfg}

\DefineBibliographyStrings{english}{%
  references = {Cited References}, % Use "Cited References" as bibliography heading
    january = {Jan}, % Change how the names of months appear
    february = {Feb},
    march = {Mar},
    april = {Apr},
    may = {May},
    june = {Jun},
    july = {Jul},
    august = {Aug},
    september = {Sep},
    october = {Oct},
    november = {Nov},
    december = {Dec}
}

\ExecuteBibliographyOptions{
firstinits=true,
isbn=true,
dashed=false,
eprint=true,
maxbibnames=99,
alldates=long,
doi=true,
uniquename=init
}

% ... and remove italization of titles
\renewcommand{\bibinitperiod}{}
\renewcommand{\bibinitdelim}{}
\renewcommand{\finalnamedelim}{, }
\renewcommand*{\revsdnamepunct}{}

% Remove quotation marks around journal titles etc.
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

% Print last name first before first name

\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first} % changes that of the editor and others
%\DeclareNameAlias{editorname}{last-first}
\DeclareNameAlias{editora}{editor}
\DeclareNameAlias{editorb}{editor}
\DeclareNameAlias{editorc}{editor}

% ... and remove italization of titles

\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{maintitle}{#1}
\DeclareFieldFormat{sorttitle}{#1}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat{issuetitle}{#1}
\DeclareFieldFormat{pages}{#1}% no prefix for the `pages` field in the bibliography


% Make all titles except for journal title and journalsubtitle Sentence case

\DeclareFieldFormat{titlecase}{\MakeTitleCase{#1}}

\newrobustcmd{\MakeTitleCase}[1]{%
  \ifthenelse{%
  \ifcurrentfield{booktitle}\OR\ifcurrentfield{booksubtitle}%
    \OR\ifcurrentfield{maintitle}\OR\ifcurrentfield{mainsubtitle}%
    \OR\ifcurrentfield{journaltitle}\OR\ifcurrentfield{journalsubtitle}%
    %\OR\ifcurrentfield{issuetitle}\OR\ifcurrentfield{issuesubtitle}%
    %\OR\ifentrytype{book}\OR\ifentrytype{mvbook}\OR\ifentrytype{bookinbook}%
    %\OR\ifentrytype{booklet}\OR\ifentrytype{suppbook}%
    %\OR\ifentrytype{collection}\OR\ifentrytype{mvcollection}%
    %\OR\ifentrytype{suppcollection}\OR\ifentrytype{manual}%
    %\OR\ifentrytype{periodical}\OR\ifentrytype{suppperiodical}%
    %\OR\ifentrytype{proceedings}\OR\ifentrytype{mvproceedings}%
    %\OR\ifentrytype{reference}\OR\ifentrytype{mvreference}%
    %\OR\ifentrytype{report}\OR\ifentrytype{thesis}
    }
    {#1}
    {\MakeSentenceCase{#1}
    }}

% Remove parentheses around dates

\renewbibmacro*{date+extrayear}{%
    \iffieldundef{year}
      {}
      {\printtext{%
     \addperiod\space\printfield{labelyear}%
     \printfield{extrayear}}}}

\NewBibliographyString{available}
\NewBibliographyString{cited}

\DefineBibliographyStrings{english}{%
  available = {Available from},
}

% Redefined url+urldate macro
\DeclareFieldFormat{url}{\bibstring{available}\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{#1}
\DeclareFieldFormat{urlday}{#1}

\renewbibmacro*{url+urldate}{%
    \iffieldundef{urlyear}
    {}
%    {\setunit*{\addspace}%
%     }
  {\printtext{[}%
        \iffieldundef{urlupyear}
            {}
            {\printtext{updated}\space\printfield{urlupyear}
            \mkbibmonth{\thefield{urlupmonth}}
            \stripzeros{\thefield{urlupday}}\addsemicolon\space
        }%
  \printtext{cited}\space%
  \printfield{urlyear}
    \mkbibmonth{\thefield{urlmonth}}
    \stripzeros{\thefield{urlday}}%
  \printtext{].}\space%
  \printfield{url}%
  }
}

% Add another bibtex entry for medium designator in online titles
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=medium, fieldtarget=usera]
      \step[fieldsource=urlupdate, fieldtarget=extradate]
    }
  }
}

% This is a problematic part
\renewbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
    {}
    {\printtext[title]{%
       \printfield[sentencecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[sentencecase]{subtitle}
       \setunit{}%
       \iffieldundef{usera}
          {}
    {\printtext{[}\printfield{usera}\printtext{]}}}%
     \newunit}%
  \printfield{titleaddon}}


\DeclareBibliographyDriver{online}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
    \usebibmacro{publisher+location+date}
    \addsemicolon
    \newunit\newblock
    \usebibmacro{url+urldate}
  \usebibmacro{finentry}}

% Driver for article
% Order of fields for article

\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \newunit
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \usebibmacro{related}%
  \usebibmacro{finentry}}

% cbx part
\renewcommand*{\nameyeardelim}{\addspace}

\endinput

There is also a biblatex-dm.cfg file:

\DeclareDatamodelFields[type=field, datatype=date, skipout]{urlupdate}
\DeclareDatamodelFields[type=field, datatype=integer]{
  urlupday,
  urlupendday,
  urlupendmonth,
  urlupendyear,
  urlupmonth,
  urlupyear}

\DeclareDatamodelEntryfields{
    urlupdate,
  urlupday,
  urlupendday,
  urlupendmonth,
  urlupendyear,
  urlupmonth,
  urlupyear}

\endinput

Now, I know that this answer complicates things since this question requires that the answer duplicates other answers in the site. However, I believe that prospective users of this style can benefit directly by copying the above codes and modifying at their will. And so I am also making this answer CW.

I have discussed this answer with Joseph Wright at chat some time ago and I am currently working to make this into a biblatex style package.

hpesoj626
  • 17,282
  • Any progress on this? I am desperately looking for latex CSE citation style. The journal I am submitting to prefers word documents (sigh!) and does not provide latex templates... – Stiefel Dec 16 '14 at 08:30
  • I found this: https://github.com/josephuses/biblatex-cse – Stiefel Dec 16 '14 at 09:29
  • 1
    Hi @Stiefel. Sorry for not replying to you immediately. I was in need of this style 2 years ago. Unfortunately, I did not make any more progress than what is already in my github account. Please feel free to modify and ask questions here as you deem necessary. At the moment, I have become too busy with other matters. I feel the way you do about there being no CSE citation style yet. At this point, it is already a pain looking at what I did 2 years and not being able to finish it. Sigh... – hpesoj626 Dec 20 '14 at 12:12