1

I want to use any font available as a package via CTAN, to name one: cabin in a document versioned by git, but more importantly: with multiple collaborators.

As only few LaTeX distributions have these installed, it would be really helpful to just be able to put them into the document's folder. Our current workflow is rather broken: Those who don't have the fonts installed (and don't want to/don't know how to/whatever) simply comment out the RequirePackage in their classfiles resulting in "slightly" unpredictable document look, which is bad.

So what I want is something like this:

- Documents
 \
 |- .git
 | \
 | |- .YOUKNOWHOWGITFOLDERSLOOK
 |
 |- Document 1
 | \
 | |- doc1.tex
 | |- mypkg.sty
 | |- anotherpkg.sty
 | |- PUTCABINHERE
 |
 |- Document 2
 | \
 | |- doc2.tex
 | |- mypkg.sty
 | |- anotherpkg.sty
 | |- PUTCABINHERE
 |
 |- ...

Where PUTCABINHERE might either be a folder or one or multiple files. Also, if possible, I'd like to avoid requiring everybody to update their font cache everytime a new document is created. Would not work out well.

So: (How) Is that possible?

LDericher
  • 185
  • Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Martin Schröder Jun 20 '14 at 00:09
  • 1
    I suspect this will be much easier if you are willing to use OTF fonts (and thus the LuaTeX or XeTeX engines) rather than the Type 1 fonts (and pdfTeX). Then it is simply a matter of including one file for each font used. Type 1 fonts are usually somewhat 'messier'. – jon Jun 20 '14 at 02:27
  • Cabin is included in TeX Live and MiKTeX. Installing local copies in addition will only confuse things. – cfr Jun 20 '14 at 02:29
  • I'd simply defer the font problem to the final stage of production, when the team member in charge of it will be able to use the desired typefaces. – egreg Jun 20 '14 at 09:03
  • 1
    You could install the font in a TDS-complaiant way in your git repository. Then all team members have to declare this directory as new local TeX tree, run texhash and include the map file. OTOH, using an OTF font is easier! – Josef Jun 20 '14 at 09:32
  • 1
    Since you're using git, this sounds like an ideal use case for something like git submodules (there are alternatives). – Andrew Stacey Jun 20 '14 at 12:14
  • Meanwhile, I found this question http://tex.stackexchange.com/questions/59702/suggest-a-nice-font-family-for-my-basic-latex-template-text-and-math?rq=1 – now I have to review my font choices anyway. I still like most of your comments, though :) – LDericher Jun 22 '14 at 20:24

1 Answers1

2

You can install the cabin font in your git repository

Here's a recipe for TeXLive

  • download cabin.tds.zip and unzip it inside your repository, e.g. c:/Dropbox/GIT/test/cabin/

The following steps must be executed once by every team member:

  • add TEXMFHOME = {c:/Dropbox/GIT/test/cabin,~/texmf} to texmf.cnf in your /texlive/20XX/ directory. Of course, replace with the real path! We don't need to run texhash by using TEXMFHOME! C:\Users\xxxxx>kpsewhich cabin.sty -> c:/Dropbox/GIT/test/cabin/tex/latex/cabin/cabin.sty

  • include the map file with: updmap-sys --enable Map=cabin.map

Here we go:

\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{cabin}
\renewcommand\familydefault{\sfdefault}
\begin{document}
\section{Test}
Test
\end{document}

cabin test

Here are parts of the log file:

(c:/Dropbox/GIT/test/cabin/tex/latex/cabin/cabin.sty
Package: cabin 2013/07/20 (Bob Tennent) Supports Cabin fonts for all LaTeX engi
nes.

LaTeX Font Info:    Try loading font information for T1+Cabin-TLF on input line
 6.
...
(c:/Dropbox/GIT/test/cabin/tex/latex/cabin/t1cabin-tlf.fd
File: T1Cabin-TLF.fd 2012/11/17 (autoinst) Font definitions for T1/Cabin-TLF.
)
LaTeX Font Info:    Font shape `T1/Cabin-TLF/m/n' will be
(Font)              scaled to size 10.0pt on input line 6.
\c@mv@tabular=\count88
\c@mv@boldtabular=\count89
LaTeX Font Info:    Font shape `T1/Cabin-TLF/m/n' will be
(Font)              scaled to size 14.4pt on input line 7.
LaTeX Font Info:    Font shape `T1/Cabin-TLF/b/n' will be
(Font)              scaled to size 14.4pt on input line 7.
...
{c:/Dropbox/GIT/test/cabin/fonts/enc/dvips/cabin/cbn_aojlca.enc}<c:/Drop
box/GIT/test/cabin/fonts/type1/impallari/cabin/Cabin-Bold.pfb><c:/Dropbox/GIT/t
est/cabin/fonts/type1/impallari/cabin/Cabin-Regular.pfb>
Output written on osmimagetest.pdf (1 page, 7746 bytes).
Josef
  • 7,432