![bib 文件中的 @misc 引用键存在问题](https://linux22.com/image/475617/bib%20%E6%96%87%E4%BB%B6%E4%B8%AD%E7%9A%84%20%40misc%20%E5%BC%95%E7%94%A8%E9%94%AE%E5%AD%98%E5%9C%A8%E9%97%AE%E9%A2%98.png)
我对 @misc 引用中的关键字参数感到困惑,更具体地说,它的键是如何定义的。有人知道这个问题吗?
@misc{CABRAL123,
Author = {Umberlandia Cabral},
Date-Added = {2024-04-09 18:58:06 +0000},
Date-Modified = {2015-04-27 22:43:06 +0000},
Howpublished = {IBGE},
Keywords = {wiki},
Title = {Sistema de Indicadores Culturais: Pais tem quase 40% da população em municipios sem salas de cinema},
Url = {https://agenciadenoticias.ibge.gov.br/agencia-noticias/2012-agencia-de-noticias/noticias/26239-pais-tem-quase-40-da-populacao-em-municipios-sem-salas-de-cinema},
Urlaccessdate = {10 abr 2024},
Year = {2019},
Bdsk-Url-1 = {https://agenciadenoticias.ibge.gov.br/agencia-noticias/2012-agencia-de-noticias/noticias/26239-pais-tem-quase-40-da-populacao-em-municipios-sem-salas-de-cinema}
}
这是我的第一篇帖子,感谢您的耐心......
当我编译该文档时,(??)
文档和日志中显示:
Citation `CABRAL123' on page 1 undefined on input line 210.
./main.tex, 210
You have cited something which is not included in your bibliography. Make sure that the citation (\cite{...}) has a corresponding key in your bibliography, and that both are spelled the same way.
Learn more
我对其他参考文献都没有问题,我推测是键名或日期值有问题,但根本没有任何明显的问题。
答案1
我无法使用 BibTeX 或 Biblatex 重现您报告的问题。但是,使用前者时我确实得到了错误的结果,而使用后者时编译失败。
您需要对%
标题中的 进行转义,以便当 LaTeX 读取 时.bbl
不会忽略该行的其余部分。在 Biblatex 的情况下,您最终会丢失右花括号,因此条目永远不会结束,从而导致标准失控错误。在 BibTeX 的情况下,您不会丢失字段的结尾,但会丢失中间的一大块,因此条目排版时会显示错误的标题。
要修复此问题,只需使用\%
。
\begin{filecontents*}[overwrite]{\jobname.bib}
@misc{CABRAL123,
Author = {Umberlandia Cabral},
Date-Added = {2024-04-09 18:58:06 +0000},
Date-Modified = {2015-04-27 22:43:06 +0000},
Howpublished = {IBGE},
Keywords = {wiki},
Title = {Sistema de Indicadores Culturais: Pais tem quase 40\% da população em municipios sem salas de cinema},
Url = {https://agenciadenoticias.ibge.gov.br/agencia-noticias/2012-agencia-de-noticias/noticias/26239-pais-tem-quase-40-da-populacao-em-municipios-sem-salas-de-cinema},
Urlaccessdate = {10 abr 2024},
Year = {2019},
Bdsk-Url-1 = {https://agenciadenoticias.ibge.gov.br/agencia-noticias/2012-agencia-de-noticias/noticias/26239-pais-tem-quase-40-da-populacao-em-municipios-sem-salas-de-cinema}
}
\end{filecontents*}
\documentclass{article}
\usepackage{biblatex}
\bibliography{\jobname}
\begin{document}
\cite{CABRAL123}
\printbibliography
\end{document}
如果这不是问题,请注意问题可能出在以前的文件中的条目.bib
,因为这是导致生成不太正确的消息的错误的常见原因。
[由于 Okular 的一个 bug 而保留了图片,目前还没有修复的迹象。抱歉图片不够养眼。]