Document ClassesCreating Your Own Class

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
bama_moss
Posts: 4
Joined: Mon Jul 30, 2007 6:42 pm

Creating Your Own Class

Post by bama_moss »

I have been using LaTeX since my undergrad days. (2003ish) I must admit, however, that the majority of my experience is in generating basic mathematical and scientific documents - not creating packages, classes and macros. Recently I have been confronted with a problem and have yet to find any documentation about.

My job requires that I create a report based on the work that I do. This report needs to be sent to several different companies. Each company requests the layout of the report be different, but the content be the same.

For example:
- Company A wants headers and footers with date/time/author information, while Company B only wants footers with this information and requests the body be double spaced. All the while Company C does not want headers or footers, but rather have every other page be blank so the reader can make notes - but requests these blank pages have headers and footers denoting the purpose of the page.

Since the requirements for layout vary so greatly I have decided to write a class for each layout. This way I can write the report once and simply change the class call three times to get the reports I desire.

I have been searching the net, reading books and asking informed colleagues about locating documentation on creating classes and class syntax. So far I have come up empty handed. :cry:

Can anyone recommend a website, forum, book, treatise etc. on class/package creation and syntax?

Thanks in advance,
Fred

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Creating Your Own Class

Post by localghost »

I'm not sure whether this is what you need (or even want), but you could take a look at the clsguide. Pay attention to the related packages.
bama_moss
Posts: 4
Joined: Mon Jul 30, 2007 6:42 pm

Re: Creating Your Own Class

Post by bama_moss »

Thank you for the quick response.

I have already downloaded and read this document. Unfortunately it is more of a description of the high level concepts that make up classes and packages. Although helpful it is not quite what I'm looking for. Are there any guides that contain verbose syntax definitions? clsguide often warns that class syntax is not well documented and recommends several books to start with. i.e. The LaTeX Companion etc (which I have also browsed through)

Perhaps I should have expressed my question a bit differently. Is the LaTeX class syntax well documented? If so, what document would contain verbose definitions of the sytnax?

Thanks again. :o
jjt3
Posts: 9
Joined: Fri Jan 26, 2007 3:04 pm

Re: Creating Your Own Class

Post by jjt3 »

I found this book had a very good introduction to writing class files, with some good examples.

The Guide to \LaTeX\ (Fourth Edition) {\em Kopka \& Daly\/} Addison-Wesley ISBN 0-321-17385-6

John
Post Reply