[Tex/LaTex] Jabref, fixing abbreviation for field

bibtexjabref

I'm using Jabref to manage referrences. I want to abbreviate pages to pp. or skip word (pages).

%—- BibTeXsource ————–%

Inproceedings

@INPROCEEDINGS{Talaya2004,
  author = {Talaya, J. and Alamús, R. and Bosch, E. and Kornus, W},
  title = {Integration of a Terrestrial Laser Scanner with GPS/IMU Orientation
    Sensors},
  booktitle = {The International Archives of the Photogrammetry, Remote Sensing
    and Spatial Information Sciences 35 (Part B7)},
  year = {2004},
  pages = {990-995},
  owner = {Say},
  timestamp = {2013.09.07}
}

% my Question.tex

    \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis
    \usepackage{natbib}

    \begin{document}

    %%%%%%%%%%%%% begin Bibliography %%%%%%%%%%%%%%%%%
    \citet{Talaya2004}\\


    \bibliographystyle{apalike}

    \bibliography{References}

    \end{document}

output:

Talaya, J., Alams, R., Bosch, E., and Kornus, W. (2004). Integration of      
a terrestrial laser scanner with gps/imu orientation sensors. In The In-     
ternational Archives of the Photogrammetry, Remote Sensing and Spatial   
Information Sciences 35 (Part B7), pages  990-995.   

Here pages is appearing. How can I skip pages or customize pages to pp..

Best Answer

In the folowing, we will assume you use natbib with plainnat.bst, this solution will work for all standard natbib .bst files and probably the majority of .bst files - just follow the instructions below.

If you are using natbib with plainnat.bst, you will just have to modify the function FUNCTION {format.pages}.

Locate plainnat.bst on your file system, copy it to a place LaTeX can find it (a good start would be the directory your .tex file is in) and rename it (to, say, myplainnat.bst). Open the renamed document and find FUNCTION {format.pages}, replace the function by

FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
        { "pp." pages n.dashify tie.or.space.connect }%<---- changed "pages" to "pp."
        { "p." pages tie.or.space.connect }%<---- changed "page" to "p."
      if$
    }
  if$
}

Now use \bibliographystyle{myplainnat} instead of \bibliographystyle{plainnat}.

MWE

\documentclass{article}
\usepackage{natbib}
\usepackage{url}

\begin{filecontents}{\jobname.bib}
@INPROCEEDINGS{Talaya2004,
  author = {Talaya, J. and Alamís, R. and Bosch, E. and Kornus, W},
  title = {Integration of a Terrestrial Laser Scanner with GPS/IMU Orientation
    Sensors},
  booktitle = {The International Archives of the Photogrammetry, Remote Sensing
    and Spatial Information Sciences 35 (Part B7)},
  year = {2004},
  pages = {990-995},
  owner = {Say},
  timestamp = {2013.09.07}
}
\end{filecontents}

\begin{document}
\cite{Talaya2004}
\nocite{*}
\bibliographystyle{myplainnat}
\bibliography{\jobname}
\end{document}

enter image description here


Edit as you are using apalike.bst (you can find out what style you are using by examining \bibliographystyle{apalike}), here is the guide for apalike.

Find apalike.bst on your computer (it is probably in texmf-dist/bibtex/bst/apalike, on my machine it was in C:\Program Files (x86)\MiKTeX 2.9\bibtex\bst\apalike; if you have no idea where to find it, open a command prompt/shell and type kpsewhich apalike.bst and navigate to that file) copy it into the directory myQuestion.tex is in, rename apalike.bst to myapalike.bst.

Open myapalike.bst and search for FUNCTION {format.pages} (in my version of the file it is on line 378), you will find a block of code like this.

FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
        { "pages" pages n.dashify tie.or.space.connect }
        { "page" pages tie.or.space.connect }
      if$
    }
  if$
}

Just change the word "pages" in the fifth line to "pp." and "page" in the sixth line to "p.", so the whole function now reads:

FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
        { "pp." pages n.dashify tie.or.space.connect }%<---- changed "pages" to "pp."
        { "p." pages tie.or.space.connect }%<---- changed "page" to "p."
      if$
    }
  if$
}

Instead of \bibliographystyle{apalike} from now on use \bibliographystyle{myapalike}.

So your MWE becomes

\documentclass[12pt,twoside]{report}
\usepackage{natbib}

\begin{document}
%%%%%%%%%%%%% begin Bibliography %%%%%%%%%%%%%%%%%
\citet{Talaya2004}\
\bibliographystyle{myapalike}
\bibliography{References}
\end{document}

the bibliography looks like this enter image description here

Related Question