2

I want to cite a program documentation that has a new release every year.

@INPROCEEDINGS{FoobarReference,
  author = {Smart Guy},
  title = {The Foo/Bar Reference Manual},
  booktitle = {},
  year = {1999},
  publisher = {}
}

Is it enough to change the year for that, or what is expected from a learned scholar? This documentation exists only in pdf, it is not published and printed.

  • 1
    For a start I'd use @manual. From the wikibook: "Technical manual Required fields: title. Optional fields: author, organization, address, edition, month, year, note." The required fields are more appropriate. Alternatively if you use @misc there's the howpublished field to allow you to put the URL in the bibliography. – Chris H Jun 2 '15 at 14:20
2

You can use a macro in the year field, which you set in the document.

\begin{filecontents*}{\jobname.bib}
@manual{FoobarReference,
  author = {Smart Guy},
  title = {The Foo/Bar Reference Manual},
  year = {\foobaryear},
}
\end{filecontents*}

\documentclass{article}

\newcommand{\foobaryear}{2015}

\begin{document}

The manual is \cite{FoobarReference}.

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

Thus you don't need to modify the .bib file. Note that the @inproceedings type is not appropriate for this kind of reference: choose either @manual or @book.

Note that the filecontents* environment is just to keep the example self-contained, you'll use the standard method with a separate .bib file.

enter image description here

If you are using natbib, a hack is necessary:

\begin{filecontents*}{\jobname.bib}
@manual{FoobarReference,
  author = {Smart Guy},
  title = {The Foo/Bar Reference Manual},
  year = {\foobaryear},
}
\end{filecontents*}

\documentclass{article}
\usepackage[authoryear]{natbib}

\newcommand{\foobaryear}{2015}

\let\oribibitem\bibitem
\def\bibitem[#1(#2)]{%
  \begingroup\edef\x{\endgroup
    \noexpand\oribibitem[\unexpanded{#1}(#2)]%
  }\x
}


\begin{document}
The manual is \cite{FoobarReference}.

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

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.