5

I'm trying to get a full citation inside my text using the \bibentry command. But it doesn't show anything.

MWE:

\documentclass[draft=false
              ,paper=a4
              ,twoside=false
              ,fontsize=11pt
              ,headsepline
              ,BCOR10mm
              ,DIV11
              ]{scrbook}
\usepackage[ngerman,english]{babel}
\usepackage{iftex}
\ifPDFTeX
   \usepackage[utf8]{inputenc}
   \usepackage[T1]{fontenc}
   \usepackage{lmodern}
\else
   \ifXeTeX
     \usepackage{xltxtra}
   \else 
     \usepackage{luatextra}
   \fi
   \defaultfontfeatures{Ligatures=TeX}
\fi
\usepackage{bibentry}
\usepackage{natbib}
\usepackage[german,refpage]{nomencl}
\bibliographystyle{dinat}
\usepackage{filecontents}
\begin{document}
\selectlanguage{ngerman}
\begin{filecontents*}{\jobname.bib}
@book{rice1999optical,
  title={Optical Character Recognition: An Illustrated Guide to the Frontier},
  author={Rice, S.V. and Nagy, G. and Nartker, T.A.},
  isbn={9780792384922},
  lccn={99020879},
  series={The Springer International Series in Engineering and Computer Science},
  url={http://books.google.de/books?id=u5ofWoiONPAC},
  year={1999},
  publisher={Springer US}}
\end{filecontents*}
\bibliography{\jobname}
Here i need a full Cite:
\\
\bibentry{rice1999optical}
\end{document}

What am I doing wrong?

EDIT: I'm not sure if the problem is the same if the document has not the same scope but here's an MWE. Go crystal balls go.

Hope the MWE clarifies it! Thanks again!

lockstep
  • 250,273
  • Welcome to TeX.SX! Please help us to help you and 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}. You might also want to add to your question how you're including the pdfs etc. – Aradnix Sep 27 '14 at 19:34
  • 1
    Instead of show us your full preamble, just create a MWE only with the package needed for run it. – Aradnix Sep 27 '14 at 19:36
  • 1
    The only obvious problem so far is that you haven't given us a complete file to test. But I also wonder about: where \bibsstring comes from? where x1, x2, x3 come from? what does the @article entry have to do with the other snippets? Not all of use have functioning crystal balls. – jon Sep 27 '14 at 21:56
  • 1
    Got a working MWE in the edited question with the same result. The citation is not being displayed. – Megalomaniac Sep 28 '14 at 12:28
  • You want to cite? Try \cite{rice1999optical} – Johannes_B Sep 28 '14 at 16:22
  • Btw: Seems you are just starting with bibliographies: Better use the modern combo of biblatex and biber from the beginning. – Johannes_B Sep 28 '14 at 16:25
  • Ah, now perhaps the problem: Quoting from the bibentry manual: Thebibentrypackage will work with natbib with its native\bibitemformat, and with standard LaTeX. Nothing else can be guaranteed. That said, I can get bibentry output (with errors). I can post that as an 'answer' if you like. – jon Sep 28 '14 at 16:46
  • If i try the \bibitem command, it gives me this error: Package natbib Error: Bibliography not campatible with author-year-citations. – Megalomaniac Sep 28 '14 at 16:55
  • No: the manual is not saying use bibitem. It is saying that you need to use the standard natbib styles. You are using dinnat, which raises an error. I'll post a (not-quite-)answer. – jon Sep 28 '14 at 17:53

1 Answers1

2

The bibliography style dinat.bst is not fully compatible with bibentry. If you push through the error it raises ---

! Undefined control sequence.
<argument> \dinatlabel 
                       {Rice u.\,a. 1999} \textsc {Rice}, S.V.~; \textsc {Na...
l.51 \bibentry{rice1999optical}

You get some kind of output from bibentry. I leave it to you to decide if you are happy with the output you get....

\documentclass[draft=false
              ,paper=a4
              ,twoside=false
              ,fontsize=11pt
              ,headsepline
              ,BCOR10mm
              ,DIV11
              ]{scrbook}
\usepackage[ngerman,english]{babel}
\usepackage{iftex}
\ifPDFTeX
   \usepackage[utf8]{inputenc}
   \usepackage[T1]{fontenc}
   \usepackage{lmodern}
\else
   \ifXeTeX
     \usepackage{xltxtra}
   \else
     \usepackage{luatextra}
   \fi
   \defaultfontfeatures{Ligatures=TeX}
\fi

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{rice1999optical,
  title={Optical Character Recognition: An Illustrated Guide to the Frontier},
  author={Rice, S.V. and Nagy, G. and Nartker, T.A.},
  isbn={9780792384922},
  lccn={99020879},
  series={The Springer International Series in Engineering and Computer Science},
  url={http://books.google.de/books?id=u5ofWoiONPAC},
  year={1999},
  publisher={Springer US}}
\end{filecontents*}
\usepackage{natbib}
\usepackage{bibentry}

\usepackage[german,refpage]{nomencl}

\begin{document}
\selectlanguage{ngerman}
\nobibliography*
Here i need a full Cite:
\bibentry{rice1999optical}

% \bibliographystyle{plain}% <-- this would work (but to test, delete all auxiliary styles and complete the complete latex-bibtex-latex-latex cycle)
\bibliographystyle{dinat}
\bibliography{\jobname}

\end{document}
jon
  • 22,325
  • Thanks for figuring this out. I´ll give it a try with the plain style. Are there any other suggestions to solve this? – Megalomaniac Sep 29 '14 at 09:17
  • I´ve just tested your suggestion and there's still no output generated :/ – Megalomaniac Sep 29 '14 at 09:19
  • 1
    How are you compiling? You need to run: latex, bibtex, latex, latex. The second and third runs of latex will raise an error and you'll need to tell latex to continue the compile process regardless. If you can explain what you are doing and how you are doing it more clearly, I (or someone else) might be able to give further hints/suggestions. – jon Sep 29 '14 at 18:39
  • well, since i've put all the the code in there, i've run all tex compilers several times :/ Still the same result – Megalomaniac Oct 01 '14 at 18:16
  • I appreciate that you're not getting any output, but you are not being helpful regarding what you have tried. 'The same result' doesn't actually provide any useful information. Did you run the commands from a terminal? from an editor? which command didn't work? the first one? the second? the third? did you erase all auxiliary files before re-testing? ... – jon Oct 01 '14 at 21:24
  • Ok, i thought my post clarified what i did. I've run the commands with texPad, Bibtex and latex several times. Aren't the .aux files overwritten on each compilation? – Megalomaniac Oct 03 '14 at 21:53
  • I don't know TeXPad, unfortunately. I'd suggest trying from the command line, and pushing through the error message and see if it works that way. Note that I'm referring that you try this with the .tex file I've provided, not your "real" document, which I haven't seen. If mine works, then we can sort out why it doesn't work on your files.... – jon Oct 05 '14 at 21:05
  • The problem of bibentry not working is not exclusive to some obscure styles. See my question and example using the plain style https://tex.stackexchange.com/questions/679860/full-in-text-citation-without-biblatex. – Marten Mar 20 '23 at 11:24