1

I am writing my doctoral thesis, but I am frustrated when I try to output the reference format as my school required, it's required as follow (Only the following three types are needed in my thesis),

Journal [J]

enter image description here

Book [M]

enter image description here

Conference [C] enter image description here

Other requirements:

  1. Multiple authors: when the number of authors are greater than 3, keep first three and use "et al" for the rest authors.
  2. Sorting: By appearance.

My question is what kind of the bibliography style the above is?

and if there is none of the existing bibliography styles fitting for it, how should I build this style from scratch?

.bib:

@article{brauner91,
  author = {Brauner, N.},
  title = {Vapour absorption into falling film},
  journal = {ASME J},
  year = {1991},
  volume = {34},
  pages = {76-82},
  number = {3}
}
@book{baehr1994,
  title={Heat and mass transfer},
  author={Baehr, H. D.},
  year={1994},
  page={221}
  publisher={Berlin:Springer-Verlag}
}
@inproceedings{leiner1989,
  year  = {1989},
  pages={68--71},
  author = {Leiner, A.},
  title = {Optical techniques for heat transfer measurements},
  booktitle = { COLLINS W. Proc Int Conf on Energy and Environment},
  publisher={New York: Academic Press}
}
12
  • 1
    Is there a number in front of the entry? or is this really all there is?
    – Johannes_B
    Mar 27, 2016 at 14:43
  • 3
    Is there any explanation as to why there is a "[J]" after the title? The rest looks fairly standard. You have to play around with the name format a bit and some care will be needed for the journal and number. Please be aware though that this is not nearly enough to properly write a style for your thesis. What about @books, @incollections etc. Normally it is preferred to ask only one specific question per question here. How do I write a style for this can easy become a very broad issue.
    – moewe
    Mar 27, 2016 at 14:48
  • 3
    That omitting for the sake of simplicity is actually hiding useful information. So you want to use a simple numeric citation/bibliography style.
    – Johannes_B
    Mar 27, 2016 at 14:59
  • 1
    That is unfortunately still not enough information to properly write up a style. What if you have two or more authors? How is the list sorted? ...
    – moewe
    Mar 27, 2016 at 15:10
  • 1
    What sorting is "numeric"? By appearance? And I don't understand what you are saying with the names. If I have more than three authors, do I give one and et al the others or do I give up to two?
    – moewe
    Mar 27, 2016 at 15:20

1 Answer 1

4

Try the following

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=numeric,backend=biber,giveninits=true,sorting=none,maxnames=3,minnames=3]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareNameAlias{default}{family-given}
\renewcommand*{\revsdnamepunct}{}
\renewrobustcmd*{\bibinitperiod}{}
\renewcommand*{\finalnamedelim}{\multinamedelim}

\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{journaltitle}{#1\isdot}
\DeclareFieldFormat*{issuetitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}

\newbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
    {}
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
     \ifentrytype{article}{\setunit{}\printtext{[A]}}{}
     \ifentrytype{book}{\setunit{}\printtext{[B]}}{}%
     \ifentrytype{inproceedings}{\setunit{}\printtext{[C]}}{}
     \newunit}%
  \printfield{titleaddon}}

\renewbibmacro*{in:}{\ifentrytype{article}{}{\printtext{//}}}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}}%
  \setunit{\addcomma\space}%
  \printfield{issue}%
  \setunit{\addcomma\space}%
  \usebibmacro{date}
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \setunit{\addcomma\space}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \newunit}

\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand*{\bibpagespunct}{\addcolon\addspace}
\renewcommand{\postnotedelim}{%
  \iffieldpages{postnote}
    {\addcolon\space}
    {\addspace}}

\begin{document}
\cite{sigfridsson,brauner91,baehr1994,leiner1989,aksin}
\printbibliography
\end{document}

Most of this is fairly standard and can be found in Guidelines for customizing biblatex styles, biblatex: remove commas between last and first names in bibliography, Colon instead of “p.” in Biblatex authoryear-comp, Biblatex: No \postnotedelim for citations that aren't numerals, biblatex: parentheses around the volume number of an article

The odd requirements of your style were the indication of the entry type after the title as we as the "//" separator for "in", they are implemented via

\renewbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
    {}
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
     \ifentrytype{article}{\setunit{}\printtext{[A]}}{}
     \ifentrytype{book}{\setunit{}\printtext{[B]}}{}%
     \ifentrytype{inproceedings}{\setunit{}\printtext{[C]}}{}
     \newunit}%
  \printfield{titleaddon}}

\renewbibmacro*{in:}{\ifentrytype{article}{}{\printtext{//}}}

the latter of course follows the general pattern of Suppress “In:” biblatex.

12
  • @moewe Do you see any use in collecting the custoizations of every question on github? It sometimes feels like a good idea, but then ... it is not a good idea. What do you think?
    – Johannes_B
    Mar 27, 2016 at 15:46
  • 1
    @Johannes_B That pretty much describes my feelings about it ;-) If it were on github people might expect proper styles that are ready to use. Sometimes when I write answers though the code that comes out could be streamlined and improved quite a bit. Often questions only focus on particular aspects of one style (see here) so that I would feel uncomfortable releasing this into the wild with much of biblatex's behaviour not checked for compliance. Plus it might make people think that the github repository provides support for those styles and that opens up another can of worms
    – moewe
    Mar 27, 2016 at 15:50
  • 1
    Can of worms That matches. By the way, i asked the Bibliotheksdirektorin about ISO 690 and DIN 1505. She admitted not to have a deeper knowledge, but asked: "Is das nich nur ganz allgemein gehalten? Da steht doch nichts spezifisches drin, oder?"
    – Johannes_B
    Mar 27, 2016 at 15:57
  • 1
    @WangyanLi Yes my MWE assumes you are running the most recent version of biblatex, with versions < 3.3 you will have to use firstinits and last-first. Everything else should work fine, though. In a way this is the reverse of Biblatex 3.3 name formatting.
    – moewe
    Mar 28, 2016 at 9:23
  • 1
    @WangyanLi Add \DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}. But see tex.stackexchange.com/q/86043/35864, tex.stackexchange.com/q/22980/35864 and tex.stackexchange.com/q/20335/35864
    – moewe
    Mar 28, 2016 at 14:37

You must log in to answer this question.

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