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'm trying to create my CV in LaTeX but got into problems. I'm using Ubuntu 12.04, the package texlive-latex-extra includes the 2008 version of moderncv, but I want to use the newer 2012 moderncv version which has it's differences. I cannot uninstall that package because some packages there are used by other documents.

I've downloaded the new moderncv from CTAN but I'm having trouble using it. I'm trying to organize my document using the following layout:

  • style/ <- moderncv files, *.sty, *.cls, etc.
  • publish/ <- pdflatex output.
  • cv.tex <- My CV.
  • publications.bib <- My publications.
  • face.png <- Photo.
  • Makefile <- Makefile :P

In my Makefile I have:

all:
    TEXINPUTS=./style//:$TEXINPUTS pdflatex -halt-on-error -output-directory ./publish/ ./cv.tex
clean:
    rm -rf ./publish/*

The problem comes here:

When I try to make I got several errors:

(./style/moderncv.cls
Document Class: moderncv 2012/08/10 v1.1.3 modern curriculum vitae and letter document class
! LaTeX Error: File `size11.clo' not found.
! LaTeX Error: File `etoolbox.sty' not found.
! LaTeX Error: File `ifthen.sty' not found.
! LaTeX Error: File `xcolor.sty' not found.
! LaTeX Error: File `fontenc.sty' not found.
! LaTeX Error: Unknown option `T1' for package `fontenc'.

An I don't know how to fix them.

I can compile the document if I move the style/* files (moderncv classes) to the same directory as the cv.tex file but that's a mess. What am I missing?

share|improve this question
2  
Welcome to TeX.SE. ubuntu comes with a really old distribution. You should update to current release. –  Peter Grill Sep 27 '12 at 2:59
1  
There is a generic question that deals with this problem from Debian/Ubuntu. I do not recommend that you mess about with TEXINPUTS for something this simple. –  jon Sep 27 '12 at 3:11
    
You need to following the instructions listed under How do I update my TeX distribution?, rather than installing packages manually. For TeX Live, this should be as simple as a command line tlmgr update --self --all. –  Werner Sep 27 '12 at 5:11
    
Also it looks to me as if you are trying to tell pdflatex that everything it needs to find will be in the style directory, which clearly isn't true. You should either update your TeX distribution, or update only the relevant packages (say, if bandwidth is a problem). The answer linked to in my earlier comment shows you how to do either method. The even more short-term, and not recommended solution is, as you've figured out, to leave the moderncv stuff in the working directory. –  jon Sep 27 '12 at 5:17
add comment

1 Answer

up vote 1 down vote accepted

Actually it was just an error in the Makefile. Instead of using $TEXINPUTS I should have used $(TEXINPUTS). This is the corrected Makefile:

all:
    TEXINPUTS=./style//:$(TEXINPUTS) pdflatex -halt-on-error -output-directory ./publish/ ./cv.tex
clean:
    rm -rf ./publish/*

And this is my current Makefile:

PUBLISH=./publish/
PKGS=TEXINPUTS=./style//:$(TEXINPUTS)

LATEX=/usr/bin/pdflatex
LATEXOPT=-halt-on-error -interaction errorstopmode -output-directory $(PUBLISH) ./cv.tex

BIBTEX=/usr/bin/bibtex
BIBTEXOPT=$(PUBLISH)cv

all: clean compile bibliography recompile open

clean:
    rm -rf $(PUBLISH)*

compile:
    $(PKGS) $(LATEX) $(LATEXOPT)

bibliography:
    $(BIBTEX) $(BIBTEXOPT)

recompile:
    $(PKGS) $(LATEX) $(LATEXOPT)
    $(PKGS) $(LATEX) $(LATEXOPT)

open:
    xdg-open $(PUBLISH)cv.pdf

And is working perfectly :)

share|improve this answer
    
Glad you sorted it out! Just as FYI, you can also create a "local" (for every user of your system) and/or "home" (for yourself only) texmf tree. That way, you can add/modify any packages without interfering with your base LaTeX installation. LaTeX is smart enough to handle different trees and give your home/local tree higher priority over the global one. –  Xavier Sep 27 '12 at 18:29
add comment

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.