Skip to content

Sort out LaTeX .cls vs .sty (class vs style files) and what we use them for. #4

@kfogel

Description

@kfogel

As of right now, we have these files:

  otsletter.cls
  texMemo.cls
  contract.cls
                    ots.sty
  invoice.cls       invoice.sty
  otsreport.cls     otsreport.sty

Commit 7fa4dff brought to my attention that we're not that clear on what kinds of things should go into which ones, and which of the above should include which other of the above.

For example, should otsreport.cls just include ots.sty, so that (say) a document we're writing in the otsreport documentclass that happens to use the acronym environment doesn't have to explicitly have \usepackage{ots} in its header?

I think maybe the following is the state we want to get to:

  1. We have .cls files that just define what is necessary to distinctively define their respective classes;
  2. Each .cls file does \usepackage{ots} (this loads ots.sty).
  3. All the non-class-specific stuff we use, whether OTS-defined (e.g., \fullref) or not (e.g., the acronym env), goes into ots.sty.

This implies moving any non-class-specific stuff that currently happens to be defined in .cls files into ots.sty.

See What are .cls and .sty files? How are they different? and Classes and packages – what's the difference? for background on classes versus packages (style files).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions