tufte-book marginfigure 与全宽内容重叠

tufte-book marginfigure 与全宽内容重叠
\documentclass[nobib]{tufte-book}
\usepackage{mwe}
% avoid line breaks in inline math
% https://tex.stackexchange.com/a/14243/
\relpenalty=9999
\binoppenalty=9999

\begin{document}
\mainmatter

Some text, but less than the height of the margin figure.

\begin{marginfigure}
    \includegraphics[width=1.0\textwidth]{example-image}
    \caption{The caption of the figure}
\end{marginfigure}

\begin{figure*}
    \begin{center}
        \includegraphics[width=0.23\textwidth]{example-image}
        \includegraphics[width=0.23\textwidth]{example-image}
        \includegraphics[width=0.23\textwidth]{example-image}
        \includegraphics[width=0.23\textwidth]{example-image}
    \end{center}
    \caption{Another caption}
\end{figure*}

\end{document}

生产

在此处输入图片描述

我正在寻找避免图形重叠的建议。我希望有一个解决方案,它不涉及添加固定数量的垂直空间,而是可以适应文本足够多而不需要任何空白垂直空间的情况。

我试过了,\usepackage{marginfix}但是没有成功。

答案1

第一个选项:将文本行放在足够高度的小页面内,以使其与边距中的图形对齐:

\begin{minipage}[c][4cm][c]{\textwidth}
    Some text, but less than the height of the margin figure.
\end{minipage}

A

第二种选择:figure*使用浮动位置说明符将其发送到页面顶部[!]

b

\documentclass[nobib]{tufte-book}
\usepackage{graphicx}
% avoid line breaks in inline math
% https://tex.stackexchange.com/a/14243/
\relpenalty=9999
\binoppenalty=9999

\begin{document}
    \mainmatter
    
Some text, but less than the height of the margin figure.

\begin{marginfigure}
    \includegraphics[width=\marginparwidth]{example-image-a}
    \caption{The caption of the figure}
\end{marginfigure}  

\begin{figure*}[!]
    \centering
        \includegraphics[width=0.23\textwidth]{example-image}
        \includegraphics[width=0.23\textwidth]{example-image}
        \includegraphics[width=0.23\textwidth]{example-image}
        \includegraphics[width=0.23\textwidth]{example-image}   
    \caption{Another caption}
\end{figure*}
\end{document}

相关内容