1

I use Atom frequently but used to use TeXWorks to write my LaTeX documents. In TeXWorks managing templates was relatively nice and easy and kept me from having to write out the preamble (i.e. everything between \documentclass to \begin{document}). But how do you do that kind of thing in another environment like Atom, which doesn't have that kind of built-in management of templates?

I know I could do it with a snippet and I may end up setting that up, but I wanted to check if other people did it a different way in case there's something smarter/better. Doing it with a snippet just kind of seems like hack work and not the easiest to update when I decide on other tweaks that I might want to put in my template. So I'm just digging for ideas.

  • Looks like there's several template-related packages for Atom, including Arcath's file-templates. Nothing specific to TeX, but it shouldn't have to be if all you want is a selection of document classes and preambles. – Mike Renfro May 9 '16 at 0:12
1

Not exactly what you are looking for, but here are my recommendations; maybe they will be useful to you or others.

I start writing the document (no template/snippet/whatsit business). When I reach a point in the document when I need a feature of <package>, I add \usepackage{<package>} to my preamble.

It's super efficient! In each document, I have only the packages I truly need, which means I spend more time writing and less time debugging issues with option conflicts, deprecated packages, packages that don't make sense to use with each other, too many math alphabets, etc.

Regarding your "tweaks": if they are page layout- or design-related, it really should be a new document class you create and use for these documents. If they are related to macros/etc., you can put this into a package file that can be used by all your documents. See How to make a standard preamble into a package. This way (for both scenarios), if you edit that class/package, all your documents will become up to date the next time you process them, without needing to edit the document's source code at all (as long as you don't introduce a breaking change in your class/package code, of course).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.