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.

I need to generate the following style for my thesis,

Desired university format

For this, the following biblatex style has been tried, and still I experience two problems.

problematic format

  1. In the Prefix to year, no punctuation should come.
  2. Between author name intials, no punctuation and no space should be left.
  3. Some of the names in bib card itself, having name with more than a character initial and in between initials, space and punctuation available. How can I process to get desired university format? For example, author = {Allwin, A. K. and Maria, P. K. and Ruby, J. L.}

Here is the minimum working example: mwe.tex

\documentclass[a4paper]{article}
\usepackage[citestyle=authoryear,hyperref=true,
natbib=true,minnames=1,maxnames=2,minbibnames=10,
maxbibnames=11,bibstyle=custom,firstinits=true,backend=bibtex]{biblatex}
\bibliography{literature}
\begin{document}
\nocite{*}
\printbibliography[title=REFERENCES]
\end{document}

biblatex style file : custom.bbx

\ProvidesFile{custom.bbx}

\DeclareFieldFormat[article]{title}{~`#1',}
\DeclareFieldFormat[article]{journal}{~#1,}
\DeclareFieldFormat[article]{year}{~#1,}
\DeclareFieldFormat[article]{pages}{~pp. #1.}
\DeclareFieldFormat[article]{volume}{~vol.~#1,}
\DeclareFieldFormat[article]{number}{no.~#1,}

\DeclareNameFormat[article]{author}{%
\ifthenelse{\value{listcount}=1}{
\ifblank{#1}{}{#1\addcomma\space}
\ifblank{#4}{}{#4\addcomma}}{
\ifthenelse{\value{listcount}=\value{liststop}}
{
\ifblank{#1}{}{~\&~#1\addcomma\space}
\ifblank{#4}{}{#4\addcomma}
}
{
\ifblank{#1}{}{#1\addcomma\space}
\ifblank{#4}{}{#4\addcomma}
}
}
}
\DeclareBibliographyDriver{article}{%
\printnames{author}%
\newunit\newblock
\printfield{year}%
\newunit\newblock
\printfield{title}%
\newunit\newblock
\printfield{journal}%
\newunit\newblock
\printfield{volume}%
\newunit\newblock
\printfield{number}%
\newunit\newblock
\printfield{pages}%
\finentry}

sample bib card file: literature.bib

@article{allwin_drilling_2009,
    title = {Drilling of fibers},
    volume = {18},
    number = {2},
    journal = {Journal of Materials},
    author = {Allwin, A. K. and Maria, P. K. and Ruby, J. L.},
    year = {2007},
    pages = {1--7},
    },
@article{suraj_solid_2007,
    title = {Solid-tool machining},
    volume = {10},
    shorttitle = {Solid-tool machining handbook},
    number = {1},
    journal = {International Composite Committee},
    author = {Suraj, J. K. and Chandran, M. P.},
    year = {2007},
    pages = {66--72},   
},
@article{jayakumar_mech_2011,
  title={Mechanical  behaviors of  polyester composite},
  author={Jayakumar, S. G.},
  journal={Polymers and Fibers},
  volume={15},
  number={11},
  pages={155--164},
  year={2011},
 },

 @article{waldron2003generalized,
  title={Generalized Welch bound equality sequences are tight frames},
  author={Waldron, Shayne},
  journal={Information Theory, IEEE Transactions on},
  volume={49},
  number={9},
  pages={2307--2309},
  year={2003},
  publisher={IEEE}
},

@article{conley1998nativity,
  title={Nativity and wealth in mid-nineteenth-century cities},
  author={Conley, Timothy G and Galenson, David W},
  journal={Journal of Economic History},
  volume={58},
  pages={468--493},
  year={1998},
  publisher={Cambridge Univ Press}
},

@article{alishahi2009bounds,
  title={Bounds on the sum capacity of synchronous binary CDMA channels},
  author={Alishahi, Kasra and Marvasti, Farokh and Aref, Vahid and Pad, Pedram},
  journal={Information Theory, IEEE Transactions on},
  volume={55},
  number={8},
  pages={3577--3593},
  year={2009},
  publisher={IEEE}
}
share|improve this question

1 Answer 1

up vote 5 down vote accepted

I think you would benefit from using a standard style and modify that to your needs. As it stands now, your custom.bbx does not support any entry type other than @article and does not really benefit from all the things biblatex can do.

Since you seems to use authoryear, I will explain how to modify that style to get what you want, you will need to use biber (that is backend=biber, not backend=bibtex) to fully appreciate this solution.

First we make sure the unit separator is indeed a comma

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

To deal with name formatting, we need the package loading options firstinits=true and terseinits=true, the latter gets rid of spaces and punctuations for initials. We also need

\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\finalnamedelim}{\addspace\&\space}

To always have a "last first" name order and the ampersand before the last name.

To get the bare year without any parentheses, we add

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{\thefield{datelabelsource}year}
    {}
    {\iffieldsequal{year}{\thefield{datelabelsource}year}
      {\printdateextralabel}%
      {\printfield{labelyear}%
       \printfield{extrayear}}}}%

Finally,

\newbibmacro*{in:}{%
  \ifentrytype{article}
    {}
    {\printtext{%
     \bibstring{in}\intitlepunct}}}

\DeclareFieldFormat[article,periodical]{volume}{\bibstring{volume}~#1}% volume of a journal
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}% number of a journal

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

Takes care of the "in" for articles (I suppose you don't like that) and the volume and number field formats.

I recommend also loading csquotes and babel with british as language option, to get the right quotation marks.

MWE

\documentclass[british,a4paper]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, natbib=true, minnames=1, maxnames=2, maxbibnames=11, firstinits=true, terseinits=true, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{allwin_drilling_2009,
    title = {Drilling of fibers},
    volume = {18},
    number = {2},
    journal = {Journal of Materials},
    author = {Allwin, A. K. and Maria, P. K. and Ruby, J. L.},
    year = {2007},
    pages = {1--7},
    }
@article{suraj_solid_2007,
    title = {Solid-tool machining},
    volume = {10},
    shorttitle = {Solid-tool machining handbook},
    number = {1},
    journal = {International Composite Committee},
    author = {Suraj, J. K. and Chandran, M. P.},
    year = {2007},
    pages = {66--72},   
}
@article{jayakumar_mech_2011,
  title={Mechanical  behaviors of polyester composite},
  author={Jayakumar, S. G.},
  journal={Polymers and Fibers},
  volume={15},
  number={11},
  pages={155--164},
  year={2011},
 }

 @article{waldron2003generalized,
  title={Generalized Welch bound equality sequences are tight frames},
  author={Waldron, Shayne},
  journal={Information Theory, IEEE Transactions on},
  volume={49},
  number={9},
  pages={2307--2309},
  year={2003},
  publisher={IEEE}
}

@article{conley1998nativity,
  title={Nativity and wealth in mid-nineteenth-century cities},
  author={Conley, Timothy G and Galenson, David W},
  journal={Journal of Economic History},
  volume={58},
  pages={468--493},
  year={1998},
  publisher={Cambridge Univ Press}
}

@article{alishahi2009bounds,
  title={Bounds on the sum capacity of synchronous binary CDMA channels},
  author={Alishahi, Kasra and Marvasti, Farokh and Aref, Vahid and Pad, Pedram},
  journal={Information Theory, IEEE Transactions on},
  volume={55},
  number={8},
  pages={3577--3593},
  year={2009},
  publisher={IEEE}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\renewcommand*{\newunitpunct}{\addcomma\space}
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\finalnamedelim}{\addspace\&\space}
\renewbibmacro*{date+extrayear}{%
  \iffieldundef{\thefield{datelabelsource}year}
    {}
    {\iffieldsequal{year}{\thefield{datelabelsource}year}
      {\printdateextralabel}%
      {\printfield{labelyear}%
       \printfield{extrayear}}}}%
\newbibmacro*{in:}{%
  \ifentrytype{article}
    {}
    {\printtext{%
     \bibstring{in}\intitlepunct}}}
\DeclareFieldFormat[article,periodical]{volume}{\bibstring{volume}~#1}% volume of a journal
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}% number of a journal
\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \printfield{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}
\begin{document}
\nocite{*}
\printbibliography[title=REFERENCES]
\end{document}

gives

enter image description here

If you insist on no punctuation between names, also add

\renewcommand*{\multinamedelim}{\space}
share|improve this answer
    
we tried to run the mwe given. we face the following error and its log is given below. (./biblatex_solution.aux) (./biblatex_solution.bbl) ! Undefined control sequence. <argument> \printdateextralabel l.96 \printbibliography[title=REFERENCES] ? . How to fix this probem. –  velu Jan 16 at 11:24
    
@velu What version of biblatex are you running? (It works fine for me on biblatex 2.8.) Were you able to run Biber, or did you run BibTeX? –  moewe Jan 16 at 21:02
    
We are using biblatex 1.7 and biber version 0.9.9 –  velu Jan 17 at 8:18
    
@velu That's quite an old version, the current one is biblatex 2.8/biber 1.8. Any chance for an update? If that's not possible you could delete the line \printdateextralabel (not the curly braces though) and try again, this might have adverse effects down the line, however. –  moewe Jan 17 at 14:48

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.