2

I am trying to create a BibLaTex bibliography database for official reports using JabRef. Every report has mainly a title, month, year and a document number and issue.

So far I have included both last items in the same number field as shown below using the TechReport entry type.

@TechReport{key,
  title  = {My document's title},
  year   = {2017},
  number = {PRO-A-1234-5678, Issue 1},
  month  = jun,
}

I also use Lyx with a KOMA-Script Report document type to include the bibliography. However, I have not found among the great amount of standard bibstyles, one that shows the document number (and issue) for the PDF output. Furthermore, I'd like that the style respects my upper- and lowercases, so the plain styles would not be an option, I guess.

I have therefore two questions:

  1. Is there any other better style for my bib entries that contain document official number/ID/issue than Report/TechReport as used here?
  2. Which bibliography style should I use to show that official number in my bibliography after compilation?
1
  • Welcome to TeX - LaTeX! The case changing should only happen in the title in standard styles. Jun 19, 2017 at 13:50

2 Answers 2

5

EDIT Following the comment by @moewe you can also use biblatex, using report entries with a number field. For this solution character case in the titles is preserved by default, the title is printed in italics and the comma after the issue becomes a dot - however, biblatex bibliographies are highly customizable so this can be changed if needed.

reports.bib

@report{a,
  title  = {My Document's title},
  year   = {2017},
  month  = jun,
  number = {PRO-A-1234-5678, Issue 1},
}

@report{b,
  title  = {My other Document's title},
  year   = {2017},
  month  = jul,
  number = {PRO-A-1234-5678, Issue 2},
}

Main file:

\documentclass{article}
\usepackage{biblatex}
\addbibresource{reports.bib}
\begin{document}
Citing: \cite{a,b}
\printbibliography
\end{document}

Result:

enter image description here


ORIGINAL ANSWER

This can be done with the plain bibliography style, using misc entries. For misc the available fields are author, title, howpublished, month, year, note, key, all optional and displayed in that order by most standard styles (see, e.g., https://nwalsh.com/tex/texhelp/bibtx-17.html, https://verbosus.com/bibtex-style-examples.html). The key field is not displayed, but can act as sorting field instead of author (as in the example below). Display of upper case characters can be forced with extra {} (also in the example).

MWE:

reports.bib

@misc{a,
  title  = {My Document's title},
  year   = {2017},
  month  = jun,
  howpublished = {PRO-A-1234-5678, Issue 1},
  key = {x}
}

@misc{b,
  title  = {My other {D}ocument's title},
  year   = {2017},
  month  = jul,
  note = {PRO-A-1234-5678, Issue 2},
  key = {y}
}

Main file:

\documentclass{article}
\begin{document}
Id before date, case modified: \cite{a}

Id after date, case preserved: \cite{b}
\bibliographystyle{plain}
\bibliography{reports}
\end{document}

Result:

enter image description here

See also How to control the order of fields in bibtex? for more information on customizing bibliography styles.

2
  • 1
    If the OP uses biblatex as tagged (not sure if they actually use biblatex), then @techreport/@report with number not a bad idea at all. Cf. the entries padhyeand chiu of biblatex-examples.bib.
    – moewe
    Jun 19, 2017 at 15:15
  • 1
    @moewe I didn't see the tag, thanks for noticing :) I've expanded the answer.
    – Marijn
    Jun 19, 2017 at 18:24
3

Thank you for your answer @Marijn. As I was looking for help in the integration with LyX too, I'll post an answer for the two questions.

  1. Use biblatex, since it allows a better customization of the bibliography. I kept the previous BibLaTex database generated with JabRef. This is an example of a report entry as pointed by Marijn:

    @report{a,
      title  = {My Document's title},
      year   = {2017},
      month  = jun,
      number = {PRO-A-1234-5678, Issue 1},
    }
    
  2. The integration with LyX was however a bit more difficult, because there is no official support for biblatex yet (expected in v2.3, currently in development). Therefore I followed the wiki https://wiki.lyx.org/BibTeX/Biblatex and this other question BibLaTex, Biber and Lyx: how to resolve \bibliographystyle error?.

    In conclusion, I had to add the following lines to my LaTeX Preamble:

    \usepackage[style=numeric,backend=bibtex8]{biblatex}
    % add bibliography database
    \addbibresource{database.bib}
    

    Notice the bibtex8 backend to avoid the BiBTeX error: I found no \citation commands, since biber is not available in my LateX installation. Use the default biber if possible. The style remains customizable.

    And add the following block to my document according to the examples provided in the aforementioned wiki.

    enter image description here

    Notice also heading=bibintoc so that the bibliography appears in the table of contents using a KOMA-Script document class.

2
  • 3
    I don't know which version of LyX you have, but in 2.2.3 biber is definitely an option under Document --> Settings --> Bibliography --> Processor. Jun 20, 2017 at 13:17
  • 1
    You are allright. I could use biber without problems at home but somehow the biber package is not available at work. Therefore I had to use the bibtex8 workaround. I have edited my answer to include this exception. Jun 21, 2017 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .