6

How can I change the font of a specific sentence in LaTeX to Calligra. I don't want the whole document to be affected. Only a particular sentence.

I checked different fonts from here: http://www.tug.dk/FontCatalogue/allfonts.html

Then tried different commands (like below), but none of them worked.

{\fontfamily{Calligra}\selectfont the font is temporarily changed}

It seems that latex can not find the Calligra font.

5

Following the documentation of the calligra package at http://ctan.org/pkg/calligra, try this minimal example:

\documentclass{article}
\usepackage{calligra}
\usepackage[T1]{fontenc}
\begin{document}
Fee, fi, fo, fum.
{\calligra Foo bar bas; quux!}
\end{document}

Note that loading the package enables the \calligra command to change the font. The package also provides the \textcalligra{} command to set runs of text in that font. Either option is more convenient than loading the font yourself.

If you want to load the font yourself however, try \fontfamily{calligra}, with the font name in lowercase. (Take a look at how the package loads the font for an example; or see Herbert’s answer for details.)

If these don't work, then perhaps the font package is not installed. It is available under both MiKTeX and TeX Live; see your distribution’s instructions for installing packages.

5

without loading the package you have to define the font family and shape:

\documentclass{article}
\DeclareFontFamily{T1}{calligra}{}
\DeclareFontShape{T1}{calligra}{m}{n}{<->s*[1.44]callig15}{}
\begin{document}
foo
{\fontencoding{T1}\fontfamily{calligra}\selectfont the font is temporarily changed}
bar
\end{document}

enter image description here

Loading the package calligra makes more sense (see other answer) and you have also the command \textcalligra{...}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.