![`caption` パッケージで色を使用するにはどうすればよいでしょうか?](https://rvso.com/image/266434/%60caption%60%20%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8%E3%81%A7%E8%89%B2%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%3F.png)
私は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}