TransWikia.com

Set Hospital name and subsitute

TeX - LaTeX Asked by Chris Peh on May 13, 2021

I’m trying to default a letter which I have to write after every week.
Every week, I’m visiting a different hospital, but will always send them the same letter.

Is there a way to set the hospital name (and other parameters), so I only need to change them once on top of the document and it substitutes them several times?

E.g. set{hospital} {The London Hospital}

documentclass[a4paper,12pt,draft]{article}

set{hospital} {The London Hospital}

begin{document}

Date: 
Hospital: {hospital}

Dear Scott,
Thank you so much for the opportunity to work at {hospital} last week.
Please let me know, when the opportunity comes up again to work at {hospital}.

end{document}

I want to alter hospital name, doctor names and staff, and don’t want to forget it, so subsitute at the start. How can I achieve that?

One Answer

scrlttr2 is a great package to typeset letters. You can set the 'toname' and 'toaddress' komavars as you can read in my MWE

documentclass[fontsize=14pt,DIV=calc]{scrlttr2}

addtokomafont{toname}{sffamily}

%=========================================
setkomavar{toname}{The London Hospital}
setkomavar{toaddress}{SOME place in LondonCODE-Townname}
% =======================================

setkomavar{signature}{qquadqquadqquadqquadqquad%
qquadqquadqquadqquad qquad  textit{Me}}

setkomavar{subject}{MWE}%


begin{document}
begin{letter}{}
opening{Donec at pede.}

 Nullam eu ante vel est convallis dignissim.  Fusce
 suscipit, wisi nec facilisis facilisis, est dui fermentum leo, quis
 tempor ligula erat quis odio.  Nunc porta vulputate tellus.  Nunc
 rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.  Nunc
aliquet, augue nec adipiscing interdum, lacus tellus malesuada
massa, quis varius mi purus non odio.  

closing{Nullam libero mauris, consequat quis, varius et, dictum id, arcu.}

end{letter}
end{document}

Answered by gigiair on May 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP