0

In one of my table captions, I inserted \cite{RN8} in the caption and the caption of the table showed normally. But when I saw the list of tables, I found that \cite{RN8} became the label RN8. How can I make the list of tables show the \cite{} command?

Y. zeng
  • 1,885
  • BiBLaTeX or BibTeX? If BibTeX, maybe https://tex.stackexchange.com/questions/326467 or https://tex.stackexchange.com/questions/227833 helps. – Dr. Manuel Kuehner Apr 13 '22 at 04:00
  • 1
    Alternatively, use \caption[caption version for list of tables]{normal caption} to avoid the problem. – Dr. Manuel Kuehner Apr 13 '22 at 04:02
  • Going to bed now, sorry can't test in depth. Hope it helps. I think you have to provide more information and an MWE before you get better help. – Dr. Manuel Kuehner Apr 13 '22 at 04:13
  • @Dr.ManuelKuehner Hello, it is BibTex. I check now. As I am a newbie, I don't know how to make an MWE. What I use is others made. – Y. zeng Apr 13 '22 at 04:28
  • 1
    Take my code as an example. Also see the link in the top of my code: https://tex.meta.stackexchange.com/questions/4407. Providing an MWE is essential to avoid missunderstandings. In addition, it helps you to understand the problem better. – Dr. Manuel Kuehner Apr 13 '22 at 04:30
  • @Dr.ManuelKuehner I see wrongly as I use BiBLaTeX. – Y. zeng Apr 13 '22 at 04:39
  • Going offline now. But your comments are confusing. Are you using bibtex or biblatex. Please provide an MWE based on my code and show your problem more clearly. – Dr. Manuel Kuehner Apr 13 '22 at 04:40
  • @Dr.ManuelKuehner I use biblatex. I don't why when I tested your code, it is normal. When I tested my code, it can only show key name in my list of tables. – Y. zeng Apr 13 '22 at 05:26

2 Answers2

2

Seems to work in BiBLaTeX

enter image description here

% https://tex.meta.stackexchange.com/questions/4407
\documentclass{article}
\usepackage[style=authoryear-comp]{biblatex}
\addbibresource{\jobname.bib}

\begin{filecontents}{\jobname.bib} @book{key, author = {Author, A.}, year = {2001}, title = {Title}, publisher = {Publisher}, } \end{filecontents}

\begin{document}

\listoffigures

\begin{figure} \centering FIGURE \caption{Caption \cite{key}.} \label{fig:my_label} \end{figure}

\printbibliography

\end{document}


Update

It also works with RN8 as a key. Maybe you have to clear the "cached files" (Overleaf).

enter image description here

% https://tex.meta.stackexchange.com/questions/4407
\documentclass{article}
\usepackage[style=authoryear-comp]{biblatex}
\addbibresource{\jobname.bib}

\begin{filecontents}{\jobname.bib} @book{key, author = {Author, A.}, year = {2001}, title = {Title}, publisher = {Publisher}, } @book{RN8, author = {Author, RN.}, year = {2001}, title = {Title}, publisher = {Publisher}, } \end{filecontents}

\begin{document}

\listoffigures

\begin{figure} \centering FIGURE \caption{Caption \cite{key, RN8}.} \label{fig:my_label} \end{figure}

\printbibliography

\end{document}

enter image description here

  • I check your code and it is right. But why mine can't? Where determine the display of cited thing in the list of tables? If you tell me, I can modify that in my code. – Y. zeng Apr 13 '22 at 04:42
  • Why chinging key to RN makes not show the cited reference? – Y. zeng Apr 13 '22 at 04:56
  • @Y.zeng See update. – Dr. Manuel Kuehner Apr 13 '22 at 17:23
  • Thanks for your instruction. They are all right. Maybe my template has some limits to that function. My template can't do this. Thanks. – Y. zeng Apr 13 '22 at 17:40
  • @Y.zeng That is why is essential to provide more information in your next question, see https://tex.meta.stackexchange.com/questions/228/ for more information. Otherwise, it is just guessing and assuming things. Good luck! – Dr. Manuel Kuehner Apr 13 '22 at 17:46
  • What I am using is a big template that is written by some Chinese. The link: https://github.com/whutug/whu-thesis/archive/refs/tags/v0.6d.zip – Y. zeng Apr 13 '22 at 18:09
  • @Y.zeng Seems like you can easily make an MWE using Overleaf: https://www.overleaf.com/latex/templates/wuhan-university-latex-undergraduate-thesis-template/kpystysgbgmr – Dr. Manuel Kuehner Apr 14 '22 at 03:06
  • I can make it easily. But the one I make is different from the file: https://github.com/whutug/whu-thesis/archive/refs/tags/v0.6d.zip. In your template, it is all right. In the MWE I made, it will too. However, in the MWE of https://github.com/whutug/whu-thesis/archive/refs/tags/v0.6d.zip, it is not right. So can't make an MWE to show this problem. – Y. zeng Apr 14 '22 at 03:26
  • Ah, ok. That seems different. – Dr. Manuel Kuehner Apr 14 '22 at 03:43
  • I feel it is cls file that makes something different. – Y. zeng Apr 14 '22 at 03:54
  • I can understand that it is difficult for you. – Dr. Manuel Kuehner Apr 14 '22 at 04:00
  • 1
    Yes. I am just a newbie~ – Y. zeng Apr 14 '22 at 04:04
2

Seems to work in BiBTeX.

enter image description here

% https://tex.meta.stackexchange.com/questions/4407
\documentclass{article}

\begin{filecontents}{\jobname.bib} @book{key, author = {Author, A.}, year = {2001}, title = {Title}, publisher = {Publisher}, } \end{filecontents}

\begin{document}

\listoffigures

\begin{figure} \centering FIGURE \caption{Caption \cite{key}.} \label{fig:my_label} \end{figure}

\bibliographystyle{plain} \bibliography{\jobname}

\end{document}