多语种时不显示子图号

多语种时不显示子图号

我正在尝试将 4 个数字并排放置,我正在使用代码

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{graphicx,wrapfig,lipsum}
\usepackage{subfigure}


% % % % % % % % % % % % % % % % % % %
\begin{document}
\begin{figure}[ht]
\centering
\subfigure[Caption of subfigure 1]{
    \rule{4cm}{3cm}
    \label{fig:subfig1}
}
\subfigure[Caption of subfigure 2]{
    \rule{4cm}{3cm}
    \label{fig:subfig2}
}
\subfigure[Caption of subfigure 3]{
    \rule{4cm}{3cm}
    \label{fig:subfig3}
}
\subfigure[Caption of subfigure 4]{
    \rule{4cm}{3cm}
    \label{fig:subfig4}
}
\caption[Optional caption for list of figures]{Caption of subfigures \subref{fig:subfig1}, \subref{fig:subfig2} and \subref{fig:subfig3}}
\label{fig:subfigureExample}
\end{figure}
Reference to figure \ref{fig:subfigureExample}.

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
all things go wright till I add the code 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{polyglossia}
\setdefaultlanguage[numerals = maghrib, calendar = locale]{arabic}%maghrib
\newfontfamily\arabicfont[Script=Arabic, Scale=1.0]{Amiri} 
\newfontfamily\arabicfonttt[Script=Arabic, Scale=1.0]{Amiri}
\setotherlanguage{english}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

在文档中使用阿拉伯语,子图的数字 (a、b、c、d) 不会显示,我正在使用 texlive 和 xelatex 来编译文档

%%%%Before adding polyglossia

在此处输入图片描述

%%%%After Adding polyglossia

在此处输入图片描述

答案1

subfigure软件包已经过时 15 年左右了。请使用subfig或更现代的subcaption。前者只需更改\subfigure为即可\subfloat

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{graphicx,wrapfig,lipsum}
\usepackage{subfig}
\usepackage{polyglossia}
\setdefaultlanguage[numerals = maghrib, calendar = locale]{arabic}%maghrib
\newfontfamily\arabicfont[Script=Arabic, Scale=1.0]{Amiri} 
\newfontfamily\arabicfonttt[Script=Arabic, Scale=1.0]{Amiri}
\setotherlanguage{english}



% % % % % % % % % % % % % % % % % % %
\begin{document}
\begin{figure}[ht]
\centering
\subfloat[Caption of subfigure 1]{
    \rule{4cm}{3cm}
    \label{fig:subfig1}
}
\subfloat[Caption of subfigure 2]{
    \rule{4cm}{3cm}
    \label{fig:subfig2}
}

\subfloat[Caption of subfigure 3]{
    \rule{4cm}{3cm}
    \label{fig:subfig3}
}
\subfloat[Caption of subfigure 4]{
    \rule{4cm}{3cm}
    \label{fig:subfig4}
}
\caption[Optional caption for list of figures]
  {Caption of subfigures \subref{fig:subfig1},
   \subref{fig:subfig2} and \subref{fig:subfig3}}
\label{fig:subfigureExample}
\end{figure}
Reference to figure \ref{fig:subfigureExample}.

\end{document}

在此处输入图片描述

相关内容