I'm attempting to format a letter using the newlfm class. I have two questions:

  1. How do I align the top of the body text on first page with the margin text?
  2. How do I generate margin text to appear on the second and subsequent pages?

Here is a minimal working example that shows the problems I'm encountering:




\nameto{John Doe}
\addrto{P.O.~Box 1000 \\ Athens, AK 11111}
\namefrom{Mary Moe}
\greetto{Dear Sir or Madam:}


    Page \thepage}}



    \PhrRe{This is a test}



Notice that on the first page, "Mary Moe" and the date are not vertically aligned. I would like them to be.

Notice also that on the second page, nothing appears in the left margin. I would like something to appear there (ideally with the page number).

EDIT: Here's a mockup of what I hope the end result will be.Mock-Up

  • I'd advice against newlfm. Can you provide a visual (perhaps using some other word processing software like MS Word) of what your expected output should look like?
    – Werner
    Apr 5, 2017 at 3:31
  • I've added a mockup. I prefer a solution using newlfm because of its other features, but I would also be interested in your thoughts on the best way to generate similar output using other classes/packages.
    – J. King
    Apr 5, 2017 at 15:53
  • What other features?
    – Werner
    Apr 5, 2017 at 16:08
  • I would also like to use the letter database features described in the newlfm manual in Section 7.
    – J. King
    Apr 5, 2017 at 16:27

1 Answer 1


I'd use the default article class instead of trying to "make things work" with newlfm.

The example below uses the following:

  • Default article class

  • geometry for adjusting the text block dimensions

  • eso-pic for placing the Page X page number from page two onward to the left of the top-left corner of the text block

  • datatool to provide a way of writing one letter with multiple senders/recipients (and whatever else is needed) in line with the "letter database features" offered by newlfm.

enter image description here


% Set up your database of mail merge content (in CSV)
letternum, fromperson, toperson, toaddress
1, Mary Moe, John Doe, PO Box 1000 \\ {Athens, AK 11111}
2, Jane Doe, Rumplestiltskin, Castle ABC \\ {Neverland, NL 54321}

\usepackage{lipsum}% Just for this example
\sloppy% Just for this example

% Set up your document layout
\usepackage{eso-pic}% Used to place the page number

\setlength{\parindent}{0pt}% Remove paragraph indent
\setlength{\parskip}{1\baselineskip plus 2pt minus 1pt}% Big skip between paragraphs

% Placement of the page number...
    \ifnum\value{page}>1 % ...only on pages 2, 3, ...
      \raisebox{-.85\baselineskip}{\makebox[0pt][r]{Page \thepage~~~}}%
\pagestyle{empty}% Don't place anything in the header/footer

% Load the mail merge database

% Extract a record of choice...
\DTLassign{mailmerge}{2}% ... like record 2 in this case




\begin{tabular}{@{} l}
  \toperson \\


Dear Sir or Madam:








Since addresses may have commas in them, {brace} the content that should fall under the same heading.

  • Thank you! This solution answers my question directly. Do you have any suggestions if the margin text (in this case the letter author on page 1 and the page number) should run more than one line?
    – J. King
    Apr 7, 2017 at 17:08
  • @J.King: Sure. This was produced using this paste. Setting the margin content in a [t]op-aligned tabular is one way of achieving this. It may depend on what you want to place there and how many lines, but it's doable.
    – Werner
    Apr 7, 2017 at 19:30

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.