異なるタイプの図を参照する方法(「図」や「図版」など)

異なるタイプの図を参照する方法(「図」や「図版」など)

ドキュメントに 2 種類の数字 (異なるカウンター付き) を追加したい

  1. 数字
  2. プレート(一般的なものであれば、白黒、カラープレートを区別することが可能です)

どの環境をカスタマイズする必要があるのか​​わかりません (図? 参照? ラベル?)。

理由: すべての図面には名前を付けてfig. XX、本文に含めます。写真は最後に配置し、 として参照します。[参考までに] 白黒写真とカラー写真pl. XXを区別すると便利です。pl. XXc. pl. XX

レンダリングされたテキストの例は次のようになります。

From the diagram (fig. 1, p. 1), the X-Ray imagery (pl. 1, p. 32)
or the colored tomography (c. pl. 1, p. 104), we deduce that ....

fig. 1、 3つの異なる画像pl. 1c. pl. 1含まれています

\begin{figure}
\includegraphics[width=10mm]{fig_1}
\label{fig_1}
\end{figure} 

\begin{figure}
\includegraphics[width=10mm]{pl_1}
\label{pl_1}
\end{figure} 

\begin{figure}
\includegraphics[width=10mm]{c_pl_1}
\label{c_pl_1}
\end{figure} 

私はxelatexパッケージをvarioref, hyperref, cleverefこの順序で使用します (cleverrefマニュアル 12.1、p. 23 に指定されているとおり)。私のドキュメントではさまざまな言語 (英語、フランス語、ドイツ語) を使用していますが、すべての参照は "fig/pl." にする必要があります (つまり、"Abb." に翻訳する必要はありません)。

答え1

数字と 2 種類の「プレート」に別々で独立したカウンターが必要なので、パッケージの仕組みを使用して、(たとえば)とnewfloatという 2 つの新しいフローティング環境を作成する必要があると思います。次に、を実行するときに使用するプレフィックス ラベルを指示するディレクティブを使用します。bwplateclrplate\crefnamecleveref\cref

ここに画像の説明を入力してください

\documentclass[11pt]{scrartcl}
\usepackage[ngerman,french,english]{babel}
\usepackage[a4paper,vmargin=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[demo]{graphicx} % remove 'demo' option in real doc.

\usepackage{newfloat} % for '\DeclareFloatingEnvironment' macro
\usepackage{varioref}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage[nameinlink]{cleveref}

\DeclareFloatingEnvironment[name=Plate]{bwplate} % or 'name=B\&W Plate'
%% declare labels for use with \cref:
\crefname{bwplate}{b\&w pl.}{b\&w pls.}
\Crefname{bwplate}{B\&W Plate}{B\&W Plates}

\DeclareFloatingEnvironment[name=Color Plate]{clrplate}
%% declare labels for use with \cref:
\crefname{clrplate}{clr. pl.}{clr. pls.}
\Crefname{clrplate}{Color Plate}{Color Plates}


\begin{document}

Cross-references to \cref{fig:1,pl:1,cpl:1,pl:2,cpl:2}.

\Cref{fig:1}. \Cref{pl:1,pl:2}. \Cref{cpl:1,cpl:2}.


\begin{figure}[h!]
\centering
\includegraphics[width=0.4\textwidth]{fig_1}
\caption{A graphic}\label{fig:1}
\end{figure} 
\begin{bwplate}[h!]
\centering
\includegraphics[width=0.4\textwidth]{pl_1}
\caption{A first B\&W image}\label{pl:1}
\end{bwplate} 
\begin{clrplate}[h!]
\centering
\includegraphics[width=0.4\textwidth]{c_pl_1}
\caption{A first color image}\label{cpl:1}
\end{clrplate} 
\begin{bwplate}[h!]
\centering
\includegraphics[width=0.4\textwidth]{pl_2}
\caption{A second B\&W image}\label{pl:2}
\end{bwplate} 
\begin{clrplate}[h!]
\centering
\includegraphics[width=0.4\textwidth]{c_pl_2}
\caption{A second color image}\label{cpl:2}
\end{clrplate} 

\end{document}

関連情報