23

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.

  • 11
    A suggestion: Change your username to something more telling than "user123456789". – Speravir Mar 07 '13 at 02:20
  • 2
    For anyone that wants to give a try the TUGboat class comes very close to the sample. – yannisl Mar 07 '13 at 03: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 07 '13 at 03:28
  • @Speravir. Oh I agree with your first comment. Something like user183493 has a real nice ring to it, no? – Steven B. Segletes Mar 07 '13 at 12:22
  • @StevenB.Segletes Sorry, not being a native English speaker I do not understand. Does it refer to telefone numbers and the according letters or leet speak or what then? – Speravir Mar 07 '13 at 18:10
  • @Speravir -- I think Steven was being sarcastic (but only in the second sentence). – jon Mar 07 '13 at 18:16
  • @Speravir -- sorry: I meant sarcastic because he does not think it has much aesthetic value as a name; the 'ring' is not an allusion to a telephone number or antyhing like that. – jon Mar 07 '13 at 18:43
  • @Speravir. jon was correct. I should remember that humor (especially sarcasm) does not necessarily translate. Sorry. No harm intended. As far as your actual question, I wrote a class once (in fact my organization's techpubs office adopted it). What I did was start with the article class and other previous attempts of others. – Steven B. Segletes Mar 07 '13 at 19:44
  • 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 07 '13 at 20:34
  • I think it is not that hard to hack a class together, which fulfills the format requirements, but it is way harder to make that class to enforce it. Otherwise the authors might change something afterwards, which would result in different looking publications. At least I have no idea how to enforce it - but it would be interesting to know, whether it is possible. – Dominikus K. Mar 07 '13 at 22:44
  • 1
    @DominikusK. you cannot enforce anything in LaTeX. In the end you can redefine everything you want. If that's a wise thing to do is another question... – cgnieder Mar 08 '13 at 13:39
  • @cgnieder That is not 100% correct. I have seen packages, which enforced to use a specific \command{} to set the title, otherwise it writes in red in the title something like "please use the command for setting the title" =) – Dominikus K. Mar 08 '13 at 13:48
  • 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 08 '13 at 14:30
  • @cgnieder: But this is not enough to ensure a uniform journal with several different authors. This was the behavior I was expecting from TeX, I just was hoping to be proven wrong due to some learning potential =) – Dominikus K. Mar 08 '13 at 15:09
  • @DominikusK. »But this is not enough to ensure a uniform journal« of course not :) And guess what: every now and then people ask how they can change whatever defaults their journal class has. Every time they get the advise not to do this as the journal editors will undo the changes anyway but that's how it is... – cgnieder Mar 08 '13 at 16:06
  • 1
    In my opinion it would have been good style to mention, that you asked this also in usenet, comp.text.tex. For others a link to Google groups: https://groups.google.com/d/msg/comp.text.tex/n1KjPzwy9w4/GbIwSZwBkhsJ – Speravir Mar 09 '13 at 21:06

1 Answers1

12

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.

benj
  • 223