[Tex/LaTex] Where to save lco templates for scrlttr2 letters


In the german Koma Script Book I read about the elegant way to predefine the personal address in a .lco file like this

~/texmf/tex/latex/jd_private_v001.lco # <- added answer here for other readers

\setkomavar{fromname}{John Doe}
\setkomavar{signature}{John Doe}
\setkomavar{fromaddress}{Iceroad 4\\ Northpole}

And include it in the header of a letter like



\opening{Dear Peter,}

I just want to say "hi".

\closing{Best wishes}

My first idea was to create one .lco per sender address like JohnDoePrivate.lco, JohnDoeWork.lco and store them global on my Linux system. But where?

If John moves I could create a jd_private_v002.lco and LaTeX will hopefully take the latest address. I could also use the old .tex files too, if I force LaTeX to use a special version.

Best Answer

Depends to your system: Linux or Windows.

However, it is the same as creating an own package and saving it in the local TEXMF tree which can be for Linux


and so on. For MiKTeX you can define own trees and add them to the root base.

And in all directories you have to create a TDS (TeX Directory Structure), as Enrico already pointed out.