Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Altering spacing between \closing and \signature in letter class.

3,256 views
Skip to first unread message

Adam

unread,
Jun 26, 2003, 9:14:27 AM6/26/03
to
I've figured out how to embed a scanned file of my signature in a LaTeX
letter (for faxing). But if I do this

\closing{Yours faithfully\\
\epsfig{file=sig.eps,width=35mm}}

I get a big gap between the signature and my name, whereas this

\signature{\epsfig{file=sig.eps,width=35mm}\\
My Name}

puts a big gap between "Yours faithfully" and the scanned signature. Is
there any fairly straightforward way to close the gap?

Ulrike Fischer

unread,
Jun 26, 2003, 9:45:34 AM6/26/03
to
Adam <a24...@void.yahoo.void.com> schrieb:

First don't use epsfig.
Use \usepackage{graphicx} and \includegraphics[width=35mm]{sig}.

If you also want to make pdf (most times it's faster to fax from the
reader), you only need to put a pdf-, png- or jpg-version of sig in the
folder.

Use \fbox{\includegraphicx[width=35mm]{sig}} to find out if LaTeX knows
the correct size of your graphic. If not you need perhaps to correct
the boundingbox or to use the clip-option.

You can use e.g. \\[-1cm] to make the gap smaller.

Ulrike Fischer

Adam

unread,
Jun 26, 2003, 11:00:46 AM6/26/03
to
On Thursday 26 June 2003 14:45, Ulrike Fischer wrote:

> First don't use epsfig.
> Use \usepackage{graphicx} and \includegraphics[width=35mm]{sig}.
>
> If you also want to make pdf (most times it's faster to fax from the
> reader), you only need to put a pdf-, png- or jpg-version of sig in the
> folder.

I'm using efax, which takes .ps input, and the scanned file is a .jpg,
although I can convert it into anything else.


> Use \fbox{\includegraphicx[width=35mm]{sig}} to find out if LaTeX knows
> the correct size of your graphic. If not you need perhaps to correct
> the boundingbox or to use the clip-option.

If I just do this

\includegraphics[width=35mm]{sig.jpg}}

I get this error:

! LaTeX Error: Cannot determine size of graphic in sig-af.jpg (no
BoundingBox).

What does this mean?

I've tried adding clip=false,keepaspectratio=true and various bb or
natwidth and natheight parameters, but the scanned graphic never actually
shows up in the output (either in the dvi viewer or in PostScript file).

What I'd like to do is just specify the size of the graphic in the output
and have it scaled accordingly. What am I doing wrong?

Adam

unread,
Jun 26, 2003, 11:22:31 AM6/26/03
to
On Thursday 26 June 2003 14:45, Ulrike Fischer wrote:

> Use \usepackage{graphicx} and \includegraphics[width=35mm]{sig}.
>
> If you also want to make pdf (most times it's faster to fax from the
> reader), you only need to put a pdf-, png- or jpg-version of sig in the
> folder.
>
> Use \fbox{\includegraphicx[width=35mm]{sig}} to find out if LaTeX knows
> the correct size of your graphic. If not you need perhaps to correct
> the boundingbox or to use the clip-option.

I can get this to work with a .eps file but not a .jpg (as described in my
other message).


> You can use e.g. \\[-1cm] to make the gap smaller.

I tried putting this at the end of \closing{...\\[-1cm]} and at the
beginning of \signature{\\[-1cm]...} -- both of these give the following
error:

! LaTeX Error: There's no line here to end.

Ulrike Fischer

unread,
Jun 26, 2003, 11:34:23 AM6/26/03
to
Adam <a24...@void.yahoo.void.com> schrieb:

>> Use \fbox{\includegraphicx[width=35mm]{sig}} to find out if LaTeX
>> knows the correct size of your graphic. If not you need perhaps to
>> correct the boundingbox or to use the clip-option.
>
> If I just do this
>
> \includegraphics[width=35mm]{sig.jpg}}
>
> I get this error:
>
> ! LaTeX Error: Cannot determine size of graphic in sig-af.jpg (no
> BoundingBox).

Sigh. I did tell you to use

\fbox{\includegraphicx[width=35mm]{sig}}

I didn't tell you to put an extension ".jpg" after sig. Don't use
extensions. The graphicx-package is rather smart, it tries to use .eps
when used with LaTeX and .jpg or pdf or png when used with pdfLaTeX.


> I've tried adding clip=false,keepaspectratio=true and various bb or
> natwidth and natheight parameters, but the scanned graphic never
> actually shows up in the output (either in the dvi viewer or in
> PostScript file).

LaTeX + dvips doesn't like jpg, they want eps. pdfLaTeX like jpg but
not eps. So simply forget the extension and let graphicx sort this out.


>> You can use e.g. \\[-1cm] to make the gap smaller.
>

> I tried putting this at the end of \closing{...\\[-1cm]} and at the
> beginning of \signature{\\[-1cm]...} -- both of these give the following
> error:
>
> ! LaTeX Error: There's no line here to end.
>

\closing{greetings\\[-1cm] \includegraphics{sig}} should work just fine.

If not sent a *complete* (with preamble) minimal example that shows
your problem.

\signature{\\[-1cm]...} won't work. At the start of the signature there
is no line that \\ can end.

Ulrike Fischer

Paul Thompson

unread,
Jun 26, 2003, 11:58:08 AM6/26/03
to
You may wish to look at my .cls newlfm, in which I make all such
dimensions set-able by the user, plus all kinda other stuff. It's
great!@!!, if I do say so myself.

Adam

unread,
Jun 26, 2003, 4:38:26 PM6/26/03
to
On Thursday 26 June 2003 16:34, Ulrike Fischer wrote:

> \fbox{\includegraphicx[width=35mm]{sig}}
>
> I didn't tell you to put an extension ".jpg" after sig. Don't use
> extensions. The graphicx-package is rather smart, it tries to use .eps
> when used with LaTeX and .jpg or pdf or png when used with pdfLaTeX.

Aha. I was trying to use sig.jpg instead of sig.eps; when I tried it with
\includegraphics...{sig} I got the error "! LaTeX Error: File `sig' not
found" so I tried changing it to sig.jpg.

> LaTeX + dvips doesn't like jpg, they want eps. pdfLaTeX like jpg but
> not eps. So simply forget the extension and let graphicx sort this out.

If I have to use an .eps file anyway, why do you recommend against using
epsfig?


> \closing{greetings\\[-1cm] \includegraphics{sig}} should work just fine.
>
> If not sent a *complete* (with preamble) minimal example that shows
> your problem.

See below!

> \signature{\\[-1cm]...} won't work. At the start of the signature there
> is no line that \\ can end.


\documentclass[a4paper,11pt]{letter}
\usepackage{graphicx}
\address{Foo0\\Foo1}
%
\signature{Name}
\date{26 June 2003}
\begin{document}
%
\begin{letter}{Foo2\\Foo3}
\opening{Dear Sirs:}
%
Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo foo foo foo. Foo
foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo.
%
\closing{Yours faithfully\\
\includegraphics[width=35mm]{sig}}
%
\end{letter}
\end{document}


This produces something like

Yours faithfully
~~~scanned image~~~
[large gap here]
Name

If I use the following

\closing{Yours faithfully\\[-1em]
\includegraphics[width=35mm]{sig}}

then it leaves the gap and the scanned image overlaps "Yours faithfully".
I want to eliminate the gap between the image and "Name".

Ulrike Fischer

unread,
Jun 27, 2003, 4:51:37 AM6/27/03
to
Adam <a24...@void.yahoo.void.com> schrieb:

>> I didn't tell you to put an extension ".jpg" after sig. Don't use
>> extensions. The graphicx-package is rather smart, it tries to use
>> .eps when used with LaTeX and .jpg or pdf or png when used with
>> pdfLaTeX.
>
> Aha. I was trying to use sig.jpg instead of sig.eps; when I tried it
> with \includegraphics...{sig} I got the error "! LaTeX Error: File
> `sig' not found" so I tried changing it to sig.jpg.

Are you sure your file has the name sig (in another post you are using
the name sig-ak)? I assure you that if LaTeX can find sig.eps it will
find it also without extension. And if pdfLaTeX can find sig.jpg it
will find it also without extension.


> If I have to use an .eps file anyway, why do you recommend against
> using epsfig?

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=impgraph



> \documentclass[a4paper,11pt]{letter}
> \usepackage{graphicx}
> \address{Foo0\\Foo1}
> %
> \signature{Name}
> \date{26 June 2003}
> \begin{document}
> %
> \begin{letter}{Foo2\\Foo3}
> \opening{Dear Sirs:}
> %
> Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo foo foo foo. Foo
> foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo.
> %
> \closing{Yours faithfully\\
> \includegraphics[width=35mm]{sig}}
> %
> \end{letter}
> \end{document}
>
>
> This produces something like
>
> Yours faithfully
> ~~~scanned image~~~
> [large gap here]
> Name
>

At least a minimal example and a clear description of your problem (I
always thought the gap was below the graphic not above). The gap has
nothing to do with the graphic. You will notice it is also there if you
use simple text. It's a problem of the class you are using. letter is
rather old and not really satisfactory. I would advise you to use
another one:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=letterclass

If you really want to stick to letter use

\signature{\vspace{-1cm}Name} to close the gap.

Ulrike Fischer

Adam

unread,
Jun 27, 2003, 5:22:22 AM6/27/03
to
On Friday 27 June 2003 09:51, Ulrike Fischer wrote:

> Are you sure your file has the name sig (in another post you are using
> the name sig-ak)?

Yes, I changed it to sig.jpg when I made the simple "diagnostic" example.


> I assure you that if LaTeX can find sig.eps it will
> find it also without extension.

I agree. At first there was only sig.jpg in the example directory. I added
sig.eps when I realized that required that format.


> And if pdfLaTeX can find sig.jpg it
> will find it also without extension.

OK, but I have to use LaTeX+dvips for this purpose. Normally I print
letters out and sign them with a pen, but I need to embed the signature
image in a PostScript file for faxing (efax with a modem).


>> If I have to use an .eps file anyway, why do you recommend against
>> using epsfig?
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=impgraph

OK, thanks.


> At least a minimal example and a clear description of your problem (I
> always thought the gap was below the graphic not above). The gap has
> nothing to do with the graphic. You will notice it is also there if you
> use simple text.

Yes, I know: where I sign the printed letters. Sorry: I didn't mean that I
was surprised by the gap or thought it was a bug -- just that I wanted to
"reverse" up over it.


> It's a problem of the class you are using. letter is
> rather old and not really satisfactory. I would advise you to use
> another one:
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=letterclass

My LaTeX knowledge is all self-taught from Lamport's book, using The LaTeX
Companion as a reference, and only finding out about new things when I
have a problem (as in this case), so I usually don't know any better than
to use the standard classes! I'll try those alternatives out soon.


> If you really want to stick to letter use
>
> \signature{\vspace{-1cm}Name} to close the gap.

Yes, that does exactly what I want. The following works perfectly (until I
try out the alternative letter classes).

\signature{\vspace{-15mm}\includegraphics[height=15mm]{sig}\\Name}
...
\closing{Yours faithfully}


-- Vielen Dank für Ihre Hilfe!
Adam


Ulrike Fischer

unread,
Jun 28, 2003, 6:23:51 AM6/28/03
to
Adam <a24...@void.yahoo.void.com> schrieb:

>> And if pdfLaTeX can find sig.jpg it
>> will find it also without extension.
>
> OK, but I have to use LaTeX+dvips for this purpose. Normally I print
> letters out and sign them with a pen, but I need to embed the signature
> image in a PostScript file for faxing (efax with a modem).
>

Hm. I looked at the website of efax and found that efax supports pdf (I
would have surprised if not -- postscript isn't a common format for the
normal windows user while pdf is really widespread). So why you are
insisting in using LaTeX + dvips instead of imbedding your jpg-graphic
with pdfLaTeX in a pdf-file?


Ulrike Fischer



Adam

unread,
Jun 29, 2003, 6:09:51 AM6/29/03
to
On Saturday 28 June 2003 11:23, Ulrike Fischer wrote:

> Adam <a24...@void.yahoo.void.com> schrieb:
>
>>> And if pdfLaTeX can find sig.jpg it
>>> will find it also without extension.
>>
>> OK, but I have to use LaTeX+dvips for this purpose. Normally I print
>> letters out and sign them with a pen, but I need to embed the signature
>> image in a PostScript file for faxing (efax with a modem).
>>
>
> Hm. I looked at the website of efax and found that efax supports pdf

This surprises me. info fax says:

DESCRIPTION
fax provides a simple user interface to the efax(1) and
efix(1) programs. It allows you to send text or
Postscript files as faxes and receive, print or preview
received faxes. The fax help command prints a summary of
the possible commands.

> (I
> would have surprised if not -- postscript isn't a common format for the
> normal windows user while pdf is really widespread). So why you are
> insisting in using LaTeX + dvips instead of imbedding your jpg-graphic
> with pdfLaTeX in a pdf-file?

If I need to produce PDF output specifically I use dvi2pdf or pdflatex,
but in general LaTeX with dvips works for me and I'm happy with it.

I use Windows only if forced to do so and then complain loudly. My
printers at home and at work handle PostScript.

But let's not start a holy war! :-)

Ulrike Fischer

unread,
Jun 29, 2003, 1:09:51 PM6/29/03
to
Adam <a24...@void.yahoo.void.com> schrieb:

>>
>> Hm. I looked at the website of efax and found that efax supports pdf
>
> This surprises me. info fax says:
>
> DESCRIPTION
> fax provides a simple user interface to the efax(1) and
> efix(1) programs.
>

I seems I got the wrong "efax" (and so the wrong operating System). The
one I found was mainly a Windows programm. I only wanted to be sure
that you don't stick to LaTeX & dvips only because of a
misunderstanding. On Windows I found the pdfLaTeX-way easier and faster
to handle for faxing.

Ulrike Fischer

Adam

unread,
Jun 29, 2003, 4:52:10 PM6/29/03
to

No problem!

Thanks,
Adam

Adam

unread,
Jul 1, 2003, 12:16:01 PM7/1/03
to
On Friday 27 June 2003 09:51, Ulrike Fischer wrote:

> It's a problem of the class you are using. letter is
> rather old and not really satisfactory. I would advise you to use
> another one:
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=letterclass

I've started using dinbrief -- it's very impressive: I even bought some
window envelopes (much easier than printing envelopes).

I've noticed that using babel and \selectlanguage{british} automatically
changes "Verteiler" and "Anlage(n)" to "cc" and "encl", but I haven't
figured out how to change "Ihre Zeichen, Ihre Nachricht vom", "Unsere
Zeichen" and "Telefon".

Of course I can keep studying the documentation until I figure it out
myself, but perhaps you already know how to override these headings?

-- Adam

Rowland McDonnell

unread,
Jul 8, 2003, 9:03:31 AM7/8/03
to
Adam <a24...@void.yahoo.void.com> wrote:

I have no familiarity with that class (although I'll take a look at it
soon, I think - sounds useful). However, I do know that somewhere
(assuming the class author's not mad) there are commands defined to
print the text "Unsere
Zeichen" usw. What you need to do is track down those command
definitions in the dinbrief class file and arrange for them to be
redefined in a way which meets your needs - probably using a local
config file or similar, at a guess.

btw, in my experience, usual British practice is `enc' rather than
`encl' for enclosures.

Rowland.

(who spent some time as an RSA typing teacher for his sins)

--
Remove the animal for email address: rowland....@dog.physics.org
PGP pub key 0x62DCCA78 Sorry - the spam got to me
http://www.mag-uk.org
UK biker? Join MAG and help keep bureaucracy at bay

Adam

unread,
Jul 9, 2003, 4:24:54 AM7/9/03
to
On Tuesday 08 July 2003 14:03, Rowland McDonnell wrote:

> I have no familiarity with that class (although I'll take a look at it
> soon, I think - sounds useful). However, I do know that somewhere
> (assuming the class author's not mad) there are commands defined to
> print the text "Unsere
> Zeichen" usw. What you need to do is track down those command
> definitions in the dinbrief class file and arrange for them to be
> redefined in a way which meets your needs - probably using a local
> config file or similar, at a guess.

Thanks for that advice. By a combination of grep, RTFM and experimentation
I have found the following solution (for example):

\renewcommand{\yourmailmsg}{Your ref.}
\renewcommand{\phonemsg}{Tel.}
\renewcommand{\signmsg}{Our ref.}

This works anywhere between \documentclass and \opening.

Thanks,
Adam

Rowland McDonnell

unread,
Jul 9, 2003, 7:19:53 PM7/9/03
to
Adam <a24...@void.yahoo.void.com> wrote:

[snip]

> Thanks for that advice. By a combination of grep, RTFM and experimentation
> I have found the following solution (for example):
>
> \renewcommand{\yourmailmsg}{Your ref.}
> \renewcommand{\phonemsg}{Tel.}
> \renewcommand{\signmsg}{Our ref.}
>
> This works anywhere between \documentclass and \opening.

If dinbrief has no provision for loading a local config file, you might
find it useful to read clsguide.tex and write a simple class file which
does nothing more than pass options to dinbrief, load dinbrief, and then
execute your command redefinitions. It'd give you easier access to what
you want.

Rowland.

Adam

unread,
Jul 10, 2003, 9:05:16 AM7/10/03
to
On Thursday 10 July 2003 00:19, Rowland McDonnell wrote:

> Adam <a24...@void.yahoo.void.com> wrote:
>
> [snip]
>
>> Thanks for that advice. By a combination of grep, RTFM and
>> experimentation I have found the following solution (for example):
>>
>> \renewcommand{\yourmailmsg}{Your ref.}
>> \renewcommand{\phonemsg}{Tel.}
>> \renewcommand{\signmsg}{Our ref.}
>>
>> This works anywhere between \documentclass and \opening.
>
> If dinbrief has no provision for loading a local config file, you might
> find it useful to read clsguide.tex and write a simple class file which
> does nothing more than pass options to dinbrief, load dinbrief, and then
> execute your command redefinitions. It'd give you easier access to what
> you want.

Sound useful -- I'll have a look at it when I have a little more time.

-- Adam

0 new messages