You can use adjustbox
with its export
option which will make keys like max width
, available inside \includegraphics
. Also, it offers keys width
, height
etc to be used for adjustbox
environment.
Here is a sample.
\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{showframe} %% for demo
\setkeys{Gin}{height=2cm}
\begin{document}
\noindent
\begin{adjustbox}{width=\textwidth}
\includegraphics{helen19}
\includegraphics{helen18}
\includegraphics{helen20}
\includegraphics{helen22}
\includegraphics{helen19}
\includegraphics{helen18}
\end{adjustbox}
\bigskip
\noindent
\begin{adjustbox}{max width=0.8\textwidth} %% change to \textwidth and see
\includegraphics[height=1.5cm]{helen19}
\includegraphics[height=1.5cm]{helen18}
\includegraphics[height=1.5cm]{helen20}
\includegraphics[height=1.5cm]{helen22}
\includegraphics[height=1.5cm]{helen19}
\includegraphics[height=1.5cm]{helen18}
\includegraphics[height=1.5cm]{helen20}
\includegraphics[height=1.5cm]{helen22}
\end{adjustbox}
\end{document}
I think you don't need to charge caption
package because using memoir
caption formatting options is enough.
If you consult chapter 10 Floats and captions
from memoir
documentation will find all commands that you can use to change a particular caption or define new caption styles.
As an example, following \tabcaption
command which if it's used as a table caption will print aligned to the left. For figure captions, the regular \caption
command will be centered. The code for \tabcaption
is based on the example in page 187.
\documentclass[12pt, a4paper, oneside]{memoir} %twoside
\setsecnumdepth{subsubsection}
\maxtocdepth{subsection}
\usepackage[MeX]{polski}
\usepackage[utf8]{inputenc}
\usepackage{fullpage}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{float}
\usepackage{multirow}
\usepackage{pbox}
\usepackage{pdfpages}
\usepackage{paralist}
\usepackage{indentfirst}
\usepackage{appendix}
\chapterstyle{section}
\makeatletter
\renewcommand{\fnum@figure}[1]{\small{\figurename~\thefigure}. \sffamily}
\makeatother
%\usepackage{caption}
%\captionsetup[table]{justification=raggedright, singlelinecheck=off}
%\captionsetup[figure]{justification=raggedright, singlelinecheck=off}
%\captiondelim{. }
\usepackage{hyperref}
\usepackage[all]{hypcap}
\hypersetup{
unicode=true, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartpage={1},
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle={Master thesis}, % title
pdfauthor={me}, % author
pdfsubject={}, % subject of the document
pdfcreator={Creator}, % creator of the document
pdfproducer={Producer}, % producer of the document
pdfkeywords={keywords}, % list of keywords
pdfnewwindow=true, % links in new window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=black, % color of internal links
citecolor=black, % color of links to bibliography
filecolor=black, % color of file links
urlcolor=black % color of external links
%linkcolor=blue, % color of internal links
%citecolor=green, % color of links to bibliography
%filecolor=magenta, % color of file links
%urlcolor=blue % color of external links
}
\usepackage{color}
\usepackage{geometry}
\newgeometry{tmargin=2.5cm, bmargin=2.5cm, lmargin=3.5cm, rmargin=2cm}
\makeatletter
\newcommand{\tabcaption}[2][\@empty]{%
\captionstyle{\raggedright}
\captiondelim{. }
\ifx \@empty#1 \caption{#2}\else \caption[#1]{#2}\fi}
\makeatother
\begin{document}
\rmfamily
\frontmatter
\pagenumbering{Roman}
\clubpenalty=10000
\widowpenalty=10000
\brokenpenalty=10000
\exhyphenpenalty=999999
\pagestyle{empty}
\tableofcontents
\pagestyle{plain}
\mainmatter
\begin{figure}[H]
\centering
\label{Some label}
\includegraphics[width=15.4cm]{example-image}
\caption{My description, should be alligned to the left}
\end{figure}
\begin{table}[H]
\centering
%\captionstyle{\raggedright}
%\captiondelim{. }
\tabcaption{My caption}
\label{my-label}
\begin{tabular}{lll}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{tabular}
\end{table}
\end{document}
Best Answer
You can use
minipage
s inside\subbottom
:The
demo
option was only used to produce black rectangles instead of actual figures; do nota use that option in your actual document.