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.

58 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \usepackage{graphicx}
  4. \usepackage{caption}
  5. \usepackage{subcaption}
  6. %\usepackage{hyperref}
  7. %\captionsetup{subrefformat=parens}
  8. % new suref command
  9. \newcommand{\suref}[2]{\figurename{} \ref{#1}:(\subref{#2})}
  10. \begin{document}
  11. \section{Simple figures}
  12. \label{sec:simple}
  13. This is a simple figure; see \figurename{} \ref{fig:fig-example}.
  14. \begin{figure}[!htb]
  15. \centering
  16. \includegraphics[width=3.5in]{example-image-a}
  17. \caption{Figure's caption.}
  18. \label{fig:fig-example}
  19. \end{figure}
  20. \section{The subsigures option}
  21. \label{sec:subfigures}
  22. 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} ...
  23. %on body
  24. \begin{figure}
  25. \centering
  26. \begin{subfigure}[t]{0.3\textwidth}
  27. \centering
  28. \includegraphics[width=\textwidth]{example-image-a}
  29. \caption{The image a}
  30. \label{fig:a}
  31. \end{subfigure}
  32. \hfill
  33. \begin{subfigure}[t]{0.3\textwidth}
  34. \centering
  35. \includegraphics[width=\textwidth]{example-image-b}
  36. \caption{The image b}
  37. \label{fig:b}
  38. \end{subfigure}
  39. \hfill
  40. \begin{subfigure}[t]{0.3\textwidth}
  41. \centering
  42. \includegraphics[width=\textwidth]{example-image-c}
  43. \caption{The image c with more text than the other captions}
  44. \label{fig:c}
  45. \end{subfigure}
  46. \caption{Three images together and its large caption}
  47. \label{fig:three graphs}
  48. \end{figure}
  49. \newpage
  50. \section{Tables}
  51. \label{sec:tables}
  52. \end{document}