Quantcast
Channel: Creating a class file vs using packages - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 5

Answer by Peter Wilson for Creating a class file vs using packages

$
0
0

I guess I have to plead guilty to creating the memoir class.

Before doing that I had been involved in creating class files for ISO (the International Standards Organisation) and they kept on changing their requirements. In the end, for them, I tried to create a flexible class file that wouldn't need revamping every few months.

I had written a number of packages that helped me in my general creation of technical articles, reports, and books, but were not necessarily consistent in their interfaces. With the ISO experience in mind I thought that if I effectively reproduced their coding in a class file I could provide a consistent user interface (also creating some internal efficiences in terms of code sharing). Further, the differences between the standard book and report classes were small, and at that time quite a lot of people were asking how to simply convert an article document to a report or vice-versa. I therefor enabled a memoir user to easily switch the output to look like it was produced by any one of the three main standard classes. Effectively it is a superset of the three main standard classes and natively provides the capabilities of some 31 commonly used packages.

The downside of writing a new class is that some pre-existing, or new, package might not be compatible with it. This was the case with memoir in it's early days but I think that with time (14 years since the first release) and the generosity of package writers it is now a minor problem, if one at all.

EDIT: This is in response to Vyas' edit. Reverting to my ISO work I created a 'general ISO' class file that dealt with the overall ISO requirements and terminology. For instance they used terms Like Clause, Sub-Clause, Sub-Sub-Clause, etc., down to, I think, Sub-Sub-Sub-Sub-Sub-Clause, for what in LaTeX is normally denoted by \chapter, \section etc., so I created heading macros like \clause, \sclause, \ssclause which were more akin to the language of the requirements. Another generic item was a cover page containg administration details about the document. This consisted of a series of rectangular boxes enclosing the appropriate texts. The generic macros were just for the texts with the class putting them in the correct boxes. The class also dealt with the tricky issue that ISO required the documentation on A4 paper but many participants would be based in the USA which uses letterpaper and they required the documentation in a format that they could read and not run off the edge of the paper.

I was heavily involved in the ISO 10303 Industrial Systems and Automation --- Product data representation and exchange standard which runs to many parts and thousands of pages. For these I wrote a package that dealt with all the 10303 boilerplate text, the cover page texts, and so on. 10303 was a very formal standard and used the EXPRESS information modeling language (defined in 10303-11) for which some compilers were developed to check and implement the models. The package contained provisions to either typeset the whole document, including all text and EXPRESS code, or to output only the EXPRESS code which could then be processed by other mechanisms.

This is probably not much help to Vyas but I think that the anser to his question is `It all depends ...'


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>