嵌套在 minipage 中的多列和图像的垂直对齐

嵌套在 minipage 中的多列和图像的垂直对齐

我一直在谷歌搜索并尝试 TeX Exchange 来寻找解决方案,但目前还找不到。我想将我的三列(I、II 和 III)移动到与我在小页面中包含的图像相同的高度。我尝试了几种方法,包括在声明中使用 {t T},并查看了调整框,但没有任何改进。任何帮助都将不胜感激。

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr, lastpage}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{multicol}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{parskip}
\usepackage{geometry}
 \geometry{
 left=.5in,
        right=.5in,
        top=1in,
        bottom=1in
 }
 \pagestyle{fancy}
 \chead{Topic 2.1 - 2.4 \\ The Definition of Derivative}
 \lhead{\large{Name:}\\ class period:}
 \rhead{AP Calculus BC \\ \textbf{Quiz 1}}
\lfoot{AP Calculus BC}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\rfoot{Mr. Bennett}

\setlength{\columnsep}{2cm}

\begin{document}

    \section*{Quiz 1 \\ Topics 2.1-2.4 \\ Definition of Derivative }

    \begin{tikzpicture}
        \node at (0,0)[draw,fill=black,text=white]{\textbf{Part I. Multiple Choice}};
    \end{tikzpicture}

Circle the best answer for each problem.  Each problem is worth 2 points.   

    \begin{tikzpicture}
        \node at (0,0) [draw]{\textbf{You have 20 minutes}};
    \end{tikzpicture}
        
\rule{0.9\textwidth}{.5pt}


    \begin{enumerate}           
        \item In the figure to the right, the graph of the function \(f\left(x\right)\) is shown.  Arrange these values from \emph{smallest} to \emph{largest}. \\
                
        \begin{minipage}[t]{0.7\textwidth}  
            \begin{multicols}{3}
                I.  \(\dfrac{f\left(1\right)-f\left(.25\right)}{\dfrac{3}{4}}\)
                II. \(\displaystyle\lim_{x\to 1}\dfrac{f\left(x\right)-f\left(1\right)}{x-1}\)
                III. \(f\left(2\right)-f\left(1\right)\)
            \end{multicols}
        \end{minipage}
        \begin{minipage}{0.3\textwidth}
            \includegraphics[width=2in]{graph1.png}
        \end{minipage}
            
                A. I, II, II  \\ 
                
                B. II, I, III \\
                
                C. III, I, II \\
                
                D. III, II, I \\
                        \rule{0.9\textwidth}{.5pt}      
    \end{enumerate}
\end{document}

答案1

抱歉,你的问题我不太清楚。规则应该在哪里以及多长?像这样吗?

在此处输入图片描述

(红色规则表示页面布局)

生成上述图像的 MWE 是:

\documentclass[11pt]{article}
\usepackage[hmargin=.5in,vmargin=1in]{geometry}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{multicol}
\usepackage{amsmath}
\usepackage[export, demo]{adjustbox}
\usepackage{enumitem}

\usepackage{pgfplots}
\pgfplotsset{compat=1.18}


\begin{document}

\section*{Quiz 1 \\ Topics 2.1-2.4 \\ Definition of Derivative }

    \begin{tikzpicture}
        \node[fill,text=white]{\textbf{Part I. Multiple Choice}};
    \end{tikzpicture}

Circle the best answer for each problem.  Each problem is worth 2 points.

\medskip
\textbf{You have 20 minutes}

\noindent\rule{\textwidth}{.5pt}

    \begin{enumerate}
\item   In the figure to the right, the graph of the function \(f\left(x\right)\) is shown.  Arrange these values from \emph{smallest} to \emph{largest}.

\medskip
     \begin{minipage}{0.7\linewidth}
        I.  \ \(\dfrac{f\left(1\right)-f\left(.25\right)}{\dfrac{3}{4}}\)\hfil
        II. \ \(\displaystyle\lim_{x\to 1}\frac{f\left(x\right)-f\left(1\right)}{x-1}\)\hfil
        III.\ \(f\left(2\right)-f\left(1\right)\)\qquad

    \begin{enumerate}[label=\textbf{\Alph*.},align=left, leftmargin=*]
    \item   I, II, II  
    \item   II, I, III 
    \item   III, I, II 
    \item   III, II, I 
        \end{enumerate}
    \end{minipage}\begin{minipage}{0.3\linewidth}
                          \includegraphics[width=\linewidth, valign=t]{graph1.png}
                  \end{minipage}
                    
\rule{\linewidth}{.5pt}

\item   Next question ...

\rule{\linewidth}{.5pt}
    \end{enumerate}
\end{document}

相关内容