1

I'm right now writing a class for technical manuals to be used inside my company. This class holds e.g. the company logo and defines some macros for e.g. specific Corporate Identity styling of code listings etc. (I got this working already)

We have sections inside our documents, that have only minor changes between documents e.g. a paragraph about legal implications. My question is, where to define such a paragraph, to be re-used over several documents. I'm guessing it would be possible to maintain such sections as seperate .tex files inside the class' file-tree and input or include from there. I imagine my file-tree to look something like this:

.
└── mytexmf/
    └── tex/
        └── latex/
            └── my_class/
                ├── My_Class.cls
                ├── my_company_logo.png
                ├── foo.tex
                └── bar.tex

When someone is using my class, will they be able to write something like

\documentclass{My_class}
\begin{document}
\input{foo}
\input{bar}
Some more text
\end{document}

and if yes, is that good practice?

2
  • 4
    I think this comes down to one's opinion, but for a class used on different machines it would be easier to define it within the class as a command and let the user input things via \legalstuff. However, how do you plan to deal with the 'minor changes between documents' if you define the paragraphs globally?
    – schoekling
    Commented Mar 4, 2021 at 18:12
  • I'm planning on using the template only for the things that don't change between documents. I expect e.g. legal.tex to not change between documents. IF at any point the contents of legal.tex change (e.g. due to new laws), I want them to be reflected in every document (after re-compilation). I'm planning on using e.g. overleaf/sharelatex for syncronisation of "source files" between machines.
    – Dschoni
    Commented Mar 8, 2021 at 11:04

0

You must log in to answer this question.

Browse other questions tagged .