While writing a letter using newlfm
, I tried using the \greettoskipbefore
command from page 8 of the manual and I received an "undefined control sequence" error. Looking at the source, it looks like this specific command has not been defined, while every other skip command such as \greettoskipafter
has been:
\def\greettoskipafter#1{\setlength{\@greet@to@sk@a}{#1}}%
\define@key{ov}{greettoskipafter}{\setlength{\@greet@to@sk@a}{#1}}%
As a LaTeX beginner who does not understand primitive TeX at all, I am at a loss here. Manually adding \greettoskipbefore
and recompiling newlfm
seems like one option, but that means my document would only compile on my system until the author of this package fixes this issue. Considering that the package has not been updated in 5 years, that might not happen anytime soon; which brings us to my question: is it possible to define \greettoskipbefore
in my LaTeX document instead as a temporary hack?
Edit: Here is a MWE
\documentclass[11pt,busletternofrom]{newlfm}
\newlfmP{noLines}
\PhrRegard{RE}
\dateset{\today}
\namefrom{John Smith}
\newcommand{\companyname}{Netgear}
\newcommand{\shortcompanyname}{Netgear}
\nameto{Darryl Simpson}
\addrto{
\companyname \\
13911 Wireless Way, Suite 200 \\
Richmond, BC V6V 3B9 \\
}
\regarding{Hardware Design Engineer}
\greetto{Dear Mr. Simpson,}
\closeline{Sincerely,}
\begin{document}
\begin{newlfm}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{newlfm}
\end{document}
Best Answer
I have never really seen the need for using a letter-specific document class, since it's very easy to write a letter within the standard
article
document class (see Writing an official letter and TeX Cover Letter Doesn't Display “Sincerely, My Name”, for example). That's not the point here though...The skip
\@greet@to@sk@a
is meant to place ask
ipa
fter the "greet
to
" clause and yes, there is an accompanying\@greet@to@sk@b
, presumably to provide askip
b
efore the "greet
to
" clause. However, there is no formal means provided to set this length. The location of this "missing" skip is at the same location (vertically) as thesk
ipa
fter the "to
addr
ess" clause (provided by the length\@addr@to@sk@a
), which has an available setting macro:As such, it may suffice to set this skip rather than the missing one. Here's a minimal example (taken from TeX Cover Letter Doesn't Display “Sincerely, My Name”) highlighting this effect:
As a rather bold alternative, you can create your own
newlfm-fix.sty
(in yourlocal/texmf
folder that contains all the necessary fixes). The updates should be loaded whenever you need to use them (\usepackage{newlfm-fix}
), but they would have to be carried with you to other distributions. Once an update tonewlfm
is issued (...contact the package author, by the way), you can stop including yournewlfm-fix.sty
.You can also add space by using
\\[<len>]
, since certain components withinnewlfm
are set with atabular
. For example, usinginserts
4\normalbaselineskip
after "regards":