2

I'm using Tufte-LaTeX and I have two small figures that I would like to appear side by side. I read this question and answer about putting two figures side by side. I tried this with Tufte-LaTeX, but it only prints the first caption. Also, it would be nice if the captions appeared each under its own figure, like in example I cited. Is there a way to do this? Thanks!

PS

Here is the example I am using

\documentclass[nohyper,titlepage,nols]{tufte-book}

\usepackage{lipsum}
\usepackage{mwe}

\begin{document}
How can I put two figures side-by-side? Not two sub-figures, but two actual
figures
with separate "Fig.: bla bla" captions. A figure is supposed to spread over the
entire text width, but I have two figures which are narrow and long, and I need
to
save the space in order to withstand the pages limit.

\lipsum

\begin{figure}
    \centering
    \begin{minipage}{0.45\textwidth}
        \centering
        \includegraphics[width=0.9\textwidth]{example-image-a} % first figure itself
        \caption{first figure}
    \end{minipage}\hfill
    \begin{minipage}{0.45\textwidth}
        \centering
        \includegraphics[width=0.9\textwidth]{example-image-b} % second figure itself
        \caption{second figure}
    \end{minipage}
\end{figure}

\lipsum[3]

\end{document}
  • 1
    can you show, what you try? in form of small, complete document beginning with \documentclass{tufte-book} (or what you used) and ending with \end{document}. welcome to tex.se! – Zarko Sep 23 '17 at 20:57
  • Hi, I added the example I am using. Thanks! – bedwere Sep 23 '17 at 21:06
1

like this?

enter image description here

it seem that simple solution with minipage doesn't work in tufte-book document class (the first caption is lost). however, with \ffigbox is possible to solve your problem, but captions are below figures and not outsides of main text as it is default tufte style:

\documentclass[nohyper,titlepage,nols]{tufte-book}

\usepackage{lipsum}
\usepackage{mwe}

\usepackage{floatrow}   % <--- added



\begin{document}
How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions. A figure is supposed to spread over the entire text width, but I have two figures which are narrow and long, and I need to save the space in order to withstand the pages limit.
\begin{figure}[!h]
   \begin{floatrow}
\ffigbox{\includegraphics[width=\linewidth]{example-image-a}}%
        {\caption{first figure}\label{fig:example-1}}
\hfill
\ffigbox{\includegraphics[width=\linewidth]{example-image-b}}%
        {\caption{second figure}\label{fig:example-2}}
   \end{floatrow}
\end{figure}
\lipsum[3]

\end{document}
  • I like it because it works also with the real document! Thanks! – bedwere Sep 24 '17 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.