Document Classes ⇒ Would you, in your opinion, say dtx is overkill for a personal class?
Would you, in your opinion, say dtx is overkill for a personal class?
I've gone through some examples of dtx files and it honestly feels like less juggling multiple concepts if I just make a cls file instead of doing a dtx file. If there is a strong reason to use a dtx over cls for all scenarios, I'm all ears.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Would you, in your opinion, say dtx is overkill for a personal class?
welcome to the forum!
It depends. If you plan to write a lot of documentation, it's good to have a dtx file as a single source of truth with documentation and code in the same place. If you just might comment on some source code lines and have a small document about the class, especially if it's just for you and more a reminder for you, I would consider it as overkill. It may be an interesting challenge though. But without dealing with dtx, on the other hand, you could focus more on the cls code and be a bit faster.
Stefan
Would you, in your opinion, say dtx is overkill for a personal class?
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Would you, in your opinion, say dtx is overkill for a personal class?
Will you use a class as a base? If not, why not? KOMA-Script classes are extremely feature-rich to be customized.
Stefan
Would you, in your opinion, say dtx is overkill for a personal class?
Would you, in your opinion, say dtx is overkill for a personal class?

While there already exists a screenplay class, I wanted to make something more tailored to my own personal usage plus I wasn't really a fan of the choices the creator picked for macros. So I decided to make my own solution. Would you say that I could squeeze this all in a separate tex file and then use a macro to let pdflatex know to include it as a second script to know the macros? Or would a class/package be more suitable for such a thing?
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Would you, in your opinion, say dtx is overkill for a personal class?
However, my way would be starting with scrartcl (or scrreprt or scrbook) and using the ton of class feature to customize fonts, paragraphs, sections, layout and page dimensions, page numbering etc. with just using class options and class commands. That can be in a .sty file. Plus additional own macros.
Stefan