GeneralAn envelope?

LaTeX specific issues not fitting into one of the other forums of this category.
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

An envelope?

Post by latexforever »

Hello everybody,

I simply want to write the adresses on the envelope. Here is my sample:

Code: Select all

\documentclass{letter}
\usepackage[margin=0.15in,papersize={6.2992126in,4.4488189in},landscape=false,twoside=false]{geometry}
\setlength\parskip{0pt}
\pagestyle{empty}
\usepackage{rotating}

 
\begin{document}
\rotatebox{+90°}{
\hspace{0.35in}
\begin{minipage}[h]{0.80in\linewidth}
NAME SURNAME
ADRESS
\end{minipage}

\vspace{2.50in}\large
\setlength\parindent{3.6in}
NAME SURNAME
ADRESS
}
\end{document}

You will notice the 90° rotation. In fact, my printer obliges me to put the envelopes in the other way; that's why I have to use this package. But this seems not to work well. If you want, you can try without this package: the document is correct, but I can't print this, because of my printer. How can I rotate the whole thing?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: An envelope?

Post by corderin »

Try with \usepackage[landscape]{geometry}!!!
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

Re: An envelope?

Post by latexforever »

Not really better..
corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: An envelope?

Post by corderin »

And with landscape as option of the documentclass?
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

Re: An envelope?

Post by latexforever »

Not better.

Anyway, it must be possible to write a name, an adress, and a PC on a envelope, using LaTeX. It is rather surprising that the fact of rotating the page of 90° never works as I want it to. What do you think it could be due to?
PGScooter
Posts: 31
Joined: Mon Jul 14, 2008 2:47 pm

Re: An envelope?

Post by PGScooter »

latexforever, I do not see why the other methods suggested don't work. Is there any chance that you're accidently using two rotations at the same time? I'm guessing not, but thought I would check.

Check out this pdf: http://www.tug.org/pracjourn/2007-1/mori/mori.pdf

and go to section 3.2. Some of the methods on there are not just for rotating tables, but I think work with text in general.

good luck
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

Re: An envelope?

Post by latexforever »

Thanks, PGScooter, for your answer. I had already read this document; I verified the section 3.2., as you said, and I seem to use correctly the syntax of the rotating package.

I can suppose it is due to the "letter" class.
But I am a little bit astonished that nobody writes envelopes using LaTeX. You won't see my using Microsoft Word for this task!

Another solution? I'm open to all solutions.
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: An envelope?

Post by josephwright »

How about the envlab package? Always works for me (have just done a 50 letter mail merge and envelope print using it!)
--
Joseph Wright
Joseph Wright
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

An envelope?

Post by latexforever »

Thanks, josephwright, for your contribution. I attentively read the documentation of the envlab package, and it is some good work.

I come to this code:

Code: Select all

\documentclass[12pt]{letter}
\usepackage{graphics}
\usepackage[c6envelope,noprintbarcodes,dvips,rightenvelopes,printreturnaddress,rotateenvelope]{envlab}
\makelabels
\begin{document}
\startlabels
\mlabel{%
Joe Casanova\\1 Lambda Street\\Anyplace, NY 12345}{%
Mary McKeen\\2 Alpha Street\\Otherplace, NY 12346}
\mlabel{%
Joe Casanova\\1 Lambda Street\\Anyplace, NY 12345}{%
Lisa O'Hara\\2 Beta Street\\Anotherplace, NY 12347}
\end{document}
, which works completely well, but not as I want. In fact, the package's author speaks only a little bit about printers which only allow envelopes to be placed with the smallest side in direction of the tray. My printer accepts envelopes, but I have to put them in a little tray in the right of the "principal" tray; furthermore, they have to be, as I said earlier, placed the smallest side facing the printer.

With this code, I come to something approaching the result I want to have. If somebody builds this code, to see the resulting PS/PDF files, I simply want the space where there are the two mere blocks of text to be printed on my envelope. When I click on "print", I see that the document's dimensions are not the same as my envelope's dimensions (which do agree with the standard!), so I'm a little bit frightened to print this, because the printer could "print on itself" (like in old printers, if you see what I want to say), and it is, furthermore, not rotated.

What can I do? This package is the solution, but I can't see what other options to choose to come to this result.

Thanks.
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: An envelope?

Post by josephwright »

I can only speak from my own experience, and what I've read others have said. My current printer is an HP 2600. It has a manual feed "slot", where I usually put envelopes (DL for me). I create my files at A4 size, open them in Acrobat and print without changing the paper size. This works for me: in Acrobat the text is in the middle of the page, and in the output it is correct on the envelope. The "slot" I have places the envelope centrally in the printer path. The same workflow was OK with my previous printer (also an HP laser).

The alternative is to alter the PDF size with something like geometry. I'd try:

\documentclass[12pt]{letter}
\usepackage{geometry}
\geometry{paperheight=162mm,paperwidth=114mm}
\usepackage[c6envelope,noprintbarcodes,rightenvelopes,printreturnaddress]{envlab}
\makelabels
\begin{document}
\startlabels
\mlabel{%
Joe Casanova\\1 Lambda Street\\Anyplace, NY 12345}{%
Mary McKeen\\2 Alpha Street\\Otherplace, NY 12346}
\mlabel{%
Joe Casanova\\1 Lambda Street\\Anyplace, NY 12345}{%
Lisa O'Hara\\2 Beta Street\\Anotherplace, NY 12347}
\end{document}

I'd also use pdfLaTeX, as setting page size in DVI mode is more awkard. For me, the above gives the correct page size in the PDF, with the envelope feeding small side first.
--
Joseph Wright
Joseph Wright
Post Reply