I'm using scrlttr2
class for work related letters. I'm trying to create a template that I can use for different standard letters.
So for example one of the things I've done is create a client name command that will feed into the body of the letter.
What this question is about is how can I create a system where I can have options for paragraphs.
Example would be I have a command that is client type and options would be audit, exempt, and nonincorp. In the body of the letter we would have paragraph A (audit), B (exempt) & C (nonincorp), so depending on what option was chosen the letter would print the correct one and hide the other two.
I'm thinking something like \entity{audit}
in the preamble would trigger the needed paragraphs.
Based on @cfr comment I made a stab at a MWE; it compiles but it doesn't work, but I hope it gives an idea of what I want to do.
\documentclass[parskip, a4paper]{scrlttr2}
%%% Letter Variables:
\newcommand*\ClientName{XYZ Limited}
\newcommand*\EnityType{Audit}
\newcommand*\Payroll{Yes}
%%% Subject line (optional)
\setkomavar{subject}{RE: Letter of Engagement for \ClientName.}
%%% Reference variables
%\setkomavar{yourref}{}
\setkomavar{myref}{Letter ref xyz}
\begin{document}
\begin{letter}{%
The Directors\\
\ClientName\\
Main Street\\
Some Town
}
\opening{Dear Directors,}
\ifx\EnityType\Audit%
This is text for audit % Audit
\else%
\ifx\EnityType\NonAudit%
this is text for non audit % Non Audit
\else%
\ifx\EnityType\NonIncorp%
this is text for non incorporated entity % NonIncorp
\fi%
\fi%
\ifx\Payroll\Yes%
We provide Payroll Services % Yes
\else%
We don't provide payroll services % No
\fi%
\closing{Yours faithfully,}
%\encl{Attachment 1}
%\cc{someone else 1\\ someone else 2}
\end{letter}
\end{document}
\entity{<type>}
in the preamble, but what will the body look like and what difference does this make? Do you just want to toggle setting or not setting bits of a document? Or is the 'type' of paragraphs actually relevant to your needs? Lots of ways to do the former; the latter is very unclear.