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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply