两个小页面顶部对齐一个与图

两个小页面顶部对齐一个与图

当一个页面仅包含图片时,如何使两个小页面顶部对齐?

\documentclass[10pt]{article}
\usepackage[a4paper, total={7.5in, 10in}]{geometry}
\usepackage{graphicx, epstopdf, amsmath, amssymb, amsfonts, array, titlesec, authblk,
    verbatim, url, subcaption, booktabs, multirow, fontawesome5, xcolor, tikz}
\begin{document}
\begin{minipage}[t]{.25\textwidth}
    \includegraphics[width=\textwidth]{example-image-a}
\end{minipage}
\begin{minipage}[t]{.75\textwidth}
    Hello World
\end{minipage}

\end{document}

这段代码给出了在此处输入图片描述

答案1

尝试这样做:

\documentclass[10pt]{article}
\usepackage[a4paper, total={7.5in, 10in}]{geometry}
\usepackage{graphicx, epstopdf, amsmath, amssymb, amsfonts, array, titlesec, authblk,
    verbatim, url, subcaption, booktabs, multirow, xcolor, tikz}
\begin{document}
\noindent\begin{minipage}[t]{.25\textwidth}\vspace{0pt}
    \includegraphics[width=\linewidth]{example-image-a}
\end{minipage}%
\begin{minipage}[t]{.75\textwidth}\vspace{0pt}
    Hello World
\end{minipage}

\end{document}

相关内容