[Tex/LaTex] Can’t Left Align Date with newlfm.cls

horizontal alignmentnewlfm

Possible Duplicate:
Tex Cover Letter Doesn’t Display “Sincerely, My Name”

Here is what my current output looks like:

enter image description here

I can't get the date on top to align with the text, that date is circled in red in the image above.

Here is my source code for the .tex:

 \documentclass[11pt,stdletter,sigleft]{newlfm}
 \usepackage{charter}

 \widowpenalty=1000
 \clubpenalty=1000

 \newsavebox{\Luiuc}
 \sbox{\Luiuc}{%
    \parbox[b]{1.75in}{%
        \vspace{0.5in}%
        \includegraphics[scale=1.0,ext=.eps]
        {figures/UILogoLG3L}%
    }%
 }%
 \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}

 \newlfmP{headermarginskip=-40pt}
 \newlfmP{sigsize=50pt}
 \newlfmP{dateskipafter=33pt}
 \newlfmP{addrfromphone}
 \newlfmP{addrfromemail}
 \PhrPhone{Phone}
 \PhrEmail{Email}

 \lthUiuc

 \namefrom{Matthew J.\ Miller}
 \addrfrom{%
         \today\\
 ]
         Predrag Puno\v{s}evac\\
         Science Laboratory\\
         Some University\\
         Urbana, IL 61801
 }
 \phonefrom{217-244-6024}
 \emailfrom{mjmille2@uiuc.edu}

 \addrto{%
 Faculty Search Committee\\
 Department of Computer Science\\
 Clemson University\\
 Clemson, SC 29634-0974}

 \greetto{To Whom It May Concern,}
 \closeline{Sincerely,}
 \begin{document}
 \begin{newlfm}

 I am writing to apply for the position of assistant
 professor in Clemson University's Computer Science Department.  I plan to receive my
 Ph.D.\ degree from the University of Illinois at
 Urbana-Champaign in Summer of 2006.  My adviser is
 Prof.\ Nitin H.\ Vaidya, and my general areas of interest
 include wireless and sensor network performance and security.
  Having many friends and family in the area, I would be
 most enthused to return to the South permanently by accepting
 a position at your institution.

 In my graduate work, I focus on the design of
 energy-efficient protocols and secure key distribution.
 More specifically, I have explored various techniques at
 multiple layers of the network stack to effectively reduce
 the energy consumption of wireless communication.  In security,
 my work was the first to propose leveraging channel diversity
 for sensor network key distribution.  My research appears in 
 the \textit{IEEE Transactions on Mobile Computing} journal as
 well as \textit{Infocom 2006} and \textit{ICDCS 2005},
 prestigious conferences in the areas of networking and distributed
 systems, respectively.

 Enclosed is my curriculum vitae (including a list of
      statement, and a teaching statement.  All of my publications and
 presentations are available at:

 http://www.crhc.uiuc.edu/$\sim$mjmille2/publications/

 Please let me know if there are any other materials
 or information that will assist you in processing my application.

 Thank you for your consideration.  I look forward to
 hearing from you.


 \end{newlfm}
 \end{document}

I think it has something to do with this part or newlfm.cls:

 \DeclareOption{dateright}{\setboolean{@dt@l}{false}\setboolean{@dt@c}{false}}%
 \define@key{ov}{dateright}[true]{\iffixq{#1}{\setboolean{@dt@l}{false}\setboolean{@dt@c}     {false}}}%
 \def\dateright#1{\iffixq{#1}{\setboolean{@dt@l}{false}\setboolean{@dt@c}{false}}}%
 \DeclareOption{dateleft}{\setboolean{@dt@l}{true}\setboolean{@dt@c}{false}}%
 \define@key{ov}{dateleft}[true]{\iffixq{#1}{\setboolean{@dt@l}{true}\setboolean{@dt@c}     {false}}}%
 \def\dateleft#1{\iffixq{#1}{\setboolean{@dt@l}{true}\setboolean{@dt@c}{false}}}%
 \DeclareOption{datecenter}{\setboolean{@dt@l}{false}\setboolean{@dt@c}{true}}%
 \define@key{ov}{datecenter}[true]{\iffixq{#1}{\setboolean{@dt@l}{false}\setboolean{@dt@c}     {true}}}%
 \def\datecenter#1{\iffixq{#1}{\setboolean{@dt@l}{false}\setboolean{@dt@c}{true}}}%

Best Answer

Explanation

  1. Put \newlfmP{dateleft} in your preamble.
  2. There was a scoping error with the commands \addfrom{} and \dateset{} in your code. I have separated them accordingly.
  3. Moreover, in item (2), you tried to close { with ]. I have fixed that.
  4. I put all letter options to only one \newlfmP to make the preamble more readable.
  5. I commented some parts of your original code so that it will compile in my machine. You can uncomment them later.

Code

\documentclass[11pt,stdletter,sigleft,]{newlfm}
 \usepackage{charter}

 \widowpenalty=1000
 \clubpenalty=1000

% \newsavebox{\Luiuc}
% \sbox{\Luiuc}{%
%    \parbox[b]{1.75in}{%
%        \vspace{0.5in}%
%        \includegraphics[scale=1.0,ext=.eps]
%        {figures/UILogoLG3L}%
%    }%
% }%
% \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}
%
  \newlfmP{%
    dateleft,
    headermarginskip=-40pt,
    sigsize=50pt,
    dateskipafter=33pt,
    addrfromphone,
    addrfromemail,
           }
 \PhrPhone{Phone}
 \PhrEmail{Email}

% \lthUiuc
%% There was a scoping error with the commands \addfrom{} and \dateset{} in your code.
 \namefrom{Matthew J.\ Miller}
 \addrfrom{
 Predrag Puno\v{s}evac\\
 Science Laboratory\\
 Some University\\
 Urbana, IL 61801
 }%
 \dateset{\today }
 \phonefrom{217-244-6024}
 \emailfrom{mjmille2@uiuc.edu}

 \addrto{%
 Faculty Search Committee\\
 Department of Computer Science\\
 Clemson University\\
 Clemson, SC 29634-0974}

 \greetto{To Whom It May Concern,}
 \closeline{Sincerely,}
 \begin{document}
 \begin{newlfm}

 I am writing to apply for the position of assistant
 professor in Clemson University's Computer Science Department.  I plan to receive my
 Ph.D.\ degree from the University of Illinois at
 Urbana-Champaign in Summer of 2006.  My adviser is
 Prof.\ Nitin H.\ Vaidya, and my general areas of interest
 include wireless and sensor network performance and security.
  Having many friends and family in the area, I would be
 most enthused to return to the South permanently by accepting
 a position at your institution.

 In my graduate work, I focus on the design of
 energy-efficient protocols and secure key distribution.
 More specifically, I have explored various techniques at
 multiple layers of the network stack to effectively reduce
 the energy consumption of wireless communication.  In security,
 my work was the first to propose leveraging channel diversity
 for sensor network key distribution.  My research appears in 
 the \textit{IEEE Transactions on Mobile Computing} journal as
 well as \textit{Infocom 2006} and \textit{ICDCS 2005},
 prestigious conferences in the areas of networking and distributed
 systems, respectively.

 Enclosed is my curriculum vitae (including a list of
      statement, and a teaching statement.  All of my publications and
 presentations are available at:

 http://www.crhc.uiuc.edu/$\sim$mjmille2/publications/

 Please let me know if there are any other materials
 or information that will assist you in processing my application.

 Thank you for your consideration.  I look forward to
 hearing from you.


 \end{newlfm}
 \end{document}

Output

enter image description here


Edit

It wasn't so clear from your post what you wanted. But why would you want to do that? \dateset was there for a reason and you can control where it is positioned by the options dateleft, datecenter and dateright. As mentioned by Werner, you can write this to your preamble instead.

 \dateset{}
 \namefrom{Matthew J.\ Miller}
 \addrfrom{
 \today\\[12pt]
 Predrag Puno\v{s}evac\\
 Science Laboratory\\
 Some University\\
 Urbana, IL 61801
 }%

You can replace 12pt by any length you prefer.

My suggestion is you either do these suggestions here or apply Werner's suggestion in Tex Cover Letter Doesn't Display “Sincerely, My Name”.

Also, I see that you have given headermarginskip a negative value. Doing that makes your next pages start above your top margin rule. Here is a code that seems to work. Tweak to your liking.

\documentclass[11pt,stdletter,sigleft,]{newlfm}
 \usepackage{charter}

 \widowpenalty=1000
 \clubpenalty=1000

% \newsavebox{\Luiuc}
% \sbox{\Luiuc}{%
%    \parbox[b]{1.75in}{%
%        \vspace{0.5in}%
%        \includegraphics[scale=1.0,ext=.eps]
%        {figures/UILogoLG3L}%
%    }%
% }%
% \makeletterhead{Uiuc}{\Lheader{\usebox{\Luiuc}}}
%

 \newlfmP{ %
            dateleft,
            sigright,
            addrfromskipbefore=12pt,
            headermarginskip=0pt,
            topmarginskip=0pt,
            sigsize=0pt,
            dateskipbefore=0pt,
            dateskipafter=24pt,
            closeskipbefore=10pt, 
            sigskipbefore=0pt,
            footermarginsize=0.5in,
            }
 \PhrPhone{Phone}
 \PhrEmail{Email}

% \lthUiuc
 \dateset{}
 \namefrom{Matthew J.\ Miller}
 \addrfrom{
 \today\\[12pt]
 Predrag Puno\v{s}evac\\
 Science Laboratory\\
 Some University\\
 Urbana, IL 61801
 }%
 \phonefrom{217-244-6024}
 \emailfrom{mjmille2@uiuc.edu}

 \addrto{%
 Faculty Search Committee\\
 Department of Computer Science\\
 Clemson University\\
 Clemson, SC 29634-0974}

 \greetto{To Whom It May Concern,}
 \closeline{Sincerely,}
 \begin{document}
 \begin{newlfm}

 I am writing to apply for the position of assistant
 professor in Clemson University's Computer Science Department.  I plan to receive my
 Ph.D.\ degree from the University of Illinois at
 Urbana-Champaign in Summer of 2006.  My adviser is
 Prof.\ Nitin H.\ Vaidya, and my general areas of interest
 include wireless and sensor network performance and security.
  Having many friends and family in the area, I would be
 most enthused to return to the South permanently by accepting
 a position at your institution.

 In my graduate work, I focus on the design of
 energy-efficient protocols and secure key distribution.
 More specifically, I have explored various techniques at
 multiple layers of the network stack to effectively reduce
 the energy consumption of wireless communication.  In security,
 my work was the first to propose leveraging channel diversity
 for sensor network key distribution.  My research appears in 
 the \textit{IEEE Transactions on Mobile Computing} journal as
 well as \textit{Infocom 2006} and \textit{ICDCS 2005},
 prestigious conferences in the areas of networking and distributed
 systems, respectively.

 Enclosed is my curriculum vitae (including a list of
      statement, and a teaching statement.  All of my publications and
 presentations are available at:

 http://www.crhc.uiuc.edu/$\sim$mjmille2/publications/

 Please let me know if there are any other materials
 or information that will assist you in processing my application.

 Thank you for your consideration.  I look forward to
 hearing from you.
 \end{newlfm}
 \end{document}