0

I want to cite a theorem from a reference book. I input the code in the context of beamer as follows:

\cite[Theorem 1]{reference book}

But it only shows the name of reference book without theorem 1. How to tackle this problem?

moewe
  • 175,683
mathbeginner
  • 115
  • 2
  • 7
  • 3
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – BambOo May 02 '20 at 09:38
  • If everything works correctly, normally \cite[Thm.~1]{sigfridsson} should produce a reference to the work and "Thm. 1". Some citation styles suppress pre- and postnote information, but they should warn you about this. From the description so far it is hard to say what might be going on. Please show us a short example document that shows what you are doing. See https://tex.meta.stackexchange.com/q/228/35864. Check the .log and .blg files for hints. – moewe May 02 '20 at 10:31
  • I also type the code"usepcakge[citestyle=alphabetic, bibstyle=authortitle]{biblatex}. When I cite a theorem, it shows the author and year without the "theorem" – mathbeginner May 02 '20 at 10:51
  • I'm afraid we need to see more than just that line. At the moment my guess would be that for some reason the citations are not found. Are the citation labels that you see in your document the same as your entry keys in the .bib file? Are they shown in bold? Did you run Biber? https://tex.stackexchange.com/q/63852/35864 https://tex.stackexchange.com/q/154751/35864 – moewe May 02 '20 at 11:00
  • For example. I want to cite theorem 1 in Bob's book. I typed \bibitem{Bob 20} Bob Book's name, 2020 . When I cite the theorem in the text , I input the code \cite[Theorem1]{Bob 20} , after running pdflatex, it shows as following : [Bob20] without Theorem 1. – mathbeginner May 02 '20 at 11:46
  • That means there is an error producing the citations. Note first that entry keys may not contain spaces. So you can't write \cite{Bob 20} you can only have \cite{Bob20}. Secondly the entry key in your .bib file and you \cite must match. Thirdly you must run Biber, not BibTeX (see the two links in my last comment). – moewe May 02 '20 at 12:01
  • Yes, it was a typo. I input \cite{Bob20}. When I list the reference books, I did't use the .bib. I use the following code: \begin{thebibliography}{10} \bibitem{Bob20} \end{thebibliography} – mathbeginner May 02 '20 at 12:05
  • Oh, you absolutely can not use thebibliography with biblatex. It would have been much easier to help you if we had known from the start that you used thebibliography. That's why we almost always ask for a minimal example document that shows what you are doing. – moewe May 02 '20 at 12:21
  • Why can not use thebiblioghraphy? It also works when I cite a book , it correctly shows the author and the year. – mathbeginner May 02 '20 at 12:38
  • The package biblatex (\usepackage{biblatex}) can not be used together with the bibliography produced by thebibliography. The two approaches are completely incompatible. Since you still haven't shown us an example document I have no idea what is happening at your end, so I can not help you until you add the required info to your question. – moewe May 02 '20 at 12:48
  • If I want to use thebiblioghrpagy, how to make it show as following "[Bob20, Theorem1]"? – mathbeginner May 03 '20 at 10:34

1 Answers1

1

Natbib

Consider using the citet and citep commands with the natbib package.

Output

enter image description here

MWE

\documentclass{beamer}
\usepackage[numbers, sort&compress]{natbib}
\bibliographystyle{unsrtnat}
\begin{document}
\begin{frame}{Some references}
Some results from \citet[Theorem 10.22]{kloeden1999numerical}, for more details see \citep[Theorem~10.22]{kloeden1999numerical}.
\vfill
\bibliography{references}
\end{frame}
\end{document}

If using biblatex

The same holds here, where we for convenience I use the option natbib=true, which gives

enter image description here

using

\documentclass{beamer}
\usepackage[backend=biber,style=numeric,natbib=true]{biblatex}
\addbibresource{sample.bib} 
\begin{document}
\begin{frame}{Something}
We see what \citet[Section~1]{einstein} has to say can compare \cite[Section~1]{einstein} with \citep[Section~1]{einstein}.
\printbibliography
\end{frame}
\end{document}
oliversm
  • 2,717