How do I install the listings package manually ?. With other packages I used to download all the files needed and copied in the right folders and then refreshing the packages and it worked perfectly, but some of the files I need now for this package is listings.sty and lstlang1.sty, but I don't find them anywhere on the net , the folders contain anything but those files. Any help would be appreciated

  • 3
    Is there a something like listings.ins? If yes, then run as user with right permissions pdflatex listings.ins. This should generate the missing files – user31729 Jul 29 '14 at 8:31
  • 2
    ctan.org/tex-archive/macros/latex/contrib/listings And what @ChristianHupfer said. – Johannes_B Jul 29 '14 at 8:32
  • 1
    If @ChristianHupfer's solution doesn't do the trick, it would probably help knowing which OS and which Tex distribution you are using, there are differences - as far as I know - how for example MikTeX and TeXLive handle this even on the same OS. – BMWurm Jul 29 '14 at 8:33
  • thanks Yes , there's a listings.ins I'm sorry but how do I run it? ,well I have a program called Texmaker , do I open it and then click 'pdflatex'? , I'm sorry , I'm kinda confused because I never needed to do it this way – james Jul 29 '14 at 8:36
  • my OS is windows XP – james Jul 29 '14 at 8:37

You definitely should install the latest version of MiKTeX.I suggestyou first make a list of the installed packages with your present version. Then go toMiKTeX's download page, wher you'll can choose between a basis installer (32bit) or a basic installer (64bit). Download the one you want and follow the instructions.

enter image description here

When installation is finished, launch the package manager to add the packages you're interested in that are not part of the basic installation. It's not important if you forget to install some of them: if they're used in the preamble of one of your files, they will be downloaded on the fly when compiling.

enter image description here

If you don't want to install a new version of MiKTeX, you could download from CTAN a ready-to-install package listings-tds-zip (such files are to be found in the install directory). However such a file has not been made, but you can download the (almost) equivalent from MiKTeX's directory on CTAN, say here.

You download listings.tar.lzma in a directory of your choice, and uncompress it; you get a listings.tar file, uncompress this last one and you copy the contents of the resulting texmf directory at the root of your TeXMFLocalroot. If you don't have one, create it first, wherever you please, and declare it a root via MiKTeX options (root tab):

enter image description here

Finally refresh the FNDB. Lisings is now ready to use.

  • Thanks for replying , definitely I would try that too , you know , I 'm trying to run listings.ins and it says that my internet settings may change , should I proceed? – james Jul 29 '14 at 9:11
  • Sorry, I have no idea: I never installed listings, and never had such a message on installing other packages myself. However there are 2 .ins files. Maybe the compilation order is important. I'll add another, simpler way to my answer in a moment. – Bernard Jul 29 '14 at 9:21

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.