重新缩放 png

重新缩放 png
 \documentclass{exam}
 \usepackage{graphicx} % Required for inserting images
\usepackage{tikz}

\begin{document}

\begin{questions}   
 \begin{tabular}{ c c }
  \includegraphics{Questions/car.png}[scale=\factor , scale= 0.2]  & 
 \includegraphics{Questions/car.png}[scale=\factor , scale= 0.2] \\
  \includegraphics{Questions/car.png}[scale=\factor , scale= 0.2] & 
\includegraphics{Questions/car.png}[scale=\factor , scale= 0.2] \\
   \includegraphics{Questions/car.png}[scale=\factor , scale= 0.2] &  \\
 \end{tabular}
 (Monday)

\end{questions}

\end{document}

我知道可以调整图像本身的大小,但我不明白为什么缩放不起作用,有什么帮助吗?抱歉,我知道图像在我的计算机上无法正常工作,但通用代码可供人们参考是否足够。

答案1

scale=...我不会使用选项来设置图像的宽度,而是使用width=...选项。例如,

\documentclass{exam}

\usepackage[demo]{graphicx} % remove 'demo' option in real document
\usepackage{tabularx} % for 'tabularx' environment and 'X' column type

\begin{document}

\noindent
\begin{tabularx}{\linewidth}{@{} XX @{}}
\includegraphics[width=\hsize]{Questions/car.png}  & 
  \includegraphics[width=\hsize]{Questions/car.png} \\[3ex] % extra vertical whitespace
\includegraphics[width=\hsize]{Questions/car.png} & 
  \includegraphics[width=\hsize]{Questions/car.png} \\[3ex] % extra vertical whitespace
\includegraphics[width=\hsize]{Questions/car.png} &  
\end{tabularx}

\end{document}

相关内容