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 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
1  
Did you add \usepackage{env}? –  Caramdir Apr 4 '11 at 16:03
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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