.png)
Gostaria de adicionar 2 tipos de figuras no meu documento (com contadores diferentes)
- Figuras
- Placas (se geral, seria possível diferenciar entre placas P&B, coloridas...)
Não entendo qual ambiente devo personalizar (figuras? referências? rótulos?).
Motivo: Todos os desenhos devem ser nomeados fig. XX
e constar no texto. As fotos devem ser colocadas no final e referenciadas como pl. XX
. [Por curiosidade] seria bom distinguir fotos em preto e branco pl. XX
de coloridas c. pl. XX
.
Um exemplo de texto renderizado poderia ser:
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
, pl. 1
e c. pl. 1
há três imagens diferentes incluídas
\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}
Eu uso xelatex
os pacotes varioref, hyperref, cleveref
nesta ordem (conforme especificado no cleverref
manual, 12.1, p. 23). Meu documento usa idiomas diferentes (inglês, francês, alemão), mas todas as referências devem ser "fig/pl". (ou seja, nenhuma tradução para "Abb.").
Responder1
Como você deseja contadores separados e independentes para figuras e dois tipos de "placas", acho que você deveria empregar o maquinário do newfloat
pacote para criar dois novos ambientes flutuantes, chamados (digamos) bwplate
e clrplate
. Em seguida, use \crefname
diretivas para informar cleveref
quais rótulos de prefixo usar ao executar o \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}