2

My question is simple, but I searched in vain for an answer. Right now, my bibliography style (.bst) gives the following result for an article :

Baumgärtel Hans, « Julius Weisbach und die Einführung der neuen Markscheidekunst in die Praxis », Zeitschrift für Bergbau, Hüttenwesen und verwandteWissenschaften, 13 (1), pp. 371–377, 1961.

I would like to have it with the pages number after the date, so this way :

Baumgärtel Hans, « Julius Weisbach und die Einführung der neuen Markscheidekunst in die Praxis », Zeitschrift für Bergbau, Hüttenwesen und verwandteWissenschaften, 13 (1), 1961, pp. 371–377.

Here's the function, i've tried to work on it, but I really dont understand how it works :

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output new.block
  format.title quote "title" output.check
  new.block
  crossref missing$
    { journal emphasize "journal" output.check
      eid empty$

    { format.vol.num.pages output } %
    { format.vol.num.eid output }
  if$
  format.date "year" output.check
}
{ format.article.crossref output.nonnull

  eid empty$
    { format.pages output }
    { format.eid output }
  if$
}
  if$
  format.issn output
  format.doi output
  format.url output
  new.block
  note output
  fin.entry
}

If you can help me, thanks very much in advance ... Thomas

List of all used packages :

\usepackage{appendix} \usepackage{bredele} % Appel de bredele.sty %\usepackage[sectionbib]{natbib} %\usepackage{bibtopics} \usepackage[round]{natbib} \usepackage{amsmath} \usepackage[nodisplayskipstretch]{setspace} % pour virer les espaces dans les environnements equation et alig\usepackage{etoolbox} % it\usepackage{array} \usepackage[bottom]{footmisc} % pour coller les notes en bas de page \usepackage{array} % pour centrer verticalement dans les tableaux \usepackage{multirow}

\usepackage[T1]{fontenc} % un peu superflu, pour tenter d'améliorer l'hyphenation 
\usepackage{lmodern} % un peu superflu, pour tenter d'améliorer l'hyphenation 
\usepackage{index} % pour l'index 
\usepackage{splitidx} % REMPLACE 
\usepackage{multind}  %
\usepackage[T1]{fontenc} % NEW %
\usepackage[utf8]{inputenc} % NEW 
\usepackage{colortbl}% pour les lignes en gris %
\usepackage{etoolbox} % pour utiliser \BeforeBeginEnvironment 
\usepackage{french}[babel] 
\usepackage{array} 
\usepackage{lscape} 
\usepackage[table]{xcolor} % mettre des cases de tableau en couleur %\usepackage{hyperref} % met des liens %
\usepackage{appendix} 
\usepackage{chngcntr} 
\usepackage[compact]{titlesec} 
\usepackage{tikz} % pour des diagrammes simples 
\usepackage[strict]{changepage} % pour mettre de grandes marges sur les pages d'annexes \usepackage{enumitem} \setlist{nolistsep} 
\usepackage{framed} % pour mettre des textes dans des boites
6
  • Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. May 17, 2013 at 13:27
  • I don't really see what kind of MWE ... its actually my thesis so that I have many packages ... but I'm pretty sure this only has to do with bibtex ! There should be a function where pages number are at the end of the reference ... May 17, 2013 at 13:34
  • 1
    Your documentclass and your bst-file is important. unless you don't want to switch to biblatex. May 17, 2013 at 13:35
  • You'll need to modify the BibTeX functions format.vol.num.pages and format.vol.num.eid. In those functions, you'll need to insert the line format.date "year" output.check between the code that typesets the article's volume and number data and the article's page data. Then, remove the line format.date "year" output.check from the function article. Without information about which bst file you're using, more specific advice isn't possible, I'm afraid.
    – Mico
    May 17, 2013 at 13:45
  • Ok, so my document file is "book", my .bst file is "abbrvnat". I will try to put all the packages I used in the question above May 17, 2013 at 13:46

1 Answer 1

1

Save the orignal file abbrvnat.bst in your working directory and rename it to eg. mod-abbrvnat.bst

Now you have to modify two functions: format.vol.num.pages and article:

Here the modifications:

  • line 535

    FUNCTION {format.vol.num.pages}
    { volume field.or.null
      number empty$
        'skip$
        { "\penalty0 (" number * ")" * *
          volume empty$
            { "there's a number but no volume in " cite$ * warning$ }
            'skip$
          if$
        }
      if$
      format.date "year" output.check %<-new
      pages empty$
        'skip$
        { duplicate$ empty$
            { pop$ format.pages }
            { ", \penalty0 " * pages n.dashify * }%<-comma new, old :
          if$
        }
      if$
    }
    
  • line 700

    FUNCTION {article}
    { output.bibitem
      format.authors "author" output.check
      author format.key output
      new.block
      format.title "title" output.check
      new.block
      crossref missing$
        { journal emphasize "journal" output.check
          eid empty$
            { format.vol.num.pages output }
            { format.vol.num.eid output }
          if$
    %      format.date "year" output.check%<commented
        }
        { format.article.crossref output.nonnull
          eid empty$
            { format.pages output }
            { format.eid output }
          if$
        }
      if$
      format.issn output
      format.doi output
      format.url output
      new.block
      note output
      fin.entry
    }
    

After this modification the following mwe provides:

\documentclass [12pt,a4]{book}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Baumgaertel,
 title={Julius Weisbach und die Einführung der neuen Markscheidekunst in die Praxis},
 author={Baumgärtel, Hans},
 journal="Zeitschrift für Bergbau, Hüttenwesen und verwandteWissenschaften",
 volume={13},
 number={1},
 pages={pp~371 -- 377},
 year={1961} 
}
\end{filecontents}
\begin{document}
\cite{Baumgaertel}

\bibliographystyle{mod-abbrvnat}
\bibliography{\jobname}

\end{document}

enter image description here

Please note that more modifications are needed for other cases. I recommend the usage of biblatex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.