세 개의 이미지를 정렬

세 개의 이미지를 정렬

다음과 같이 두 개의 열 문서에 세 개의 그림을 정렬해야 합니다.

그림 배열

답변1

코멘트

개별/주요 캡션 및/또는 참조에 대해 알려주지 않았습니다. 나도 그걸 넣기로 결정했다.

기본 아이디어

  1. 2열 문서 [twocolumn]의 경우 \documentclass.

  2. 2열 테이블(외부 테이블)을 만듭니다. 첫 번째 열에 또 다른 단일 열 테이블을 넣습니다. 처음 두 이미지(A와 B)를 내부 테이블의 두 행으로 배치합니다. 세 번째 이미지(B)를 외부 테이블의 두 번째 열에 넣습니다.

  3. 사용 subcaption캡션과 라벨을 관리하는 데 . (이것답변도움이 됩니다.)

해결책

\documentclass[twocolumn]{article}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\usepackage{lipsum} % For dummy text only

\begin{document}

\begin{figure}[!t]
  \begin{tabular}[b]{cc}
    \begin{tabular}[b]{c}
      \begin{subfigure}[b]{0.4\columnwidth}
        \includegraphics[width=\textwidth]{A.png}
        \caption{A.}
        \label{fig:A}
      \end{subfigure}\\
      \begin{subfigure}[b]{0.4\columnwidth}
        \includegraphics[width=\textwidth]{B.png}
        \caption{B.}
        \label{fig:B}
      \end{subfigure}
    \end{tabular}
    &
    \begin{subfigure}[b]{0.4\columnwidth}
      \includegraphics[width=\textwidth]{C.png}
      \caption{C.}
      \label{fig:C}
    \end{subfigure}
  \end{tabular}
  \label{fig:ABC}
  \caption{A, B and C.}
\end{figure}

\lipsum[1-5]

\end{document}

출력

여기에 이미지 설명을 입력하세요

추가 조정

0.4\columnwidth이미지 크기를 조정하려면 s를 변경하세요 . 상자가 너무 가득 차 있는지 확인하세요.

답변2

귀하의 질문에는 두 가지 다른 부분이 포함된 것 같습니다.

  1. 2열 문서를 만드는 방법
  2. 두 개의 열로 그림을 정렬하는 방법

1.에 대한 대답은 twocolumn다음의 옵션을 사용하는 것입니다.article 활용하는 것입니다 .

2.에 대한 답은 minipage환경을 활용하는 것입니다.

\documentclass[twocolumn]{article}

\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\begin{figure}[h!]
\begin{minipage}{0.48\columnwidth}
\includegraphics[width=\columnwidth,height=4cm]{triangle}
\\[3mm]
\includegraphics[width=\columnwidth,height=4cm]{triangle}
\end{minipage}
\begin{minipage}{0.48\columnwidth}
\includegraphics[width=\columnwidth,height=83mm]{triangle}
\end{minipage}
\end{figure}

\lipsum[1-7]

\end{document}

여기에 이미지 설명을 입력하세요

파일 을 생성하는 코드는 triangle.pdf다음과 같습니다.

\documentclass{standalone}

\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\draw[fill=green!20] (0,0) -- (1,1) -- (1,0) -- cycle;
\end{tikzpicture}
\end{document}

관련 정보