I need to find the dependency files for a certain LaTeX report, which includes some files not in the current directory (I assume it finds these on the system path). Currently, I've put a template on ShareLatex.com, but it won't compile as these are missing. How might I find these files?

E.g. In the template it has \usepackage {graphicx}, and on this line the compiler says LaTeX Error: File `a4-mancs.sty' not found.

Thanks for your help. Let me know if anything needs clarifying, as I'm a bit confused myself.

  • Adding \listfiles to your preamble on the computer that compiles the project will list all the files included and their locations. From there you can copy-and-paste them to ShareLaTeX. – Werner Dec 12 '16 at 20:49
  • 1
    @Werner \listfiles doesn't show the path but that is always shown in the log anyway. – David Carlisle Dec 12 '16 at 20:58
  • @DavidCarlisle: True. \listfiles only show the file and a short description. – Werner Dec 12 '16 at 20:59
  • every time tex includes a file it shows the file path used both on the terminal and in the log, so if your file works locally the log will show something like (/usr/local/tex/latex.a4-mancs.sty or whatever the path is. – David Carlisle Dec 12 '16 at 20:59
  • 1
    you can't possibly want a4-mancs.sty in any real document written this century, a better alternative would be just update the document not to use it. (I can speak with some authority on that, as I assume it's https://github.com/taxomania/Project-Report/blob/master/a4-mancs.sty#L6 (note the initials:-) – David Carlisle Dec 12 '16 at 21:14

Thanks everyone, yes it was as simple as looking at the terminal output when calling latex on the .tex file. And regarding a4-mancs.sty, it's being used for my 3rd year project report as it is in that link. I think I'd probably be best suited making sure it adheres to my university's expectations :) But thanks for the tip!

  • The problem is probably on the previous line. TeX just doesn't realise until this line. You really don't want to use a4-mancs.sty. It can't be required to use that. Just use geometry with appropriate settings instead. – cfr Dec 13 '16 at 1:38
  • @cfr and David: Thanks for your help. And you are indeed correct about it being the previous line - I wasn't aware that was how it reported errors so thank you. LaTeX isn't one of my strong suits but out of curiosity what is bad about the a4-mancs.sty file other than it being well out of date? – bryn123 Dec 13 '16 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.