Tengo el siguiente código:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amssymb} % for "\checkmark" macro
\usepackage{graphicx} % remove "demo" option in real document
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\captionsetup[subfigure]{labelformat=simple}
\makeatletter
\renewcommand{\p@subfigure}{\thefigure~} % unbreakable space after fig. #
\makeatother
\begin{document}
\begin{figure}[ht!]
\centering
%Insere Figura
\caption{Figure Description}
\includegraphics[scale=0.6]{img/tex.png}
\legend{Source: (Blokland2013)}
\label{fig:testemultiplataforma}
\end{figure}
\begin{figure}[!ht]
\centering
\caption{Figure Description}
\begin{subfigure}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Figure 1}
\label{fig:DifExp2Per4Tarefa1IF}
\end{subfigure}%
%\qquad
%add desired spacing between images, e. g. ~, \quad, \qquad etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Figure 2}
\label{fig:DifExp2Per4Tarefa2IF}
\end{subfigure}
\legend{Source: Own authorship}
\label{fig:DifExp2Per4IF}
\end{figure}
\end{document}
En mi documento original está el comando \legend{}
, pero ya busqué en el cls
archivo y en las importaciones de todos mis paquetes y no sé de dónde viene este comando. ¿De qué paquete proviene este comando?
¿Cómo debo hacer para alinear el legend
texto a la izquierda en lugar de centrado según las siguientes figuras?
Ejemplos:
Respuesta1
Según tengo entendido, te gusta usar la leyenda como aviso de la fuente de la imagen. para ello se ha desarrollado el paquete copyrightbox
. mediante él podrás obtener:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amssymb} % for "\checkmark" macro
\usepackage[demo]{graphicx} % remove "demo" option in real document
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{copyrightbox}% <--- added
\renewcommand\thesubfigure{(\alph{subfigure})}
\captionsetup[subfigure]{labelformat=simple}
\makeatletter
\renewcommand{\p@subfigure}{\thefigure~} % unbreakable space after fig. #
%
\renewcommand{\CRB@setcopyrightfont}{% < ---for changing copyright font color/shape/family
\footnotesize
\color{black}%
}
\makeatother
\begin{document}
\begin{figure}[ht!]
\centering
\caption{Figure Description}
\label{fig:testemultiplataforma}
\copyrightbox[b]{\includegraphics[scale=0.6]{img/tex.png}}{Source: Blokland2013}
\end{figure}
\begin{figure}[!ht]
\centering
\caption{Figure Description}
\label{fig:DifExp2Per4IF}
\copyrightbox[b]{\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Figure 1}
\label{fig:DifExp2Per4Tarefa1IF}
\end{subfigure}\quad
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Figure 2}
\label{fig:DifExp2Per4Tarefa2IF}
\end{subfigure}}{Source: Own authorship}
\end{figure}
\end{document}
editar:
definiendo un nuevo comando legend
:
\newcommand\legend[1]{%
\captionsetup{font=small,singlelinecheck=off}
\caption*{#1}}
puedes obtener:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amssymb} % for "\checkmark" macro
\usepackage[demo]{graphicx} % remove "demo" option in real document
\usepackage{float}
\usepackage{caption}
\newcommand\legend[1]{%
\captionsetup{font=small,singlelinecheck=off}
\caption*{#1}}
\usepackage{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\captionsetup[subfigure]{labelformat=simple}
\makeatletter
\renewcommand{\p@subfigure}{\thefigure~} % unbreakable space after fig. #
\makeatother
\begin{document}
\begin{figure}[ht!]
\centering
\caption{Figure Description}
\label{fig:testemultiplataforma}
\includegraphics[scale=0.6]{img/tex.png}%}{Source: Blokland2013}
\legend{Source: Blokland2013}
\end{figure}
\begin{figure}[!ht]
\centering
\caption{Figure Description}
\label{fig:DifExp2Per4IF}
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Figure 1}
\label{fig:DifExp2Per4Tarefa1IF}
\end{subfigure}\quad
\begin{subfigure}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Figure 2}
\label{fig:DifExp2Per4Tarefa2IF}
\end{subfigure}
\legend{Source: Own authorship}
\end{figure}
\end{document}
Respuesta2
Es muy sencillo con el copyrightbox
paquete:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{ebgaramond}
\usepackage{graphicx}
\usepackage{copyrightbox}
\usepackage{caption}
\begin{document}
\begin{figure}[!htb]
\centering
\caption{Heinrich Füssli – The Nightmare (1781)}
\copyrightbox[b]{\includegraphics{Nightmare_Fussli}}{Detroit Institute of Arts}
\end{figure}%
\end{document}
Las ubicaciones permitidas utilizan un argumento opcional: [l]
, [r]
(predeterminado) o[b]