whutug / whu-thesis

:memo: 武汉大学毕业论文 LaTeX 模版 2024
LaTeX Project Public License v1.3c
931 stars 200 forks source link

图片怎么加引用? #205

Closed csj199813 closed 1 year ago

csj199813 commented 1 year ago

检查

编译环境

描述问题

最小工作示例(MWE)

\documentclass{whu-thesis}
\begin{document}
Hello, \LaTex!
\end{document}

(用 XeLaTeX 编译后)输出

! Undefined control sequence.
l.3 Hello, \LaTex
                 !
?

链接

我还做了这些尝试

附件

sikouhjw commented 1 year ago
  1. 请不要只把问题发在标题,而不修改正文内容
  2. 问题太过基础,不予回答,请自行检索,这是最基本的检索能力
  3. 建议你阅读 texdoc lshort-zh-cn
csj199813 commented 1 year ago

抱歉,是我没有注意到,这里的引用是指在caption中加入参考文献的引用\cite会报错

sikouhjw commented 1 year ago

抱歉,是我没有注意到,这里的引用是指在caption中加入参考文献的引用\cite会报错

这是描述不够详细导致的,提问请给全信息。

你可以使用 \caption[xxx]{xxx \cite{ref}}\caption 中引用参考文献。

note286 commented 1 year ago

请给出能复现问题的代码。

note286 commented 1 year ago

\caption{xxx\cite{ref}}这样就会报错

无法复现你的问题。

\documentclass{whu-thesis}
\begin{document}
\begin{figure}
\caption{sss\cite{xxx}xxx}
\end{figure}
\end{document}
csj199813 commented 1 year ago

已解决,\caption[xxx]{xxx \cite{ref}}可以通过编译