问题描述
|
我试图在我的乳胶代码中添加一个简单的数字。我有以下代码:
\\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.
解决方法
您可以使用
center
环境进行居中,将其环绕在图像框和标题周围:
\\begin{figure}[h!]
\\begin{center}
\\resizebox{40pt}{!}{\\includegraphics{FigureStereo.jpg}}
\\caption{Epipolar Geometry}
\\label{fig:cclogo}
\\end{center}
\\end{figure}
但是请注意,LaTeX有时可能会很固执,因为它如何布局涉及浮动元素的页面。 h
选项更是一种指导,而非保证。在某些情况下,最好不要使用浮动的“ 5”环境,而是直接插入图形和文本。
另外,最好还是在TeX StackExchange网站上询问此类问题。
, 您可能只想要类似
\\开始{图} [t]
\\ centerline {\\ includegraphics [width = \\ columnwidth] {figs / foo}}
\\标题{标题在这里}
\\ label {fig:cclogo}
\\结束{图}