2

What is a local packages repository and how to create a local package repository? I need to add some .sty and .cls files of my own, I follow the instructions from some users of this forum but whatever I did mikTeX did not accept any diretory that I create! I get messages like the following:

MiKTeX Problem Report
Message: C:\myextrapackages does not seem to be a local package repository.
Data: C:\myextrapackages
Source: Libraries\MiKTeX\UI\MFC\SiteWizLocal.cpp
Line: 206
MiKTeX: 2.9
OS: Microsoft Windows Vista Business Edition, 32-bit Service Pack 2 (build 6002)
Invokers: miktex-taskbar-icon
SystemAdmin: no
PowerUser: no
Root0: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9
Root1: C:\myextrapackages
UserInstall: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9
UserConfig: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9
UserData: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9
CommonInstall: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9
CommonConfig: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9
CommonData: C:\Users\Alain\Documents\UsbTex_1.5_1.6\USBTeX-1.6\programs\MiKTeX_2.9

Thanks for help!

Alain

  • 1
    Welcome to TeX.SE. – Mico Apr 2 at 15:55
  • 1
    I think you are mixing terms a Local package repository usually holds a master set of packages off-line rather than on-line. If you are trying to use a local set of personal .sty files the location is a Local Texmf tree that is normally located via use of TEXINPUTS. If the .sty is one from a Ctan package ONLY use the package manager If it is unsupported by Package manager look for the TDS version and install to a texmf location If it is a .sty without TDS structure then position it in the same way as TDS OR simplest still place it alongside the current tex file – KJO Apr 2 at 16:40
3

You asked,

how [does one] create a local package repository?

Here's a screenshot from the webpage https://miktex.org/howto/local-repository:

enter image description here

0

You asked about the first option (Local package repository) in this guide by Ulrike https://tex.stackexchange.com/a/482238/170109 but note that is for master packages that should be downloaded and managed by MiKTeX i.e. usually done when downloading on the fly is not possible.

You have not identified if they are downloaded 3rd party TDS files that can be installed by the 2nd method. A slightly easy option as it then only requires the zip be decompressed correctly and the single directory added to the texmf paths.

However from your limited description (I need to add some .sty and .cls files of my own) what you NEED is the 3rd option to manually install personal files in a personal folder tree. Such a tree is called a Local texmf directory with structured subfolders. The master folder is usually pointed to by a system variable However MiKTeX has a marginally easier way to locate such a directory. So make a texmf directory under C:\myextrapackages e.g. C:\myextrapackages\texmf then place your files in the correct locations per this guide How can I manually install a package on MiKTeX (Windows) BUT IGNORE THE SECTION ABOUT LOCAL REPOSITORY that is only for Problems with useage 1 above and should be avoided in most cases. (Always use MiKTeX-console package manager for MiKTeX packages)

The is a fuller wiki description here https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages#Installing_a_package

Once the files are in place you use MiKTeX-console to add the texmf directory under Settings > Directories and then run the Tasks Update file name database etc. to maintain the folder locations any time they are added to.

0

I finally found the answer that is identical to that of MICO.

There is a Miktex manual installed where I found that the C:\myextrapackages directory I created can only be a data directory
after I put a new environment variable TEXINPUTS=C:\myextrapackages

While the environment variable MIKTEX_REPOSITORY=C:\myextrapackages blocks Miktex Settings.

Thank you to all

Alain

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.