早上好,
我想将图片水平放置在表格的左侧。
当我尝试此解决方案不起作用。改变的是图片和表格对齐,左边距垂直对齐,两个标题保持居中。
我似乎根本做不到,有人可以帮忙吗?
提前致谢。
代码如下:
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.50]{uniformity_machine.PNG}
\caption{Uniformity machine}
\label{fig:uniformitymachine}
\end{center}
\end{figure}
{\centering \hfill
\begin{table}[h]
\centering
\begin{tabular}{| c | c |c | }
\hline
\small
\textbf{Parameter} & \textbf{Value} & \textbf{Unit} \\
\hline
Dimension (wxdxh) & 1 725x2 800x2 500 & mm \\
\hline
Weight & 3 100 & kg\\
\hline
Rim diameter & 13 - 25 & in\\
\hline
\multirow{3}{*}{Electrical requirements} & 3 & Phase\\
& 400 & V \\
& 50 & Hz \\
& 35 & A \\
\hline
Pneumatic requirements & 600 & kPa\\
\hline
Cycle time & 20 & s\\
\hline
Cost & NUMBER & EUR \\
\hline
\end{tabular}
\caption{Uniformity machine specifications}\label{tab2}
\end{table}
\hfill}
现在的情况如下:
答案1
我怀疑您的表格和图像是否能并排放置,除非您减小边距大小或重新调整表格布局。
\documentclass{article}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage[hmargin=2cm]{geometry}
\begin{document}
\noindent%
\begin{minipage}{.45\textwidth}%
\includegraphics[width=\textwidth]{example-image-duck}
\captionof{figure}{Uniformity machine}
\label{fig:uniformitymachine}
\end{minipage}%
\hfill
\begin{minipage}{.5\textwidth}
\centering
\begin{tabular}{| c | c | c | }
\hline
\textbf{Parameter} & \textbf{Value} & \textbf{Unit} \\
\hline
Dimension (wxdxh) & 1 725x2 800x2 500 & mm \\
\hline
Weight & 3 100 & kg\\
\hline
Rim diameter & 13 - 25 & in\\
\hline
\multirow{3}{*}{Electrical requirements} & 3 & Phase\\
& 400 & V \\
& 50 & Hz \\
& 35 & A \\
\hline
Pneumatic requirements & 600 & kPa\\
\hline
Cycle time & 20 & s\\
\hline
Cost & NUMBER & EUR \\
\hline
\end{tabular}
\captionof{table}{Uniformity machine specifications}
\label{tab2}
\end{minipage}
\end{document}
答案2
您可以使用以下floatrow
环境:
\documentclass{book}
\usepackage{geometry}
\usepackage{subcaption, floatrow, multirow, graphicx}
\begin{document}
\begin{figure}[!ht]
\centering\CenterFloatBoxes
\floatsetup{floatrowsep = qquad}
\begin{floatrow}[2]
\ffigbox[\FBwidth]{\caption*{Konrad Klapheck: \emph{Les Liaisons Dangereuses} (1968)}}{\includegraphics[scale=0.35]{klapheck1}}
\killfloatstyle
\ttabbox{ \begin{tabular}{| c | c |c | }
\hline
\small
\textbf{Parameter} & \textbf{Value} & \textbf{Unit} \\
\hline
Dimension (wxdxh) & 1 725x2 800x2 500 & mm \\
\hline
Weight & 3 100 & kg\\
\hline
Rim diameter & 13 - 25 & in\\
\hline
\multirow{3}{*}{Electrical requirements} & 3 & Phase\\
& 400 & V \\
& 50 & Hz \\
& 35 & A \\
\hline
Pneumatic requirements & 600 & kPa\\
\hline
Cycle time & 20 & s\\
\hline
Cost & NUMBER & EUR \\
\hline
\end{tabular}}{ \caption{Uniformity machine specifications}\label{tab2}}
\end{floatrow}
\end{figure}
\end{document}