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.

Recently, a journal I have some editorial involvement with has decided that for its 'rapid publication' outlet, it will no longer accept submissions where LaTeX has been used to format the document. They now demand everything be submitted as a (sigh) Word document.

After much whining, bitching and moaning from me (and some others), they've relented -- partially. They'll take LaTeX submissions if we can build a strong stylesheet - one wherein the generated PDF looks "pretty damned close to exactly like the published form" (their words).

The actual (published) format they want isn't particular complex. Fore example, see

http://www.esajournals.org/doi/pdf/10.1890/ES12-00286.1

Now, I'm 'good enough' with laTeX to be able to use this package, and that, a few tweaks here and there, to cobble together something pretty damned close. But, that approach isn't particularly portable. What they want (and I would agree) is a .cls file (and a .bst for the bib) which a user could apply to their document, and presto chango, out comes the paper.

I've never tried writing a .cls file. Those that I've accumulated over the years (e.g., Springer etc), I can follow pretty well, but I'm not quite sure where to start.

Suggestions? Of course, if any of your smart folks who can do this in your sleep wanna take 15 minutes and put it together, ( (and oh, say, 500 or so folks who use LaTeX for this journal) would be forever indebted - virtual beers on us for life. Real ones if we ever crossed corporeal paths.

share|improve this question
8  
A suggestion: Change your username to something more telling than "user123456789". –  Speravir Mar 7 '13 at 2:20
2  
For anyone that wants to give a try the TUGboat class comes very close to the sample. –  Yiannis Lazarides Mar 7 '13 at 3:15
3  
The fonts and the bibliography style (or closest approximation) might be useful to mention. Perhaps also a formal description of the article elements (astract, keywords, etc.), the highest possible number of sectional divisions, and so forth might be useful. It is hard to develop a prescriptive class style based on inductive reasoning from one journal article. Is there no formal style sheet? –  jon Mar 7 '13 at 3:28
1  
@user67322 : Please see my prior comment. I intended it for you, but sent it to Speravir. In essence, I recommend starting with a class closest to your final goal, and modifying it from there. –  Steven B. Segletes Mar 7 '13 at 20:34
2  
@DominikusK. yes it is true: \def let's you overwrite anything at least as long as we're talking about TeX macros. You of course may to have a look at the package/class source in order not to break anything... the best a package/class author can do is encourage a certain use. –  cgnieder Mar 8 '13 at 14:30
show 13 more comments

1 Answer 1

I recently had to write a new class without very much LaTeX experience at all. I found LaTeX2e for class and package writers (http://www.ctan.org/pkg/clsguide) a great way to get started. It includes several examples.

It sounds like you already know what you're doing, so apologies if this is obvious, but a good way to start is to load a standard LaTeX class like article and then some extra packages on top of it, with something like:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{yourclass}[yyyy/mm/dd Your class description]

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions \relax

\LoadClass[a4paper,twoside]{article}

\RequirePackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}

This is just an example, but that worked for me, and I found that I could get fairly far by just adding packages. The class guide has better examples.

share|improve this answer
    
Welcome to TeX.sx! –  texenthusiast Apr 25 '13 at 15:33
    
Simple and effective, thanks! –  PatrickT Feb 1 at 19:59
add comment

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.