다음 코드가 있습니다.
\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}
원본 문서에는 명령이 있지만 \legend{}
이미 파일과 모든 패키지의 가져오기를 살펴보았는데 cls
이 명령이 어디서 왔는지 모르겠습니다. 이 명령은 어떤 패키지에서 나오나요?
legend
다음 그림에 따라 텍스트를 중앙이 아닌 왼쪽에 정렬 하려면 어떻게 해야 합니까 ?
예:
답변1
내가 이해하는 바에 따르면, 범례를 이미지 소스의 공지로 사용하는 것이 좋습니다. 이를 위해 패키지가 개발되었습니다 copyrightbox
. 이를 통해 다음을 얻을 수 있습니다.
\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}
편집하다:
새 명령을 정의하여 legend
:
\newcommand\legend[1]{%
\captionsetup{font=small,singlelinecheck=off}
\caption*{#1}}
당신은 얻을 수 있습니다:
\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}
답변2
패키지는 매우 간단합니다 copyrightbox
.
\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}
허용되는 게재위치는 선택적 인수( [l]
, [r]
(기본값) 또는[b]