I downloaded a template of a journal (PNAS) but when I try to compile it the document class is unknown. Which files are missing and where should I copy them to?
Thanks
WinEdt ⇒ How do I add a new document class?
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
How do I add a new document class?
Hi inbal!
Download the corresponding document class file, it should be pnastwo.cls. You may find it here, click on Class.
Put the file into the TeX directory structure and run texhash or mktexlsr or click the Refresh FNDB button in MiKTeX options if you use MiKTeX. Or put pnastwo.cls into the same directory like your template or main tex file.
Stefan
Download the corresponding document class file, it should be pnastwo.cls. You may find it here, click on Class.
Put the file into the TeX directory structure and run texhash or mktexlsr or click the Refresh FNDB button in MiKTeX options if you use MiKTeX. Or put pnastwo.cls into the same directory like your template or main tex file.
Stefan
LaTeX.org admin
Re: How do I add a new document class?
I had the cls file in the same directory and it didn't work. Well, closing and re-opening WinEdt helped 
I now have a problem with \maketitle, I get the message "missing number, treated as zero". When I try to compile the sample document, I get error messages about the fonts. Obviously something is missing.
I don't even know which directories are used, there are the WinEdt directories and the MikTex directories and I'm missing some basic knowledge about the structure and the way they function together.

I now have a problem with \maketitle, I get the message "missing number, treated as zero". When I try to compile the sample document, I get error messages about the fonts. Obviously something is missing.
I don't even know which directories are used, there are the WinEdt directories and the MikTex directories and I'm missing some basic knowledge about the structure and the way they function together.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Re: How do I add a new document class?
Hi inbal!
Beside just forgetting to give TeX an number
that error may have a cause that's not so obvious. For instance some examples of the old LaTeX Companion need loading the calc package. Give it a try, write \usepackage{calc} or show us that example.
Concerning \maketitle the cause may be inside the arguments of \author, \title, .. show us one small example too that gives the error message.
Stefan
Beside just forgetting to give TeX an number

Concerning \maketitle the cause may be inside the arguments of \author, \title, .. show us one small example too that gives the error message.
Stefan
LaTeX.org admin
Re: How do I add a new document class?
When I use the PNAS sample file I get the error message:
! Font \footnotefont=hv at 6.0pt not loadable: Metric (TFM) file not found.
l.163 \font\footnotefont\frutigermed at 6pt
It repeats many times, for different font names and sizes. Obviously I'm missing the fonts but I don't know where to get them from and where to put them.
When I use the PNAS template I don't get any errors but only the title page is created. If I comment the \maketitle I get the next page correctly.
Attached are the files and logs.
Thanks a lot
Inbal
! Font \footnotefont=hv at 6.0pt not loadable: Metric (TFM) file not found.
l.163 \font\footnotefont\frutigermed at 6pt
It repeats many times, for different font names and sizes. Obviously I'm missing the fonts but I don't know where to get them from and where to put them.
When I use the PNAS template I don't get any errors but only the title page is created. If I comment the \maketitle I get the next page correctly.
Attached are the files and logs.
Thanks a lot
Inbal
- Attachments
-
- PNASTWOS.log
- Sample log
- (7.79 KiB) Downloaded 765 times
-
- PNASTMPL.TEX
- PNAS template
- (8.24 KiB) Downloaded 844 times
-
- PNASTWOS.TEX
- PNAS two column sample
- (15.54 KiB) Downloaded 972 times
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
How do I add a new document class?
Hi inbal,
at the moment I have only Linux on my computer, no Windows, so I cannot give concrete help with the installation of certain fonts on Windows. Just generally, look at the TeX Catalogue for a package name, look with the MiKTeX package manager for this package and install it by the mpm or try to load it from CTAN. For the frutiger font there's an howto here on CTAN.
Concerning the other problem: you should get a warning about the empty thebibliography environment. Put one \bibitem line there and it may work with \maketitle and the remaining text.
Stefan
at the moment I have only Linux on my computer, no Windows, so I cannot give concrete help with the installation of certain fonts on Windows. Just generally, look at the TeX Catalogue for a package name, look with the MiKTeX package manager for this package and install it by the mpm or try to load it from CTAN. For the frutiger font there's an howto here on CTAN.
Concerning the other problem: you should get a warning about the empty thebibliography environment. Put one \bibitem line there and it may work with \maketitle and the remaining text.
Stefan
LaTeX.org admin
Re: How do I add a new document class?
Ok, the template works fine. I'll handle the fonts later or just use the template.
Thanks for everything!
Inbal
Thanks for everything!
Inbal
-
- Posts: 1
- Joined: Fri May 01, 2009 11:50 pm
How do I add a new document class?
The solution is very easy.
Actually I had the same problem and found the solution in the PNAS documentation (you can download in http://www.pnas.org/site/misc/LaTex.shtml, and the select the link Instructions). Resuming you must edit the file pnastwof.sty (or pnasonef.sty if is your case) and change de font definitions (for both: times and helvetica).
The way for doing that is edit the file pnastwof.sty (or pnasonef.sty) in the lines that define the times-roman font:
change this lines for:
and then do the same for the font helvetica (who definition is few lines belows), I mean, change the lines:
for:
If this don't work you must use other font definitions (consult the PNAS file documentation).
Best regards
Marcelo Rivas Astroza
PD: sorry for my English, I'm not native English speaker.
Actually I had the same problem and found the solution in the PNAS documentation (you can download in http://www.pnas.org/site/misc/LaTex.shtml, and the select the link Instructions). Resuming you must edit the file pnastwof.sty (or pnasonef.sty if is your case) and change de font definitions (for both: times and helvetica).
The way for doing that is edit the file pnastwof.sty (or pnasonef.sty) in the lines that define the times-roman font:
Code: Select all
%% Times-Roman
%% Dvipsone Names:
\def\timesroman{tir}
\def\timesbold{tib}
\def\timesitalic{tii}
\def\timesbolditalic{tibi}
%% Karl Berry Names:
%\def\timesroman{ptmr8t}
%\def\timesbold{ptmb8t}
%\def\timesitalic{ptmri8t}
%\def\timesbolditalic{ptmbi8t}
Code: Select all
%% Times-Roman
%% Dvipsone Names:
%\def\timesroman{tir}
%\def\timesbold{tib}
%\def\timesitalic{tii}
%\def\timesbolditalic{tibi}
%% Karl Berry Names:
\def\timesroman{ptmr8t}
\def\timesbold{ptmb8t}
\def\timesitalic{ptmri8t}
\def\timesbolditalic{ptmbi8t}
Code: Select all
%% Helvetica
%------------------
%% Dvipsone
\def\helvetica{hv}
\def\helveticaoblique{hvo}
\def\helveticaboldoblique{hvbo}
\def\helveticabold{hvb}
%% Karl Berry Names:
%\def\helvetica{phvr}
%\def\helveticaoblique{phvro}
%\def\helveticaboldoblique{phvbo}
%\def\helveticabold{phvb}
Code: Select all
%% Helvetica
%------------------
%% Dvipsone
%\def\helvetica{hv}
%\def\helveticaoblique{hvo}
%\def\helveticaboldoblique{hvbo}
%\def\helveticabold{hvb}
%% Karl Berry Names:
\def\helvetica{phvr}
\def\helveticaoblique{phvro}
\def\helveticaboldoblique{phvbo}
\def\helveticabold{phvb}
Best regards
Marcelo Rivas Astroza
PD: sorry for my English, I'm not native English speaker.