使用像 MWE 中的 \Question 环境,问题编号可以与表格顶部对齐吗?

使用像 MWE 中的 \Question 环境,问题编号可以与表格顶部对齐吗?
\documentclass{book}
%
\usepackage[fleqn]{amsmath} %
\usepackage{amsthm,amssymb} %
\usepackage[nottoc]{tocbibind} %
\usepackage[english]{babel} %
\usepackage{tikz} % tikz - essential
\usepackage{newtxmath} % darkens and boldens the Greek fonts
\usepackage{setspace} % 
\usepackage{enumerate} % 
\usepackage{enumitem} %
\usepackage{xcolor}
\usepackage{colortbl} % canged to just colortbl
\usepackage[utf8]{inputenx}
\usepackage{newunicodechar} % unit of degree
\usepackage{float}
\usepackage{array}
\usepackage{subfloat}
\usepackage[paperwidth=170mm,paperheight=240mm,textwidth=132mm,lmargin=12.5mm,rmargin=12.5mm,bindingoffset=12.5mm,noheadfoot,nomarginpar,showframe,showcrop]{geometry} % 
\usepackage[a4,frame,cam,center]{crop}
\usepackage{times}
\usepackage{textcomp} %
\usepackage[lastexercise, answerdelayed]{exercise}
%
\renewcounter{Exercise}[chapter] % Reset exercise counter every chapter
\renewcounter{Answer}[chapter]
\newcounter{Problem}[chapter]
%
\graphicspath{ {book_questions/images/} }
%
\begin{document}

\setstretch{1.2}
\begin{Exercise}[label={chap_02_exer_02},name={A question needing a diagram}]

\Question{A photograph measuring \hspace{0.8pt}$8$\hspace{0.8pt}cm \hspace{0.8pt}by \hspace{0.8pt}$6$\hspace{0.8pt}cm \hspace{0.8pt}is enlarged so the the area is doubled\hspace{0.8pt}. \\ Find the dimensions of the enlargement\hspace{0.6pt}.}

\Question{
\begin{tabular}{cc}
\parbox{0.55\textwidth}{

\noindent This layout produces a question number

\noindent which is centred vertically relative to the

\noindent table (or the figure).\vspace{6pt}

\noindent Can the the numbering be forced to be level 

\noindent with the first line of text as in the previous

\noindent question?
}
&
\begin{minipage}{0.3\textwidth}
    \begin{figure}[H]
        \includegraphics[width=1\textwidth]{../my_book/book_questions/fig_01_piston_accel}
    \end{figure}
\end{minipage}
\end{tabular} }

\end{Exercise}

\end{document}

答案1

adjustbox这是带有和密钥的代码valign。我从您的代码中删除了colortbl,它是使用xcolor选项加载的[table]。请注意 的语言选项babel,因为版本3.10应该与文档类一起加载,以确保所有依赖于语言的包都知道文档的语言。此外,enumerate不应使用 加载enumitem。由于 enumitem 可以完成 enumerate 所做的一切(以及更多……),我将其删除。

\documentclass[english, table, demo]{book}
%
\usepackage[fleqn]{amsmath} %
\usepackage{amsthm,amssymb} %
\usepackage[nottoc]{tocbibind} %
\usepackage{babel} %
\usepackage{tikz} % tikz - essential
\usepackage{newtxmath} % darkens and boldens the Greek fonts
\usepackage{setspace} %
\usepackage{enumitem} %
\usepackage[table]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar} % unit of degree
\usepackage{float}
\usepackage{array}
\usepackage{adjustbox}
\usepackage{subfloat}
\usepackage[paperwidth=170mm, paperheight=240mm, textwidth=132mm, lmargin=12.5mm, rmargin=12.5mm, bindingoffset=12.5mm, noheadfoot, nomarginpar, showframe, showcrop]{geometry} %
\usepackage[a4,frame,cam,center]{crop}
\usepackage{times}
\usepackage{textcomp} %
\usepackage[lastexercise, answerdelayed]{exercise}
%
\renewcounter{Exercise}[chapter] % Reset exercise counter every chapter
\renewcounter{Answer}[chapter]
\newcounter{Problem}[chapter]
%
\graphicspath{ {book_questions/images/} }
%
\begin{document}

\setstretch{1.2}
\begin{Exercise}[label={chap_02_exer_02},name={A question needing a diagram}]

\Question{A photograph measuring \hspace{0.8pt}$8$\hspace{0.8pt}cm \hspace{0.8pt}by \hspace{0.8pt}$6$\hspace{0.8pt}cm \hspace{0.8pt}is enlarged so the the area is doubled\hspace{0.8pt}. \\ Find the dimensions of the enlargement\hspace{0.6pt}.}

\Question{
\begin{tabular}[t]{@{}p{0.55\textwidth}p{0.3\textwidth}@{}}
\everypar{\noindent}
 This layout produces a question number which is centred vertically relative to the table (or the figure).\vspace{6pt}

 Can the the numbering be forced to be level with the first line of text as in the previous question?
&
        \adjincludegraphics[width=1\linewidth, valign = t, raise = -1.2ex]{../my_book/book_questions/fig_01_piston_accel}
\end{tabular} }

\end{Exercise}

\end{document}

在此处输入图片描述

相关内容