
이 질문에 추가 사항이 있습니다.두 인물이 나란히.
높이가 일정하지 않은 두 장의 사진이 있다고 가정해 보겠습니다. 나는 방법을 찾고 있다~ 아니다subfig
캡션을 수직으로 정렬하면서 두 그림을 나란히 사용 하고 정렬합니다.
다음 예제를 만들었습니다.
\documentclass{article}
\title{Two Figures Side by Side}
\author{Little Bobby Tables}
\usepackage{lipsum}
\usepackage{tikz}
\newcommand{\exedout}{
\begin{tikzpicture}
\path node (LL) {}
++ (0.8\textwidth, 0.8\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}
}
\newcommand{\exedouttwo}{
\begin{tikzpicture}
\path node (LL) {}
++ (0.8\textwidth, 0.4\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}
}
\begin{document}
\maketitle
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\exedout
\caption{first figure but with more comments than the second picture to see what the different is.}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\centering\exedouttwo
\caption{second figure}
\end{minipage}
\end{figure}
\lipsum
\end{document}
다음과 같은 결과를 제공합니다.
하지만 나에게는 이것이 필요하다:
답변1
두 가지 모두 상단 기준선(예: 이미지 기준선/하단 선)에 정렬하려면 [t]
의 선택적 인수를 사용하세요 . 또한 소스 코드 줄 바꿈으로 인해 추가 공백이 삽입되는 것을 방지하기 위해 매크로에 s를 minipage
추가했습니다 .%
\documentclass{article}
\usepackage{lipsum}
\usepackage{tikz}
\newcommand{\exedout}{%
\begin{tikzpicture}
\path node (LL) {}
++ (0.8\textwidth, 0.8\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}%
}
\newcommand{\exedouttwo}{%
\begin{tikzpicture}
\path node (LL) {}
++ (0.8\textwidth, 0.4\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}%
}
\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}[t]{0.45\textwidth}
\centering\exedout
\caption{first figure but with more comments than the second picture to see what the different is.}
\end{minipage}
\begin{minipage}[t]{0.45\textwidth}
\centering\exedouttwo
\caption{second figure}
\end{minipage}
\end{figure}
\lipsum
\end{document}
답변2
사용 중floatrow
옵션?
\exedout
다음 예에서는 과 를 변경하여 두 그림을 더 좁게 만들었습니다. 변경 되지 않는 \exedouttwo
것처럼 보이 므로 두 그림이 너무 넓어집니다.ffigbox
\textwidth
minipage
\documentclass{article}
\title{Two Figures Side by Side}
\author{Little Bobby Tables}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{floatrow}
\newcommand{\exedout}{
\begin{tikzpicture}
\path node (LL) {}
++ (0.4\textwidth, 0.8\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}
}
\newcommand{\exedouttwo}{
\begin{tikzpicture}
\path node (LL) {}
++ (0.4\textwidth, 0.4\textheight) node (UR) {}
(LL -| UR) node (LR) {}
(LL |- UR) node (UL) {};
\draw (LL) rectangle (UR) (LL) -- (UR) (UL) -- (LR);
\end{tikzpicture}
}
\begin{document}
\maketitle
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}
\begin{floatrow}
\ffigbox{\caption{first figure but with more comments than the second picture to see what the different is.}}{\exedout}
\ffigbox{\caption{second figure}}{\exedouttwo}
\end{floatrow}
\end{figure}
\lipsum
\end{document}