do it inside the environment, then it is local:
\begin{figure}
\renewcommand\figurename{Fig.}
....
\caption{This is a photo.}
\end{figure}
If you compile with XeLaTeX
or LuaLaTeX
, it's easy to use arial
:
\usepackage{fontspec}
\setsansfont{arial}
if you want to use arial as the default
sans font. If you just want to use locally, in captions/headers/footers, you define a font switch with:
\newfontfamily\captionfont{arial}
If you compile with pdfLaTeX
, there is no support for arial. However there is an arial clone, named uarial
, made by URW, for which there is a package (same name) which is not part of TeX Live nor MiKTeX. But you can find a ready-to-install on CTAN here. To use it, you have:
- unzip it at the root of a LocalTeXMF directory. If you use TeXLive, you already have one; with MiKTeX you have to create one. DO NOT unzip it in the TeXMF directory of your distribution.
- Refresh the filenames data base i.e. run texhash (TeX Live) or
Refresh FNDB
(MiKTeX) via MiKTeX Settings.
- Add to your home updmap.cfg this line:
Map ua1.map
.
- Run updmap from the command line.
After that, uarial is ready to be used. Ther is a uarial.sty
package if you want to make it the default sans font. If not, you can define a font switch, e.g.:
\newcommand\captionfont{\fontfamily{ua1}\selectfont}
Other solution: use helvetica
(from which arial is inspired). There is a helvet
package that is part of every distribution. For the switch in that case, the LaTeX name of the helvetica family is phv
.
That being said, you have formatting commands in caption
. you can say for instance:
\DeclareCaptionFont{\captionfont\footnotesize}
With fancyhdr
you similarly can define a new page style with:
\fancypagestyle{mystyle}{%
\captionfont\small…
\fancyhead[…]{…}
\fancyfoot[…]{…}
..................
}%
then apply it with: \pagestyle{mystyle}
.
Best Answer
Local changes to a specific caption can be done within the
figure
ortable
environment, if\captionsetup
is used in the relevant environment. See the example of the 2ndfigure
environment -- the change of settings does not leak outside and has no effect on the thirdfigure
caption.Make sure to remove the optional argument
[figure]
or[table]
, otherwisecaption
complains and does not apply the local changes at all.