有可能有两个带有双字幕的图表列表吗?

有可能有两个带有双字幕的图表列表吗?

现在我用中文写一篇论文,要求图片的标题要同时用中文和英文写,我发现用bicaption包可以实现,但是如果用bicaption命令的话,\listoffigures只会生成一个图片列表,里面有英文标题和中文标题,我想把它们分开,即一个列表只包含中文标题,一个列表只包含英文标题。下面是我的尝试。

\documentclass{ctexbook}
\usepackage{caption,bicaption,graphicx}
\captionsetup[figure][bi-second]{name=Figure}
\usepackage{mwe}

\begin{document}
\frontmatter
\listoffigures
\mainmatter
\blindtext
\begin{figure}[!htbp]
    \centering
    \includegraphics{example-image.pdf}
    \bicaption{第一个图}{first figure}
    \label{fig:figure1}
\end{figure}

\blindtext
\begin{figure}[!htbp]
    \centering
    \includegraphics{example-image.pdf}
    \bicaption{第二个图}{second figure}
    \label{fig:figure2}
\end{figure}
\end{document}

在上面的代码中,我使用ctexbook类文件来生成中文文档。我认为可能的解决方法是重新定义命令,\bicaption以便可以将英文标题写入不同的文件(例如)enlof,而不是与lof文件中的中文标题混合在一起。我是 LaTeX 新手,我不知道如何实现它 :(

答案1

它似乎按照 bicaption 包文档第 5 节“自定义列表”中所述工作,即使用该选项来listtype+=...实现此目的:

\documentclass{ctexbook}
\usepackage{caption,bicaption,graphicx}
\captionsetup[figure][bi-second]{name=Figure}
\usepackage{mwe}

% Use the bicaption package with list type "figureEng" for the 2nd language
\captionsetup[bi-second]{listtype+=Eng}
% Define type "figureEng" and \listoffigureEng
\usepackage{newfloat}
\DeclareFloatingEnvironment[fileext=lof2]{figureEng}[Figure][List of Figures]

\begin{document}
\frontmatter
\listoffigures
\listoffigureEng
\mainmatter
\blindtext
\begin{figure}[!htbp]
    \centering
    \includegraphics{example-image.pdf}
    \bicaption{第一个图}{first figure}
    \label{fig:figure1}
\end{figure}

\blindtext
\begin{figure}[!htbp]
    \centering
    \includegraphics{example-image.pdf}
    \bicaption{第二个图}{second figure}
    \label{fig:figure2}
\end{figure}
\end{document}

相关内容