Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to distribute the LaTeX source my work to various people, who use different platforms and I want to save them from having to install the font I use manually. I am using this font: http://www.math.unl.edu/~shartke2/computer/latex/Millennial-20110819.tar.bz2

Is there a way I can point pdflatex from the LaTeX source to use the font package (Millenial) which is located in the same directory as the LaTeX source file?

share|improve this question
2  
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  barbara beeton Jul 29 '13 at 12:17
    
I changed the title and hope that it describes your problem better but please add yourself more information, on how you sources look like and for what purposes you want to distribute it … –  Tobi Jul 29 '13 at 18:42

2 Answers 2

In general Latex searches at three places and uses the file it founds first:

  1. Document folder
  2. User texmf tree
  3. Distribution tree

If the file is found at place 1 it stops searching otherwise it continues with place 2 etc. That means if you put the packed files in the document folder (or the paths where the class file is saved) Latex will find it. But make sure that distributing the font in this was is conform with its license!

share|improve this answer
    
The font can be downloaded as texmf folder. Should I place this folder in the same folder as the LaTeX source file? –  GEO Jul 29 '13 at 12:45
    
In what format is you source and why do you share it? Is it a collaborative work, or a template as a tex file or a class in cls format? Usually all users should install the fonts in their user texmf tree as suggested by the font tar package. ANd in case of fonts, the way I described above seems not to work, but it does for sty and cls files. I’ll delete my answer later. –  Tobi Jul 29 '13 at 18:36
    
The easiest way would be if the font is available on CTAN. The license seems to fit CTANs requirements. Maybe you can email the font packages author and ask if he want’s to share it on CTAN. In this case al users can use the font if they got an up to date TeX system installed … –  Tobi Jul 29 '13 at 18:38

Okay, now that I have found the password of my Account again, I'll give a answer to my own question. I have found a Solution that fits my needs pretty well, as I am using a custom build script to compile my documents.

What Tobi meant was the search of TeX for the TEXINPUTS path. It does not seem possible to set this path from inside a LaTeX document:

(have a look at http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2006-12/msg01539.html)

My Solution is to export the following variables before calling pdflatex(Note: If you export a relative path, it has to be relative to the directory where pdflatex is called, the double slash means the folder should be searched recursively, which is what we need):

UNIX Systems:

export TEXINPUTS=./path/to/font/directory//:
export TEXFONTS=./path/to/font/directory//:

WINDOWS Systems:

set TEXFONTS=./path/to/font/directory//;
set TEXINPUTS=./path/to/font/directory//;

I have two compile scripts available in the directory of my document: compile.sh for unix systems and compile.bat for windows systems.

EDIT: I forgot to mention that it is important to add

\pdfmapfile{=Fontname.map}    

to the document, in order to use the font. (Replace Fontname by the name of the font). This spares the run of updmap, as we don't wont to involve system wide steps, just use our attached font.

share|improve this answer

Your Answer

 
discard

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.