BibTeX, biblatex and biberGetting a custom Citation and Bibliography Style

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Getting a custom Citation and Bibliography Style

Post by NELLLY »

Hello,

I use this code.

Code: Select all

\documentclass[12pt]{article}
\date{}
\usepackage[square]{natbib}
%\usepackage[round]{natbib}
\usepackage{tabularx,graphicx,rotating,subfigure,booktabs}
\usepackage{caption}\hyphenpenalty 1000
\renewcommand{\baselinestretch}{1.5}
\setlength{\evensidemargin}{3.5cm} \setlength{\textwidth}{6in}
\setlength{\textheight}{8.9in} \setlength{\topmargin}{-0.6in}
\setlength{\topmargin}{-0.2in} \setlength{\headsep}{.4in}
\setlength{\footnotesep}{.2in} \setlength{\parindent}{0.5cm}
%\captionsetup{belowskip=12pt,aboveskip=4pt}
\title{Economic Design of  $np$ Control Charts using a Variable Control Limit}
\begin{document}
\citet{BAI98} \clearpage
\bibliographystyle{plain}
\bibliography{ESSAIBIB} % bib database file refs.bib

\nocite{*}      % list all refs in database, cited or not.
\end{document}

And in the file "ESSAIBIB.bib" I have this entry.

Code: Select all

@ARTICLE{BAI98,
  author = {Bai, D. S. and Lee, K. T.},
  title = {An economic design of variable sampling interval $\bar{X}$ control charts},
  journal = {International Journal of Production Economics},
  year ={1998},
  volume ={54},
  pages = {57-64},
}
When I typeset the main file, I get this
author(?)[1]

References

[1] Bai D. S. An economic design of variable sampling interval ¯X control charts. International Journal of Production Economics, 54:57–64, 1998.
I need to suppress the (author?) and to get instead Bai and Lee and to get the reference of the paper in the following format
References

1. Bai, D. S. and Lee, K.T. (1998). An economic design of variable sampling interval ¯X control charts. \textit{International Journal of Production Economics}, 54, 57–64.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Getting a custom Citation and Bibliography Style

Post by localghost »

Your code does not work for me. I get this error.

Code: Select all

Package natbib Error: Bibliography not compatible with author-year citations.
(natbib)              Press <return> to continue in numerical citation style.
When I alter your bibliography style to plainnat, it works but doesn't show the output you want (see attachment).

Code: Select all

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[square,authoryear]{natbib}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{BAI98,
  author = {Bai, D. S. and Lee, K. T.},
  title = {An economic design of variable sampling interval $\bar{X}$ control charts},
  journal = {International Journal of Production Economics},
  year ={1998},
  volume ={54},
  pages = {57-64},
}
\end{filecontents*}

\bibliographystyle{plainnat}

\title{Economic Design of $np$ Control Charts using a Variable Control Limit}
\author{NELLLY}
\date{}

\begin{document}
  \citet{BAI98}
  \clearpage

  \bibliography{\jobname} % bib database file refs.bib
\end{document}
Perhaps you should take a look at biblatex to customize your bibliography or create a custom bibliography style (*.bst) by custom-bib.


Remarks:

Thorsten
Attachments
tmp.pdf
The resulting output.
(61.37 KiB) Downloaded 366 times
Post Reply