Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have just started to use LaTeX (TeXworks, pdfLatex) and I´m using Windows 7. How can I change font to Garamond with math support? I found this from LaTeX font catalogue but it doesn't work:

\documentclass[danish,a4paper,11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{slantsc}
\usepackage{array}
\usepackage{amsmath}
\setkomafont{subsection}{\usefont{T1}{fvm}{m}{n}}
\setkomafont{section}{\usefont{T1}{fvs}{b}{n}\Large}
\setcounter{secnumdepth}{0}
\pagestyle{empty}
\usepackage[urw-garamond]{mathdesign}
\usepackage[T1]{fontenc}

\begin{document}
\section*{Garamond}
\subsection*{\textbackslash normalfont}
\normalfont\normalfont
\input catalogue
\subsection*{\textbackslash itshape}
\normalfont\itshape
\input catalogue
\newpage
\normalfont\normalfont
\input fonttable
\section{Math}
\normalfont
\[
\mathbf{B}(P)=\frac{\mu_0}{4\pi}\int\frac{\mathbf{I}\times\hat{r}'}{r'^2}dl = \frac{\mu_0}{4\pi}\,I\!\int\frac{d\boldsymbol{l}\times\hat{r}'}{r'^2}
\]

It gives following errors:

garamond(1).tex
18
I can't find file `catalogue'.
l.18 \input catalogue

garamond(1).tex
15
LaTeX Font Warning: Font shape `T1/cmss/mb/n' undefined using `T1/cmss/m/n' instead on input line 15.

When I delete lines containing input, it gives following error:

garamond(1).tex
15
LaTeX Font Warning: Font shape `T1/cmss/mb/n' undefined using `T1/cmss/m/n' instead on input line 15.

garamond(1).tex
26
LaTeX Font Warning: Font shape `OT1/mdugm/b/n' undefined using `OT1/mdugm/m/n' instead on input line 26.

garamond(1).tex
26
LaTeX Font Warning: Font shape `OML/mdugm/b/it' undefined using `OML/mdugm/m/it' instead on input line 26.

garamond(1).tex
26
LaTeX Font Warning: Font shape `OMS/mdugm/b/n' undefined using `OMS/mdugm/m/n' instead on input line 26.

garamond(1).tex
26
LaTeX Font Warning: Font shape `OMX/mdugm/b/n' undefined using `OMX/mdugm/m/n' instead on input line 26.

garamond(1).tex
26
LaTeX Font Warning: Font shape `OML/mdugm/b/n' undefined using `OML/mdugm/b/it' instead on input line 26.

garamond(1).tex
26
LaTeX Font Warning: Font shape `MDA/mdugm/b/n' undefined using `MDA/mdugm/m/n' instead on input line 26.

garamond(1).tex
26
LaTeX Font Warning: Font shape `MDB/mdugm/b/n' undefined using `MDB/mdugm/m/n' instead on input line 26.

garamond(1).tex

LaTeX Font Warning: Some font shapes were not available, defaults substituted.
share|improve this question

migrated from stackoverflow.com Jun 2 '13 at 19:53

This question came from our site for professional and enthusiast programmers.

1  
Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Torbjørn T. Jun 2 '13 at 20:02
1  
the right way to use the \input command is \input{nameofthefile}. –  Mario S. E. Jun 2 '13 at 22:04

1 Answer 1

To set both text and math fonts to Garamond for the whole document, use:

\usepackage[urw-garamond]{mathdesign}
\usepackage[T1]{fontenc}

All the other stuff in your code is really unrelated. (I suppose you copy-pasted the code.)

The \input command tries to input a plaintext/.tex file but there is no file named catalogue in your working directory. The reason while your code doesn't compile is the missing files it tries to \input, and a missing \end{document}. Everything else is fine. The font fine-tuning commands there are unnecessary I think.

share|improve this answer
    
Now wrote it like this: \documentclass{article} \usepackage[english]{babel} \usepackage[urw-garamond]{mathdesign} \usepackage[T1]{fontenc} \begin{document} \section{Garamond} Text \end{document} But it gives error in Console output: !pdfTeX error: pdflatex.exe (file ugmm8a.pfb): cannot open Type 1 font file for reading ==> Fatal error occurred, no output PDF file produced! –  user1613397 Jun 4 '13 at 17:21
    
Install the garamond type1 font in your TEXMF directory and run the mktexlsr. –  Balaji Jun 14 '13 at 11:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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