4

I want to be able to use a proprietary font on a number of Linux machines for which TeXLive is installed locally (not through the package manager). I have followed How do I use TrueType Fonts with PDFTeX using otftotfm? and have my proprietary font working with pdflatex when all the files (map, encoding, tfm, pfb, ...) are in the working directory. I then followed Manual font installation and can manually install the font. I would like to automate the final step. Normally, I would create a Linux package that would install the needed files and do the configuration steps. Since I have TeXLive installed locally, I don't feel like using the system package manager is the way to go. I would like to create a TeXLive package and use tlmgr to manage it.

The end goal is I want people to be able to do tlmgr --file myfont and then be able to use the font. Is this possible?

5
  • If you are using Debian, why not to make a deb file?
    – Sigur
    Nov 20, 2014 at 16:07
  • 1
    @Sigur Had I installed TeXLive with the system package manager, I could just create a deb file. Since I went with a local install of TeXLive, which means TeXlive is installed in /usr/local, it is bad form for a deb package to install or modify anything in /usr/local.
    – StrongBad
    Nov 20, 2014 at 17:47
  • You can use the local folder to do that. Here I have /usr/local/texlive/texmf-local/ or you can use ~/texmf-local.
    – Sigur
    Nov 20, 2014 at 17:48
  • @Sigur I am pretty sure fonts are not the same as packages and classes in that you need to run updmap after adding things to texmf-local.
    – StrongBad
    Nov 20, 2014 at 17:54
  • Well, I installed a font there. I have the folders bibtex doc dvips fonts ls-R metapost tex tlpkg web2c and everything works well. You can ask deb to execute it.
    – Sigur
    Nov 20, 2014 at 17:55

1 Answer 1

5

If you want to create a TeX Live package, you need to do the following steps. I assume here that you are not shipping any binaries, but only files in a the texmf hierarchy. Also assume that the package is called foo:

  • prepare a TDS tree of the package, say in foo, that is, you have foo/tex, foo/fonts etc.
  • write a tlpobj file in foo/tlpkg/tlpobj/foo.tlpobj that contains the following lines:
name foo
category Package
revision 1
shortdesc something reasonable about your package
relocated 1
execute addMap foo.map
longdesc some more description
longdesc if you want to add it
longdesc can be multi line
runfiles size=1
 RELOC/fonts/map/dvips/foobar.map
 RELOC/fonts/truetype/....
 ...
docfiles size=1
 RELOC/doc/fonts/foo/README
 ....
srcfiles size=1
 RELOCE/source/fonts/foo/...

where the following things are important:

  • relocated 1
  • the size parameter can be the actual size in 1k multiplies, but you don't need to add the correct number
  • list all files in one of the section!
  • if you have a map file included and want to activate it, add the execute line, possible adjusting the name of the file

After that go into foo and do tar -cJvf foo.tar.xz . to get the package, which you can install with tlmgr install --from-file foo.tar.xz.

Examples for how a tlpobj file looks like can be found by looking at the texlive.tlpdb, each stanza starting with name is one.

9
  • Can this be used to install into the local tree?
    – cfr
    Nov 20, 2014 at 23:00
  • 1
    If you use user mode tlmgr, then it can be installed into an arbitrary texmf tree.
    – norbert
    Nov 21, 2014 at 5:00
  • tlmgr install --from-file foo.tar.xz fails with Unknown option: from-file while tlmgr install --file foo.tar.xz fails with: Use of uninitialized value $_[0] in concatenation (.) or string at /usr/local/texlive/2014/tlpkg/TeXLive/TLPOBJ.pm line 74. Use of uninitialized value $_[0] in concatenation (.) or string at /usr/local/texlive/2014/tlpkg/TeXLive/TLPOBJ.pm line 74. Cannot open tlpobj file: at /usr/local/texlive/2014/tlpkg/TeXLive/TLPOBJ.pm line 74.
    – StrongBad
    Nov 21, 2014 at 10:32
  • 1
    @StrongBad sorry for the late answer - it should have been --file ...
    – norbert
    Dec 1, 2014 at 12:38
  • @norbert as I mentioned in the previous comment, I tried with the --file and get an error.
    – StrongBad
    Dec 1, 2014 at 13:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .