# Change fonts for the entire document for both text and math mode

I'm having some difficulties in changing fonts for the entire document. By searching similar questions, I could only find solutions regarding specific fonts.

By the way, I'm using MacTeX-2016 and I'm compiling using pdfLaTeX.

More precisely, I would like to know a command such that given two fonts, say font1 and font2, it changes both the fonts used in text and math mode to the respectively chosen fonts.

In my case, I would like to change everything to Vicentino and URW Chancery respectively.

For the text case, there's the naive "solution" which works, for instance, in the case of Sans-Serif. However the analogous command (for the case of Vicentino)

 \renewcommand{\familydefault}{\cursiveshape}


fails. More precisely I get the error

 This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded           format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./Untitled.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/texmf-local/tex/latex/vc/vicent.sty) (./Untitled.aux)
./Untitled.tex:5: Missing \endcsname inserted.
\protect
l.5 \begin{document}

?


when trying to compile

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{vicent}
\renewcommand{\familydefault}{\cursiveshape}
\begin{document}
abc $abc ABC \mathcal{abc ABCD}$
\end{document}


Recall that for the Vicentino font there's no command '\normalfont', but only '\cursiveshape', '\modernscriptshape' and '\twistshape'.

If possible, as I mentioned before, I would like a solution independent of the two fonts being chosen. Also, if possible, I would like a solution independent of the document class or a solution for each document class.

• you haven't really given any information that would allow anyone to help. What does "fail" mean wrong fonts or an error? what is the definition of \cursiveshape I would have guessed it was setting up a font shape (like italic or upright) rather than a font family, but you have defined it to be the default family?. Setting up math requires a lot more than "a font" it typically requires lots of fonts with specific math definitions. – David Carlisle Dec 17 '16 at 13:40
• in addition to what @DavidCarlisle says, the way to change fonts may differ by document class, which you haven't identified. – barbara beeton Dec 17 '16 at 14:15
• @DavidCarlisle I thought it was possible to approach this problem from a general perspective. I will edit it to include more information. – user40276 Dec 17 '16 at 15:22
• @barbarabeeton Thanks for the remark. I'm using 'article'. Although I would like to know the general document class independent method (if such thing exists). If there's no general method, I'm happy with 'article'. – user40276 Dec 17 '16 at 15:35
• @DavidCarlisle Thanks for your remarks. Let me just try to clarify one point you that mentioned. Even if I only want the regular text in math mode to be changed (and not, say the one in \mathcal, \mathscr etc), will I need a lot of different fonts instead of what you call "a font"? Furthermore, regarding the \cursiveshape indeed it's the shape. At first, I thought it would be the 'Vicentino' analogous of '\sfdefault' (which corresponds to the 'Helvetica' font), however it's not. Now I'm not sure about what the analogous should be. – user40276 Dec 17 '16 at 15:51

Because vincent is not part of TeXlive, I here show how you can get Zapf Chancery for regular text and math calligraphic. Keep in mind that \mathcal does not support lowercase.

\documentclass{article}
\renewcommand*\rmdefault{pzc}
\usepackage{urwchancal}
\begin{document}
abc ABC

$abc ABC$

$\mathcal{abc ABC}$
\end{document}


• Thanks for your answer. However the problem in its less general form is about the Vicentino font and URW Chancery in the text and math mode respectively. Do you mean that it's impossible to change the default text mode font to Vicentino? – user40276 Dec 19 '16 at 23:57