将两个具有不同高度的图像对齐到页面顶部 LaTeX
Put two images with different height aligned to the top of the page LaTeX
我想创建两栏页面的横向文档。
每页左侧有一个较大的图像(覆盖页面左侧的部分较少并与页面顶部对齐),右侧有较小的图像,覆盖右侧约 1/3页面,与顶部对齐,下面有一些描述
\documentclass{book}
\usepackage[landscape]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\noindent
\begin{minipage}{0.49\linewidth}
\centering
\includegraphics[width=\linewidth]{image-3x4}
\captionof{figure}{Example picture proportion 3:4}
\end{minipage}
\hspace{0.01\textwidth}
\begin{minipage}{0.49\linewidth}
\centering
\includegraphics[width=\linewidth]{image-3x1}
\captionof{figure}{Example picture proportion 3:1}
Some extra description on the right side
\end{minipage}
\end{document}
实际输出:
期望的输出:
如何根据需要创建并排对齐到页面顶部的两张图片?
您可以使用valign
键(需要adjutsbox
包):
\documentclass{book}
\usepackage[landscape]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\begin{document}
\noindent
\begin{minipage}[t]{0.49\linewidth}
\centering
\includegraphics[width=\linewidth,valign=t]{example-image-duck}
\captionof{figure}{Example picture proportion 3:4}
\end{minipage}
\hspace{0.01\textwidth}
\begin{minipage}[t]{0.49\linewidth}
\centering
\includegraphics[width=\linewidth,height=1cm,valign=t]{example-image-duck}
\captionof{figure}{Example picture proportion 3:1}
Some extra description on the right side
\end{minipage}
\end{document}
我想创建两栏页面的横向文档。 每页左侧有一个较大的图像(覆盖页面左侧的部分较少并与页面顶部对齐),右侧有较小的图像,覆盖右侧约 1/3页面,与顶部对齐,下面有一些描述
\documentclass{book}
\usepackage[landscape]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\noindent
\begin{minipage}{0.49\linewidth}
\centering
\includegraphics[width=\linewidth]{image-3x4}
\captionof{figure}{Example picture proportion 3:4}
\end{minipage}
\hspace{0.01\textwidth}
\begin{minipage}{0.49\linewidth}
\centering
\includegraphics[width=\linewidth]{image-3x1}
\captionof{figure}{Example picture proportion 3:1}
Some extra description on the right side
\end{minipage}
\end{document}
实际输出:
期望的输出:
如何根据需要创建并排对齐到页面顶部的两张图片?
您可以使用valign
键(需要adjutsbox
包):
\documentclass{book}
\usepackage[landscape]{geometry}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\begin{document}
\noindent
\begin{minipage}[t]{0.49\linewidth}
\centering
\includegraphics[width=\linewidth,valign=t]{example-image-duck}
\captionof{figure}{Example picture proportion 3:4}
\end{minipage}
\hspace{0.01\textwidth}
\begin{minipage}[t]{0.49\linewidth}
\centering
\includegraphics[width=\linewidth,height=1cm,valign=t]{example-image-duck}
\captionof{figure}{Example picture proportion 3:1}
Some extra description on the right side
\end{minipage}
\end{document}