Custom Class

This template is for advanced users of LaTeX who are interested in creating their own LaTeX class. The creation of a LaTeX class allows one to specify all document requirements (packages, input files, etc) and layout specifications in a .cls file while reserving the .tex file purely for content. An important feature of this template is the inclusion of a pair of custom class options which act as a toggle within the class to change document settings based on the class option supplied. This means the user of the .tex file can change the class option at the top of the template .tex file which changes the layout of the document.

Description

This template is for advanced users of LaTeX who are interested in creating their own LaTeX class. The creation of a LaTeX class allows one to specify all document requirements (packages, input files, etc) and layout specifications in a .cls file while reserving the .tex file purely for content. An important feature of this template is the inclusion of a pair of custom class options which act as a toggle within the class to change document settings based on the class option supplied. This means the user of the .tex file can change the class option at the top of the template .tex file which changes the layout of the document. Examples of the usage of this toggle are included in both the class file to dynamically change margin sizes and within the corresponding template file to print different text to the document. This template is deliberately simple to illustrate the potential for using LaTeX to dynamically generate documents with different layouts based on minimal input from the user of the template itself. Natural extensions to it may be to include further toggle options within the current set, or to decouple the single toggle into multiple toggles, or to disregard the toggle examples altogether and simply use this as a starting point for creating a custom class.

Preview

  • Template Preview Image

Authorship

This template was created by Vel.

Current Version

v1.0 (February 28, 2015)

License

This template is licensed under a CC BY-NC-SA 3.0 license. Click here to see what this license means for your use of the template.

Open Template for Free Editing Online

Download Template


Template last updated on: February 28, 2015