WinEdt ⇒ How do I add a new document class?
How do I add a new document class?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
How do I add a new document class?
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
Re: How do I add a new document class?

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: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
Re: How do I add a new document class?
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
Re: How do I add a new document class?
! 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 785 times
-
- PNASTMPL.TEX
- PNAS template
- (8.24 KiB) Downloaded 871 times
-
- PNASTWOS.TEX
- PNAS two column sample
- (15.54 KiB) Downloaded 1001 times
- Stefan Kottwitz
- Site Admin
- Posts: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
How do I add a new document class?
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
Re: How do I add a new document class?
Thanks for everything!
Inbal
-
- Posts: 1
- Joined: Fri May 01, 2009 11:50 pm
How do I add a new document class?
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.