乳胶中的文字覆盖图形

发布于 2024-11-13 07:42:17 字数 1486 浏览 3 评论 0原文

我正在尝试在我的乳胶代码中添加一个简单的数字。我有这个代码:

\begin{figure}[H]
 \resizebox{40pt}{!}{ 
\centering \includegraphics{FigureStereo.jpg}} 
\caption{Epipolar Geometry} 
\label{fig:cclogo} 
\end{figure}

但是文本出现在图像的顶部并且图像没有居中。我做错了什么?希望这不是一个重复的问题,因为我确实快速检查了相关帖子。 已编辑 这是序言

\documentclass[draftthesis,tocnosub,noragright,centerchapter,12pt,]{uiucecethesis09}


\makeatletter

\usepackage{setspace}
\usepackage{epsfig}  % for figures
\usepackage{graphicx}  % another package that works for figures
%\usepackage{subfigure}  % for subfigures
\usepackage{amsmath}  % for math spacing
%\usepackage{amssymb}  % for math spacing
%\usepackage{url}  % Hyphenation of URLs.
\usepackage{lscape}  % Useful for wide tables or figures.
\usepackage[justification=raggedright]{caption} % makes captions ragged right - thanks to Bryce Lobdell
\usepackage{float}
\usepackage{wrapfig}

% Uncomment the appropriate one of the following four lines:
\msthesis
%\phdthesis
%\otherdoctorate[abbrev]{Title of Degree}
%\othermasters[abbrev]{Title of Degree}

\title{}

\author{}
\department{}
\degreeyear{}

% Advisor name is required for
% - doctoral students for the ProQuest abstract
% - master's students who do not have a master's committee
\advisor{}

% Uncomment the \committee command for
% - all doctoral students
% - master's students who have a master's committee
%\committee{Professor Firstname Lastname, Chair\\
%        Professor Firstname Lastname} % etc.

I am trying to add a simple figure into my latex code .I have this code :

\begin{figure}[H]
 \resizebox{40pt}{!}{ 
\centering \includegraphics{FigureStereo.jpg}} 
\caption{Epipolar Geometry} 
\label{fig:cclogo} 
\end{figure}

with this however the text comes on top of the image and also image is not centered .What am I doing wrong?Hopefully this is not a repeated question coz I did do a quick check on related posts.
Edited
Here is the preamble

\documentclass[draftthesis,tocnosub,noragright,centerchapter,12pt,]{uiucecethesis09}


\makeatletter

\usepackage{setspace}
\usepackage{epsfig}  % for figures
\usepackage{graphicx}  % another package that works for figures
%\usepackage{subfigure}  % for subfigures
\usepackage{amsmath}  % for math spacing
%\usepackage{amssymb}  % for math spacing
%\usepackage{url}  % Hyphenation of URLs.
\usepackage{lscape}  % Useful for wide tables or figures.
\usepackage[justification=raggedright]{caption} % makes captions ragged right - thanks to Bryce Lobdell
\usepackage{float}
\usepackage{wrapfig}

% Uncomment the appropriate one of the following four lines:
\msthesis
%\phdthesis
%\otherdoctorate[abbrev]{Title of Degree}
%\othermasters[abbrev]{Title of Degree}

\title{}

\author{}
\department{}
\degreeyear{}

% Advisor name is required for
% - doctoral students for the ProQuest abstract
% - master's students who do not have a master's committee
\advisor{}

% Uncomment the \committee command for
% - all doctoral students
% - master's students who have a master's committee
%\committee{Professor Firstname Lastname, Chair\\
%        Professor Firstname Lastname} % etc.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我一向站在原地 2024-11-20 07:42:17

您可以使用 center 环境来居中,将其包裹在图像框和标题周围:

\begin{figure}[h!]
\begin{center}
\resizebox{40pt}{!}{\includegraphics{FigureStereo.jpg}}
\caption{Epipolar Geometry}
\label{fig:cclogo}
\end{center}
\end{figure}

但请注意,LaTeX 有时对于如何布局涉及浮动元素的页面非常顽固。 h 选项更多的是指导性的而非保证性的。在某些情况下,您可能最好不要使用浮动figure环境,而是直接插入图形和文本。

另外,您最好在 TeX StackExchange 站点 上提出此类问题。

You can use a center environment for centering, wrapping it around both the image box and the caption:

\begin{figure}[h!]
\begin{center}
\resizebox{40pt}{!}{\includegraphics{FigureStereo.jpg}}
\caption{Epipolar Geometry}
\label{fig:cclogo}
\end{center}
\end{figure}

Note, though, that LaTeX can sometimes be pretty stubborn about how it lays out pages where floating elements are concerned. The h option is more of a guideline than a guarantee. In some cases you might be better off not using a floating figure environment and instead inserting the graphics and text directly.

Also, you're better off asking this sort of question over at the TeX StackExchange site.

你与昨日 2024-11-20 07:42:17

你可能只是想要类似的东西

\begin{figure}[t]
\centerline{\includegraphics[width=\columnwidth]{figs/foo}}
\caption{Caption Goes Here}
\label{fig:cclogo}
\end{figure}

You probably just want something like

\begin{figure}[t]
\centerline{\includegraphics[width=\columnwidth]{figs/foo}}
\caption{Caption Goes Here}
\label{fig:cclogo}
\end{figure}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文