
我正在使用caption
包來自定義論文中的標題。我目前的程式碼是:
\usepackage[width=0.6\textwidth ,font={small, sf,it},labelfont=bf,
labelsep=endash, format=plain,labelsep=period]{caption}
但我想為標題標籤添加顏色。如下圖所示: 說明文字http://img24.ir/uploads/1365940937491.png
答案1
標題文件第 25 頁提供了這樣的範例。
\usepackage{xcolor}
\DeclareCaptionFont{blue}{\color{blue}}
\captionsetup{labelfont={blue,bf}}
正如 Axel Sommerfeld 所提到的,以下內容也將起作用:
\usepackage{xcolor}
\captionsetup{labelfont={color=blue,bf}}
這是一個小例子:
\documentclass[10pt]{article}
\usepackage{xcolor}
\usepackage[width=0.6\textwidth ,font={small, sf,it},labelfont={color=blue,bf},
labelsep=endash, format=plain,labelsep=period]{caption}
\begin{document}
\begin{figure}
\caption{Eiffel Tower, Paris}
\end{figure}
\end{document}