如何禁用子图乳胶包装中的缩放比例?

雅各布·雅各布森13

我有一些具有不同图像宽度的化学结构。由于可以按主题对它们进行分组,因此我想将它们放在带有子图的同一图形中。但是,我想以原始尺寸显示图像,并且希望对它们应用任何缩放比例。

使用子图或子标题或任何类似的包很容易做到这一点吗?

我使用图像宽度手动计算缩放比例。但是,这不是很方便,因此我正在寻找一种自动解决方案。

\begin{figure}
  \begin{subfigure}{0.4\textwidth}
    \input{width_2cm.pdf}
  \end{subfigure}
  \begin{subfigure}{0.6\textwidth}
    \input{width_3cm.pdf}
  \end{subfigure}
\end{figure}
samcarter_is_at_topanswers.xyz

如果您只想将图像彼此并排放置,则根本不需要subfigure

\documentclass{article}

\usepackage{graphicx}
\usepackage{geometry}

\begin{document}

\begin{figure}
  \includegraphics[scale=1]{example-image-1x1}
  \hfill
  \includegraphics[scale=1]{example-image-duck}
\end{figure}


\end{document}

(这[scale=1]是默认设置,为清楚起见,我只添加了它)

或带有字幕:

\documentclass{article}

\usepackage{graphicx}
\usepackage{geometry}
\usepackage{subcaption}

\begin{document}

\begin{figure}
      \centering
      \subcaptionbox{A cat\label{cat}}
        {\includegraphics[scale=1]{example-image-1x1}}
        \hfill
      \subcaptionbox{An elephant\label{elephant}}
        {\includegraphics[scale=1]{example-image-duck}}
      \caption{Two animals}\label{animals}
\end{figure}



\end{document}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章