# Defining environment in TeXworks

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.

-
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

## migrated from stackoverflow.comApr 4 '11 at 14:36

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

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.