Home > Archive > Tex > November 2006 > Symbol font OK in latex/dvips, but can't find in pdflatex
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Symbol font OK in latex/dvips, but can't find in pdflatex
|
|
|
| Well, I know this ground gets trod over again and again, but it drives
me nuts that
I can't merely point a script at a new font and have it installed in
all the texly homes.
Here's my problem:
1. I have a single (one, count 'em 1) Type-1 font. No font family. It's
an APL font, that is
accessed entirely through tex macros, e.g: \qiota \qrho, etc.
I don't know what the font encoding is, and don't know how to find
out if that
is even important.
2. I have the font installed and happily running under latex and dvips
in SuSE 10.1.
It displays well under gv. The .ps file says "Document Fonts:
saxpsa".
3. HOWEVER: when I run pdflatex on the same document, I get:
rbe@rattler:~/saxpsa> pdflatex apltest.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./apltest.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german,
ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch,
esperanto, e
stonian, finnish, gr , icelandic, irish, italian, latin, magyar,
norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish,
swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size11.clo))
(/usr/share/texmf/tex/generic/epsf/epsf.tex
This is `epsf.tex' v2.7k <10 July 1997>
) (./aplfont.tex (./qdefsax.tex)) (./apltest.aux) [1
Warning: pdflatex (file pdftex.map): cannot open font map file
]
Underfull \vbox (badness 5133) has occurred while \output is active [2]
(./apltest.bbl) [3] (./apltest.aux) )
(see the transcript file for additional information)
</var/cache/fonts/pk/ljfou
r/public/cm/cmti10.657pk>kpathsea: Running mktexpk --mfmode / --bdpi
600 --mag 1+240/600 --dpi 840 saxpsa
gsftopk: fatal: map file `psfonts_t1.map' not found.
mktexpk: don't know how to create bitmap font for saxpsa.
kpathsea: Appending font creation commands to missfont.log.
Warning: pdflatex (file saxpsa): Font saxpsa at 840 not found
</var/cache/fonts/pk/ljfour/public/cm/cmr9.600pk>
</var/cache/fonts/pk/ljfour/
public/cm/cmsy6.600pk>kpathsea: Running mktexpk --mfmode / --bdpi 600
--mag 1+60/600 --dpi 660 saxpsa
gsftopk: fatal: map file `psfonts_t1.map' not found.
mktexpk: don't know how to create bitmap font for saxpsa.
Warning: pdflatex (file saxpsa): Font saxpsa at 660 not found
4. There is no pdftex.map file under /usr/share/texmf, or if there is,
I can't see it. Other
documents that don't use the APL font also complain about the
missing pdf.map file,
but appear to generate correct PDF.
5. Here's how I installed the font for latex/dvips use:
# copy font files to appropriate homes (do all this as root)
mkdir /usr/share/texmf/fonts/type1/public/apl
cp saxpsa.pfb /usr/share/texmf/fonts/type1/public/apl/
mkdir /usr/share/texmf/fonts/tfm/public/apl
cp saxpsa.tfm /usr/share/texmf/fonts/tfm/public/apl/
mkdir /usr/share/texmf/fonts/map/dvips/apl
cp saxpsa.map /usr/share/texmf/fonts/map/dvips/apl
# Edit config files
vi /usr/share/texmf/dvips/config/config.ps
[look for this]:
% This shows how to add your own map file.
% Remove the comment and adjust the name:
% p +myfonts.map
Add this line around there.
p +saxpsa.map
Now, do the stuff they never seem to document:
texhash
updmap-sys
6. Here's the saxpsa.map file contents:
saxpsa saxpsa <saxpsa.pfb
So, any help from afar would help. It looks like pdflatex goes to a
different pond to drink fonts than does
dvips and/or latex.
Thanks.
Robert
| |
| Enrico Gregorio 2006-10-30, 7:44 pm |
| rbe <bernecky@acm.org> wrote:
> Well, I know this ground gets trod over again and again, but it drives
> me nuts that
> I can't merely point a script at a new font and have it installed in
> all the texly homes.
\pdfmapline{+saxpsa saxpsa <saxpsa.pfb}
Ciao
Enrico
| |
|
|
rbe wrote:
>
> 5. Here's how I installed the font for latex/dvips use:
>
> # copy font files to appropriate homes (do all this as root)
> mkdir /usr/share/texmf/fonts/type1/public/apl
> cp saxpsa.pfb /usr/share/texmf/fonts/type1/public/apl/
> mkdir /usr/share/texmf/fonts/tfm/public/apl
> cp saxpsa.tfm /usr/share/texmf/fonts/tfm/public/apl/
> mkdir /usr/share/texmf/fonts/map/dvips/apl
> cp saxpsa.map /usr/share/texmf/fonts/map/dvips/apl
>
> # Edit config files
> vi /usr/share/texmf/dvips/config/config.ps
> [look for this]:
> % This shows how to add your own map file.
> % Remove the comment and adjust the name:
> % p +myfonts.map
>
> Add this line around there.
>
> p +saxpsa.map
>
> Now, do the stuff they never seem to document:
>
> texhash
Running texhash goes without saying in a tex system
that requires it: do it whenever you add something to a
texmf directory. But it should never be done in a system
that doesn't have a texhash command.
> updmap-sys
updmap does nothing unless the map file has
been added to updmap.cfg; in that case texhash
is unnecessary, because updmap will run texhash
unless you tell it not to.
To make updmap work properly you have to enable
the map file. You do this by adding the line
Map saxpsa.map
to updmap.cfg. You can do that manually, or
with
updmap --enable Map=saxpsa.map
If you do that, the editing of config.ps is unnecessary
provided it already contains the line
p psfonts.map
Because what updmap does is (re)create psfonts.map
and pdftex.map by concatenating all the .map files
previously enabled.
Dan
| |
|
|
Enrico Gregorio wrote:
> rbe <bernecky@acm.org> wrote:
>
>
> \pdfmapline{+saxpsa saxpsa <saxpsa.pfb}
>
> Ciao
> Enrico
HI, Enrico,
Thanks for your reply, but I'm not sure what I'm supposed to do with
the pdfmapline stuff...
Below I've pasted in what I have on my system for the saxpsa font.
For the other person who was kind enough to reply regarding updmap, I
do indeed
have a Map entry for the font and things still don't work.
I remain puzzled by the fact that latex/dvips work fine,
but pdflatex can't find the font, and wanders off trying to build a
font...
I would have naively expected that they'd work the same way...
Thanks again to you both for any help.
Robert
ps: Would kpathsea help out here? If so, is there a description of its
debug output?
rbe@rattler:/usr/share/texmf> grep -r saxpsa .
../ls-R:saxpsa.afm
../ls-R:saxpsa.map
../ls-R:saxpsa.map
../ls-R:saxpsa.map
../ls-R:saxpsa.map
../ls-R:saxpsa.tfm
../ls-R:saxpsa.pfb
../dvips/config/config.ps:p +saxpsa.map
../fonts/afm/public/apl/saxpsa.afm:FontName saxpsa
../fonts/afm/public/apl/saxpsa.afm:FullName saxpsa
../fonts/map/dvips/apl/saxpsa.map:saxpsa saxpsa <saxpsa.pfb
../fonts/map/dvipdfm/tetex/saxpsa.map:saxpsa saxpsa <saxpsa.pfb
../fonts/map/fontname/saxpsa.map:saxpsa saxpsa <saxpsa.pfb
../fonts/map/pdftex/apl/saxpsa.map:saxpsa saxpsa <saxpsa.pfb
Binary file ./fonts/tfm/public/apl/saxpsa.tfm matches
Binary file ./fonts/type1/public/apl/saxpsa.pfb matches
../web2c/updmap.cfg:#Map saxpsa.map
../web2c/updmap.cfg:Map saxpsa.map
../dvipdfm/config/config:f saxpsa.map
| |
|
| Please see below...
Dan wrote:
> rbe wrote:
>
>
> Running texhash goes without saying in a tex system
> that requires it: do it whenever you add something to a
> texmf directory. But it should never be done in a system
> that doesn't have a texhash command.
>
>
> updmap does nothing unless the map file has
> been added to updmap.cfg; in that case texhash
> is unnecessary, because updmap will run texhash
> unless you tell it not to.
>
> To make updmap work properly you have to enable
> the map file. You do this by adding the line
> Map saxpsa.map
> to updmap.cfg. You can do that manually, or
> wit> updmap --enable Map=saxpsa.map
>
> If you do that, the editing of config.ps is unnecessary
> provided it already contains the line
> p psfonts.map
> Because what updmap does is (re)create psfonts.map
> and pdftex.map by concatenating all the .map files
> previously enabled.
>
>
> Dan
I finally got pdflatex working with the saxpsa font. There is still
something screwy, I think, with pdftex.map, but it seems to work now.
I thought that ANY map file would get picked up by pdflatex,
so I had placed saxpsa.map in each of the /usr/share/texmf/fonts/map/
subdirectories, with no luck. However, when I placed it directly in
/usr/share/texmf/fonts/map/pdftex.map, everything worked.
So, I'm on the air now, and am sending this along with my thanks to
you folks for your help, and to try to leave a bit of history about how
to do it in the future.
Regards,
Robert
------------------------------- cut here ---------------------
This is how I got the Demler/Tuttle/Wooster APL font, saxpsa,
installed under SuSE 10.1 teTeX. I managed to get latex, dvips,
pdflatex, and gv working this way.
Perform all of the following as root. If you don't want to do
that, you're on your own. However, if you want to tell me
where to put stuff to make that work, please do.
2. cd saxpsa (or to the directory to which you extracted the saxpsa*
files.)
3. Copy the following files to their new homes.
mkdir /usr/share/texmf/fonts/type1/public/apl
cp saxpsa.pfb /usr/share/texmf/fonts/type1/public/apl/
mkdir /usr/share/texmf/fonts/tfm/public/apl
cp saxpsa.tfm /usr/share/texmf/fonts/tfm/public/apl/
mkdir /usr/share/texmf/fonts/map/dvips/apl
cp saxpsa.map /usr/share/texmf/fonts/map/pdftex.map
The last one looks screwy to me, but it appears to work OK. What I find
odd is that kpsewhich -progname=pdflatex saxpsa.map finds
it if I put saxpsa.map in the above directory, but that pdflatex does
not.
If I use pdftex.map, it works properly. So, there's something that
I don't understand, apparently.
4. Edit the config files:
vi /usr/share/texmf/dvips/config/config.ps
5. Look for the following text:
% This shows how to add your own map file.
% Remove the comment and adjust the name:
% p +myfonts.map
6. Add the following line after the myfonts.map line:
p +saxpsa.map
7. Perform the commands that nobody ever seems to document:
texhash
updmap-sys
8. At this point, you should be able to (as a normal user) do:
latex apltest.tex
dvips apltest.dvi
gv apltest.ps
pdflatex apltest.tex
acroread apltest.pdf
9, Neither latex, pdflatex, nor dvips should complain about missing
saxpsa fonts.
Acroread and gv should show you a screenfull of APL characters in
their relevant positions.
10. To use the APL font, use the macros provided in the qdefsax.tex
file, as shown in the apltest.tex file. E.g., to assign (0,1,2,3,4)
to X, use {\apl X\qassign\qiota\05}.
11. Use the apltest.tex file as an example of how to include APL fonts
of various sizes in your LaTeX documents.
12. I found this document to be the key one in understanding fonts in
tex:
http://www.pragma-ade.com/pdftex/pdftex-s.pdf
| |
| Dieter Kilsch 2006-11-29, 7:13 pm |
| I suggest to use a .fd-file to be able to use the standard LaTeX scaling
macros \tiny ... \Huge in your document.
The file saxpsa.fd should have the following content:
\ProvidesFile{OT1saxpsa.fd}[2006/11/19 Dieter Kilsch]
\DeclareFontFamily{OT1}{saxpsa}{}
\DeclareFontShape {OT1}{saxpsa}{m}{n}{<->saxpsa}{}
The file qdefsax.tex must be changed in two ways. I recommend to rename
it to saxpsa.sty.
1) Enter the following line at the top of the file (or anywhere else)
\newcommand{\apl}{\fontencoding{OT1}\fon
tfamily{saxpsa}\fontseries{m}\fontshape{
n}\selectfont}
Calling \apl switches to the font Saxpsa according to the content of
OT1saxpsa.fd
2) In all the lines defining the \q.... macros the command \apl must be
deleted. If not done the scaling macros will not work.
saxpsa.sty and OT1saxpsa.fd should reside in
L/tex/Latex/saxpsa
where L stands or your (local) tex directory.
On installing the font in the MikTeX-distribution under Windows one has
to change the updating of the mapping files at the end (7. of Robert
Bernecky installation guide:
1) add the line
Map saxpsa.map
to the file
L/miktex/config/updmap.cfg
Create the file if it does not exist.
2) Execute on your DOS shell:
initexmf -u
initexmf --mkmaps
Due to the new line in updmap.cfg the last command adds the entry in
saxpsa.map to the file L/dvips/config/psfonts.map used by pdflatex to
properly embed the font.
The line
\apl\qiota\tiny\qiota\large\qiota\Huge\q
iota
will now work as expected in your document.
Dieter
|
|
|
|
|