TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with using a font in LaTeX. I installed the font via the installfont-tl script but cant use it to create the document. When I add the \usepackage{$fontname} I get an error which I cant really explain to myself:

! LaTeX Error: Missing begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.9 n
 \expandafter\ifx\csname Sfpr@scale\endcsname\relaxn  \let\Sfpr@@scale\@...

You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Incomplete ifx; all text was ignored after line 9.
<inserted text> 
l.4 \begin{document}

The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

I tried to find a solution but I couldnt find one.

The fingerpaint.sty (font style file) looks likes this:

\ProvidesPackage{fingerpaint}[2010/03/05 v1.0 FingerPaint-Regular]%

Hope someone is able to help me with this problem.

Some input from my side: I am using the script by editing the default values in the script cause some parameters while calling the script seem to be ignored while calling the script. So if you cant get it to work you can just edit the default values in the script file itself. that will work. Also if you have problems with converting the .ttf files just do it yourself with the ttf2pt1 script.

ttf2pt1 -a -b -l adobestd $filename
share|improve this question
There seems to be an additional letter "n" after \relax in .fd file (ot1fpr.fd, t1fpr.fd, the names depends on the used font encoding). – Heiko Oberdiek Oct 24 '12 at 12:25
@HeikoOberdiek Could you make that an answer? – Joseph Wright Dec 2 '12 at 11:45
@JosephWright More or less done. IMHO, the comment is not enough for an answer, thus I have added a guess for the cause. – Heiko Oberdiek Dec 2 '12 at 16:29

There seems to be an additional letter "n" after \relax in .fd file (ot1fpr.fd, t1fpr.fd, the names depends on the used font encoding). Perhaps this is a bug in your installtl-font script. Version v1.6b (2012/01/25) seems to be correct:

echo -e "\n\n$STEP) Insert scale factor into the fd files"
cat >installfont.sed <<EOF
9 i\\
\\n\\\\expandafter\\\\ifx\\\\csname ${FONTSCALEPREFIX}@scale\\\\endcsname\\\\relax\\n  \\\\let\\\\${FONTSCALEPREFIX}@@scale\\\\@empty\\n\\\\else\\n  \\\\edef\\\\${FONTSCALEPREFIX}@@scale{s*[\\\\csname ${FONTSCALEPREFIX}@scale\\\\endcsname]}\\n\\\\fi\\n
s/<-> /<-> \\\\${FONTSCALEPREFIX}@@scale /

It contains "\\\\endcsname\\\\relax\\n \\\\let", perhaps your version has one backlash "\\\\relax\n" only.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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