将小页面排列在不同的行中

将小页面排列在不同的行中

我创建了以下 LaTeX 文档:

\documentclass[22pt, letterpaper]{article}
\usepackage{graphicx}
\usepackage{babel,blindtext}
\usepackage{xcolor}

\usepackage{ifxetex,ifluatex}
\if\ifxetex T\else\ifluatex T\else F\fi\fi T%
  \usepackage{fontspec}
\else
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{lmodern}
\fi

\usepackage{hyperref}

\title{Title of Document}
\author{Name of Author}

\fboxsep=1mm
\fboxrule=1pt

\begin{document}
\maketitle
\noindent \blindtext

\begin{figure}[h]
  \centering
      \makebox[\textwidth]{\makebox[1.25\textwidth]{%
      \begin{minipage}{.6\textwidth}
          \centering
          \includegraphics[width=0.95\linewidth]{example-image}
          \caption{A really Awesome Image}\label{fig:awesome_image1}
      \end{minipage}\hfill
      \begin{minipage}{.6\textwidth}
          \centering
          \includegraphics[width=0.95\linewidth]{example-image}
          \caption{A really Awesome Image}\label{fig:awesome_image1}
      \end{minipage}\hfill
      \begin{minipage}{.6\textwidth}
          \centering
          \includegraphics[width=0.95\linewidth]{example-image}
          \caption{A really Awesome Image}\label{fig:awesome_image1}
      \end{minipage}}}
\end{figure}

\end{document}

这将生成如下图所示的地块排列:

在此处输入图片描述

因此,使用上述方法,我将所有图放在一行中。有没有办法将第三个图放在下一行,同时将前两个图保留在第一行?

谢谢您的指点。

答案1

的主要功能\makebox是制作一个水平框,防止换行,因此大多数情况下你只需要将其删除,我添加了一些负空间以允许图像渗入边缘。

在此处输入图片描述

\documentclass[12pt, letterpaper]{article}% there is no 22pt option
\usepackage{graphicx}
\usepackage{babel,blindtext}
\usepackage{xcolor}

% legacy packages \usepackage{ifxetex,ifluatex}
\usepackage{iftex}

\iftutex
  \usepackage{fontspec}
\else
  \usepackage[T1]{fontenc}
  \usepackage{lmodern}
\fi

\usepackage{hyperref}

\title{Title of Document}
\author{Name of Author}

\fboxsep=1mm
\fboxrule=1pt

\begin{document}
\maketitle
\noindent \blindtext

\begin{figure}[htp]% 
\centering
  \hspace*{-.1\textwidth}%
      \begin{minipage}{.6\textwidth}
          \centering
          \includegraphics[width=0.95\linewidth]{example-image.png}
          \caption{A really Awesome Image}\label{fig:awesome_image1}
      \end{minipage}%
      \begin{minipage}{.6\textwidth}
          \centering
          \includegraphics[width=0.95\linewidth]{example-image.png}
          \caption{A really Awesome Image}\label{fig:awesome_image2}
      \end{minipage}%
  \hspace*{-.1\textwidth}%

\bigskip

      \begin{minipage}{.6\textwidth}
          \centering
          \includegraphics[width=0.95\linewidth]{example-image.png}
          \caption{A really Awesome Image}\label{fig:awesome_image3}
      \end{minipage}
\end{figure}

\end{document}

相关内容