TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an environment defined in a file env.sty as well as the file task.tex which is based on that environment. How can I get TeXworks to read set the environment defined in a file, so that it is visible to task.tex?

TeXworks fails when rendering task.tex into PDF with pdfTeX with error ! LaTeX Error: Environment task undefined. which means that it can't find user-defined environment in file task.tex.

share|improve this question

migrated from stackoverflow.com Apr 4 '11 at 14:36

This question came from our site for professional and enthusiast programmers.

Are they in the same directory? I'd post this as an answer but it seems too obvious. – Emre Apr 4 '11 at 15:10
@Emre: I think you could post it as an answer indicating the obvious solution... why not? – Gonzalo Medina Apr 4 '11 at 15:31
Did you add \usepackage{env}? – Caramdir Apr 4 '11 at 16:03

The first thing to check is that the files are in the same directory. Has this been done, or is there some obstacle?

share|improve this answer

Could also try \usepackage{<path>/env.sty}, where <path> is either the relative or full path to the directory where the env.sty file is located.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.