1

I'm trying to set up a letter that is going to several addresses. I had an idea of writing the names and mark them with a \label{}, then to insert them wherever I need them in the letter. Example:

John\label{name} Doe jada jada jada...
...
...

Now John should appear in the text again.

Is this possible, if so what kind of reference should use?

1
1

If I'm understanding correctly, you want to define your recipient's name once and refer to it many times, so that you can change the recipient's name more easily. The nicest way to do that is a \newcommand: in the following example, every \Recipient is converted to the text John Doe.

\documentclass{article}
\newcommand{\Recipient}{John Doe}
\begin{document}
Dear \Recipient, your name is \Recipient. Have a nice day! (and so on)
\end{document}

Now, to send this to a different person, you only have to change one line.

0

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.