底部的環繞圖 - 環繞圖下方沒有空白

底部的環繞圖 - 環繞圖下方沒有空白

我想在書的左側或右側放置一些圖形,從而減少文字的列寬。所以我使用的wrapfigure環境是窄線數為40。但是,我希望圖形位於底部,空白位於圖形上方。如何才能認識這一點呢?

\begin{wrapfigure}[40]{O}{0.4\textwidth}
  \includegraphics[width=0.4\textwidth]{Fig3-Givonis-bioclimaticchart}
  \caption[Givoni's bioclimatic chart for four representative climate zones of Nepal]
    {Givoni's bioclimatic chart for four representative climate zones of Nepal}
  \label{fig:Fig3-Givonis-bioclimaticchart}
\end{wrapfigure}

在此輸入影像描述

答案1

如果您將其\parbox提高,則它將無法適合頁面。

\documentclass{book}
\usepackage{wrapfig}
\usepackage{mwe}

\begin{document}
\setcounter{page}{2}
\begin{wrapfigure}{O}{0.4\textwidth}
  \parbox[b][\dimexpr \textheight-\baselineskip][b]{0.4\textwidth}{%
    \includegraphics[width=0.4\textwidth,height=0.6\textheight]{example-image}
    \caption{caption}}
\end{wrapfigure}

\lipsum[1-4]
\end{document}

完整頁面


另一種方法是使用paracol。

\documentclass{book}
\usepackage{paracol}
\usepackage{caption}
\usepackage{mwe}

\begin{document}
\setcounter{page}{2}
\setcolumnwidth{{\dimexpr 0.6\textwidth-\columnsep},0.4\textwidth}
\twosided[c]
\begin{paracol}{2}
  \sloppy
  \lipsum[1-4]
\switchcolumn
  \vspace*{\fill}
  \noindent\includegraphics[width=0.4\textwidth,height=0.6\textheight]{example-image}
  \captionof{figure}{caption}
  \newpage
\end{paracol}
\end{document}

答案2

這種方法用於tikzpagenodes將圖像放置在頁面底部。每個段落都必須進行重疊測試並進行調整。向上或向下移動文本,您必須重新做一遍。

\documentclass{article}
\usepackage{caption}
\usepackage{tikzpagenodes}
\usepackage{mwe}

\newlength{\overlap}

\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node[above right,inner sep=0pt] at (current page text area.south west) {%
\begin{minipage}{0.4\textwidth}
  \includegraphics[width=\textwidth,height=4.5in]{example-image}
  \captionof{figure}{caption}
\end{minipage}};
\end{tikzpicture}

\overlap=\dimexpr 0.4\textwidth + \columnsep\relax% for example

\lipsum[1]% no overlap
\hangindent=\overlap
\hangafter=3
\lipsum[2]% 3 lines before overlap
\leftskip=\overlap
\lipsum[3]% paragraph completely overlapped
\leftskip=0pt
\hangindent=\overlap
\hangafter=-5
\lipsum[4]% 5 lines vefore end of page
\end{document}

完整頁面

相關內容