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

Answer by alephzero for Creating a class file vs using packages

$
0
0

I think the answer depends what you are using LaTeX for. Creating "generic-format" documents using some common user-defined macros is one thing. Creating a set of documents all with the same fully-defined, customized, "print-ready" format is another.

For one-time use, I don't think there is much practical difference. The functionality is the same either way, though you don't need \makeatletter and \makeatother in a class file.

But consider the situation when you have accumulated many different config.tex files, some of which only work correctly with particular document classes, or only if you use particular options of the document class (e.g. your config.tex only works properly for a particular paper size, or only for two-column documents).

Since you can base a new document class on an existing class by using \LoadClass, you can easily make a document class file that creates exactly the document format you want, with a single parameterless \documentclass command, rather than having to remember to specify options foo and bar of document class baz and then include the correct config.tex file from your collection.


Viewing all articles
Browse latest Browse all 5

Trending Articles



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