Fonts & Character SetsChanging the font name of captions

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
simeon.mattes
Posts: 2
Joined: Mon Dec 22, 2008 11:56 am

Changing the font name of captions

Post by simeon.mattes »

Hi everybody,

I want to change the font of the captions to helvetica. I have found that \DeclareCaptionFormat can do this. Though, I have a little problem. The language I write the text is Greek and I get an error.

Code: Select all

\documentclass{report}
\usepackage{caption}
\usepackage{lipsum}%just to generate some text

\usepackage[english,greek]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

\DeclareCaptionFormat{myformat}{\fontfamily{phv}\selectfont#1#2#3\par}
\captionsetup{format=myformat,font=small,labelfont=bf}

\begin{document}
\selectlanguage{english}
\lipsum[1]

\begin{figure}[!ht]
  \caption{{\selectlanguage{greek} Αυτό είναι μί απικεφαλίδα}}
\end{figure}

\lipsum[1]
\end{document}

And the error is:

Code: Select all

./test.tex:17:Font LGR/phv/m/n/9=grar9 at 9.0pt not loadable: Metric (TFM) file not found. ...� είναι μί απικεφαλίδα}}
Could anyone help me?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply