文字在乳胶中的数字

时间:2011-06-01 06:59:08

标签: latex pdflatex

我想在我的乳胶代码中添加一个简单的图。我有这个代码:

\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.

2 个答案:

答案 0 :(得分:1)

您可以使用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 site处提出这类问题。

答案 1 :(得分:0)

你可能只想要像

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