Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}}}%
share|improve this question
2  
As mentioned in Tex Cover Letter Doesn't Display “Sincerely, My Name”, remove the original typeset date using \dateset{} and set it as part of the \addrfrom (like you're already doing). Though it should read \today \\[<len>] where you specify <len>... not like in your current post. As is stand, this is a duplicate of the linked post. –  Werner Jan 4 '13 at 7:16
    
This worked, but I wanted to ask if there is any way that this can be done without using the /dataset{}. So, actually using the regular date thats is compiled from the newlfm.cls. Is there a way? –  piratepartypumpkin Jan 4 '13 at 7:26
add comment

marked as duplicate by hpesoj626, percusse, Kurt, Guido, Joseph Wright Jan 5 '13 at 7:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 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}
share|improve this answer
    
Great Reply! Thanks. Is there any way to align the date that is circled with the address. Like the date under the circled date. Basically, the top date is the newlfm date, the bottom date is just another date I created using \today\\ –  piratepartypumpkin Jan 4 '13 at 16:55
    
See my edit. As it stands, it looks like this question is a duplicate since it covers the same issues in Tex Cover Letter Doesn't Display “Sincerely, My Name”. Perhaps you can edit your title there to reflect your problem well :) –  hpesoj626 Jan 5 '13 at 1:40
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.