![突出显示不适用于图片标题](https://linux22.com/image/423656/%E7%AA%81%E5%87%BA%E6%98%BE%E7%A4%BA%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%9B%BE%E7%89%87%E6%A0%87%E9%A2%98.png)
我正在使用高亮包,使用 \hl 命令来高亮某些句子。但是当涉及到图片标题时,它会出现奇怪的错误并停止工作。对此有什么建议吗?
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{soul}
\begin{document}
\centering
\textbf{Simulation A2}
\begin{figure}[h]
\includegraphics[width=1\linewidth]{trail_fig}
\caption{\label{trail}\hl{(a) Variation of nonboned interactions with time between Asp$^1$ of chain D and Gly$^{38}$ of chain G \& Ala$^{42}$ of chain F,H.(figure {\ref{fig2}g}, {\ref{fig2}i} of the main article)}}
\end{figure}
\end{document}