标题未根据列表中的列宽换行

标题未根据列表中的列宽换行

我正在尝试根据列宽换行标题文本。这是 lstset

\lstset{
    basicstyle=\scriptsize\ttfamily, 
    breaklines=true, %backgroundcolor=\color{grey},
    frame=single,
    framesep=5pt,
    framexleftmargin=10pt,
    framerule=0pt,
    xleftmargin=10pt,
    %numbers=left,
    numberstyle=\tiny,
    numbersep=5pt
}
\renewcommand*{\lstlistingname}{Listing}

实际列表如下:

\begin{lstlisting}[caption={An SD-JWT that can be decoded via a JWT decoder. 
Disclosures are appended after the signature and separed with the tilde separator lets talk a bit more to see if the text wraps up or not}, label=listing:sdjwtencoded, captionpos=b]


eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJUVSB
CZXJsaW4iLCJzdWIiOiJkaWQ6ZXhhbXBsZTpzdHVkZW50RElEIiw
iYXVkIjoiYW55IiwiaWF0IjoxNjg4Mzk0Mjk5LCJuYmYiOjE2ODg
zOTQyOTksImV4cCI6MTY4ODM5Nzg5OSwibWVzc2FnZSI6IiIsIlV
uaXZlcnNpdHkiOiJUZWNobmljYWwgVW5pdmVyc2l0eSBvZiBCZXJ
saW4iLCJGYWN1bHR5IjoiQ29tbXVuaWNhdGlvbnMgVGVjaG5vbG9
neSIsIl9zZCI6WyJObk0zYy1kRTZvSW4xclpIUUVESHVZeC1Pb2F
lc2N2MmNoOWxmb25WU0U4PSIsIldfMi1aVUlhVmt1NlFGSFNOR0l
MUXlpcVE0NXFsTEZseDZnSURrazVuXzg9IiwiQ3JIRGhmTEFQd1J
ZZGNINDFUaEhyMkM0MzZ2WmdQb1hIbjNKUkI2N2xVQT0iXX0.SEO
CC3019JT9n3032o2oO1ks4iybgOQL3iMo3O8id70IZfwZVzaBYje
is7uN4VQtn_QWCcjxAKnOUKoY8M2G7Q~WyI0U3RkZ2psSm9PdjlU
RmRpQjREdWtBPT0iLCAibmFtZSIsICJKYW5lIERvZSJd~WyJaRzU
xTHJ1TjZfMUlKMXBULWJTZkJnPT0iLCAiZGVncmVlIiwgIkJhY2h
lbG9yIG9mIFNjaWVuY2UiXQ==~WyJwYU1TX1piS3pxNE0tSFJQUy
1UdkJBPT0iLCAiZ3BhIiwgIjQuMCJd


\end{lstlisting}

结果如下所示: 标题没有根据列宽甚至页面宽度进行换行

我很希望得到一些帮助。提前致谢!

相关内容