平均能量损失

平均能量损失

我正在用 LaTeX 写论文,但标题有问题。我的论文中有图片和图表。根据学校规定,我必须添加以下标题:图片:“ Obr. XXX”,图表:“ Graf. XXX”。

我使用捷克语 babel。

图片显示正确,但当我将图表作为图片包含时,如何更改此标题?我已尝试过,\newcommand\renewcommand使用这些命令,我​​已将所有标题从图片更改为图表。

编辑: 我的代码示例:

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

\usepackage[czech]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
...

\begin{document}
\begin{figure}[H]
\centering
\includegraphics[scale=1]{figure}
\caption{This is figure. Caption should be "Obr. 1 This is figure."}
\label{fig:figure}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[scale=1]{graph}
\caption{This is graph. Caption should be "Graf. 1 This is graph."}
\label{fig:graph}
\end{figure}
\end{document}

答案1

您可以使用newfloatgraph包来为图形创建浮动环境。

平均能量损失

\documentclass[a4paper,12pt, hidelinks]{report}
\usepackage[czech]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{mwe} % for 'example-image'
\usepackage{newfloat}
\DeclareFloatingEnvironment{graph}
\addto\captionsczech{%
  \renewcommand{\graphname}{Graf.}%
  \renewcommand{\figurename}{Obr.}%
}

\begin{document}
\begin{figure}[H]
\centering
\includegraphics[scale=1]{example-image}
\caption{This is figure. Caption should be "Obr. 1 This is figure."}
\label{fig:figure}
\end{figure}

\begin{graph}[H]
\centering
\includegraphics[scale=1]{example-image}
\caption{This is graph. Caption should be "Graf. 1 This is graph."}
\label{fig:graph}
\end{graph}
\end{document}

输出

在此处输入图片描述

相关内容