I'm an MD and I have to write a lot of letters to collegues and I want to try to do this in LaTex to increase productivity.
I wonder if it's possible to make a basic letter template without any names, DOB, etc. After that, define all the patients' information (in the preamble? somewhere else?) so LaTeX automatically generates the letter without fiddling too much with the code.
Automatically edit everything in italics to the patient's data.
Best Answer
One option is to use
scrlttr2
from the KOMA-Script bundle. Then you can define some variables with\newkomavar
, set them with\setkomavar
and use them in the letter (template) with\usekomavar
. Here is a very basic example:More can be found in the manual (
scrguien.pdf
, chapter 4).Your own settings (address etc. and layout) can be set in a definition file that you can use with
\input
, an.lco
file (see §4.21) or you write a wrapper class.PS: I’m not familiar with non-german addresses so don’t mind if the example has nonsense addresses ;-)