I downloaded a zip file from my professor containing a sample CV and associated files (log files, moderncv.cls, moderncvcompatibility.sty, moderncvstylebanking.sty, etc.) The file compiles when I run it, but when I copy the code to a new window of my compiler, instead of running the original file I downloaded, there are several visual differences, see PDF output is different after copying code into new file and compling

After using \listfiles, I noticed that the .cls and .sty files I mentioned above are outdated in the original file compared to when I copy and recompile. So I have two questions:

  1. How can I get the original .tex file to use the more recent files? I updated all of my packages in MikTeX so I'm assuming the original Tex file is using the older files my professor sent me.

  2. Is there a way to make the new file look like the original one? I'm worried about compatibility issues down the road if I do not update everything now.

  • LaTeX looks first in the directory where the .tex file is and second in the system directories where all the installed packages are stored. So if an old version is found in the current directory then that will be used. If you don't want that (and always want to use the system installed version) then you should delete the old .sty and .cls files from that directory, to force LaTeX to use newer, installed versions. If, conversely, you want to use the older .sty and .cls files for a new document, then you should copy the old files to the directory of your new document. – Marijn Jul 26 at 20:10

Your Answer

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

Browse other questions tagged or ask your own question.