Repository for the international webinar 2021, prepared with Jade, ITM, and Óbuda universities.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
%\usepackage{hyperref}
%\captionsetup{subrefformat=parens}
% new suref command
\newcommand{\suref}[2]{\figurename{} \ref{#1}:(\subref{#2})}
\begin{document}
\section{Simple figures}
\label{sec:simple}
This is a simple figure; see \figurename{} \ref{fig:fig-example}.
\begin{figure}[!htb]
\centering
\includegraphics[width=3.5in]{example-image-a}
\caption{Figure's caption.}
\label{fig:fig-example}
\end{figure}
\section{The subsigures option}
\label{sec:subfigures}
Now we are adding three sub-figure in one figure; see \figurename{} \ref{fig:three graphs}. Notice that in \ref{fig:a} ... or by using \suref{fig:three graphs}{fig:a} ...
%on body
\begin{figure}
\centering
\begin{subfigure}[t]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-a}
\caption{The image a}
\label{fig:a}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-b}
\caption{The image b}
\label{fig:b}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.3\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-c}
\caption{The image c with more text than the other captions}
\label{fig:c}
\end{subfigure}
\caption{Three images together and its large caption}
\label{fig:three graphs}
\end{figure}
\newpage
\section{Tables}
\label{sec:tables}
\end{document}