将句子置于图表的中心吗?

将句子置于图表的中心吗?

我在目录开头添加“图”字时遇到了问题。然而这里有一个冲突。在此处输入图片描述

我希望它看起来像这样;

在此处输入图片描述

我在这里使用了以下代码;

我更换了

\listoffigures

{%
\let\oldnumberline\numberline%

\renewcommand{\numberline}{\figurename~\oldnumberline}%

\listoffigures%

}

此外,我的图形代码如下。

\begin{figure}[htpb]

\begin{center}

\includegraphics[width=0.8\columnwidth]{driscoll.png}

\end{center}

\caption{Three algebraic habits of mind}

\label{fig:driscoll.png}

\end{figure}

好的,我尝试采用 tocloft 包,但我不明白如何更改我的图形代码?

我的代码看起来像这样;

\documentclass[a4paper,onesided,12pt]{report}

\usepackage{styles/fbe_tez}

\usepackage[utf8x]{inputenc} % To use Unicode (e.g. Turkish) characters

\renewcommand{\labelenumi}{(\roman{enumi})}

\usepackage{amsmath, amsthm, amssymb}

 % Some extra symbols

\usepackage[bottom]{footmisc}

\usepackage{cite}

\usepackage{graphicx}

\usepackage{longtable}

\graphicspath{{figures/}} % Graphics will be here

\usepackage{multirow}

\usepackage{subfigure}

\usepackage{algorithm}

\usepackage{algorithmic}

%\pagestyle{empty}

%\includeonly{introduction} % To only process the given file

\usepackage{array}

\usepackage{caption} 

\captionsetup[table]{skip=10pt}

\usepackage{enumitem}

\usepackage{slashbox}

\usepackage{graphics}

\usepackage{adjustbox}

\usepackage[labelsep=period]{caption}

\usepackage{float}

\usepackage{wrapfig}

\usepackage{lscape}

\usepackage{rotating}

\usepackage[utf8x]{inputenc} 

\usepackage{longtable}

\usepackage{multirow}

\usepackage{array}

\usepackage{calc}

\usepackage{booktabs}

\usepackage{array,longtable}

\usepackage{graphicx}

\usepackage{afterpage}


\begin{document}

\tableofcontents

\listoffigures

\listoftables

\begin{figure}[htpb]

\begin{center}

\includegraphics[width=0.8\columnwidth]{driscoll.png}

\end{center}

\caption{Three algebraic habits of mind}

\label{fig:driscoll.png}

\end{figure}

But, I need to change it to;

\begin{figure}[!ht]

\centering

\rule{2cm}{2cm}

\caption{test figure one}

\label{fig:test1}

\end{figure}

\end{document}

如何将我的代码改为这个?

答案1

假设没有关于 TOC、LOF 或 LOT 的设置fbe_tez.sty(我们没有此包),这里有两个建议。请注意,我已删除与此问题无关的所有包。

带包装tocbasic

\documentclass[a4paper,12pt]{report}
\usepackage{graphicx}

\usepackage{tocbasic}
\DeclareTOCStyleEntry[
  entrynumberformat=\entrynumberwithprefix{\figurename},
  dynnumwidth,
  numsep=1em
]{tocline}{figure}
\DeclareTOCStyleEntry[
  entrynumberformat=\entrynumberwithprefix{\tablename},
  dynnumwidth,
  numsep=1em
]{tocline}{table}
\newcommand\entrynumberwithprefix[2]{#1\enspace#2:\hfill}

\usepackage{blindtext}% only for dummy text

\begin{document}

\tableofcontents
\listoffigures
\listoftables

\chapter{A chapter}
\begin{figure}[htpb]
\centering
\includegraphics[width=.8\columnwidth]{example-image}
\caption{Three algebraic habits of mind}
\label{fig:driscoll.png}
\end{figure}

But, I need to change it to;

\begin{figure}[htbp]
\centering
\includegraphics[width=.8\columnwidth]{example-image}
\caption{\blindtext}
\label{fig:test1}
\end{figure}

\Blinddocument
\end{document}

运行三次得到:

在此处输入图片描述

或者包裹tocloft正如已经建议的那样这里

\documentclass[a4paper,12pt]{report}
\usepackage{graphicx}

\usepackage[titles]{tocloft}
\newlength{\mylen}

\renewcommand{\cftfigpresnum}{\figurename\enspace}
\renewcommand{\cftfigaftersnum}{:}
\settowidth{\mylen}{\cftfigpresnum\cftfigaftersnum}
\addtolength{\cftfignumwidth}{\mylen}

\renewcommand{\cfttabpresnum}{\tablename\enspace}
\renewcommand{\cfttabaftersnum}{:}
\settowidth{\mylen}{\cfttabpresnum\cfttabaftersnum}
\addtolength{\cfttabnumwidth}{\mylen}

\usepackage{blindtext}% only for dummy text

\begin{document}

\tableofcontents
\listoffigures
\listoftables

\chapter{A chapter}
\begin{figure}[htpb]
\centering
\includegraphics[width=.8\columnwidth]{example-image}
\caption{Three algebraic habits of mind}
\label{fig:driscoll.png}
\end{figure}

But, I need to change it to;

\begin{figure}[!ht]
\centering
\includegraphics[width=.8\columnwidth]{example-image}
\caption{\blindtext}
\label{fig:test1}
\end{figure}

\Blinddocument
\end{document}

结果:

在此处输入图片描述


补充说明:

没有类别选项onesided。也许你想要oneside,但这是默认的report

不要加载两次包,例如,,,graphicx。如果加载则不需要。arraylongtableinputencgraphicxgraphics

不要center在浮点数中使用环境。请改用开关\centering

相关内容