MiKTeX How should I manually install a macro package?

Source: Internet
Author: User
Tags name database

Reprint: http://www.zhihu.com/question/26584112


Basically, automatic installation has only advantages and no obvious drawbacks.

Therefore, avoid manually installing the macro package. Packages that are normally required by MiKTeX can be installed automatically at compile time, or the package Manager installation will open.

If you have individual documents that require special macro packages that are not in the MiKTeX package list (for example, some journal class files), the simple way is to put all the files you want to use in the macro package in the compiled current directory, and compile with your. Tex source files.

Manual installation of the package is limited to a small number of occasions: the use of licenses and other issues not included in the MiKTeX, such as the inclusion of macro packages, long-term follow-up and use some of the latest development version of the macro package, frozen part of the old macro package version. Note These purposes can also be resolved by copying the macro package file to the current path of the source file to be compiled, so it is not required.

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------

Finally consider the process of manually installing a macro package.

This is a FAQ, because there are already a lot of long-winded, so there is nothing worth lengthy:
TeX Frequently asked Questions--question label "Installthings"
Installing-how can I manually install a package on MiKTeX (Windows)

To understand the process in general, you need to understand the TDS directory tree structure used by the Tex distribution, refer to: A directory Structure for TeX Files. The TeX release places different types of files in the corresponding path of the fixed structure, such as the TDS (Tex Directory Structure), or the TEXMF (Tex and metafont abbreviation) tree structure. A TeX distribution typically has multiple TDS trees, some of which are used to save automatic installation of macro packages, and others that are left to users to save manually installed macros. MiKTeX with the MiKTeX Options can see all of these TDS tree root, what you want to do is to install the macro package in the user management root directory, while keeping in mind the TDS provisions of the structure.

The installation process of different macro package differs, because of the format of the macro package and the characteristics of the macro package itself, the complexity varies. If the package itself has a separate installation description, or if there is a relevant section in the document, be sure to follow the author's instructions for installation. In most cases, the main operation of the installation is to copy files by the TDS structure:
It is relatively simple to install the so-called TDS package. This is the macro package of the author of the macro package of the class file, format files, source code, document description files, etc., according to the TDS structure, packaged into a compressed file. In this case only need to put the extracted files, keep the original TDS directory structure, copied to the previous MiKTeX user root directory (such as C:\Users\XXX\AppData\Roaming\MiKTeX\2.9\) can be found below. Sometimes downloaded installation files have the required format files, class files, document class compiled well, need to do is the TDS structure to correctly put the files in the correct location. In most cases it is simple:. sty,. CLS copied to the tex/latex/foo-name/directory;. DTX,. ins copied to source/latex/foo-name/directory,. pdf, README copy to doc/latex/ The foo-name/directory. However, sometimes the structure is complex, it is difficult (such as Beamer, various font packages). Sometimes downloaded only source code, usually is a. DTX formatted file, or a. dtx file in the. ins format. At this point you need to compile with the latex command, generate the necessary files, and then copy the method as above.

After you copy the file, you need the necessary post-processing action. The basic action is the so-called "Refresh file name database":

You can click a button like above, or you can run commands such as Texhash. More complex macro packages, especially font packages, have more complex post-processing operations, possibly updmap, or other, generic macro-package documents will be spoken.

Finally, it is a hassle to manually install a macro package, even for experienced development maintainers who often make mistakes. MiKTeX, TeX Live bug, there are some packaging methods (installation mode) error, such as:

miktex/bugs/#2053 wrong. sfd file directory in TDS

[Tex-live] Listings-package:wrong location for. prf Files

So as long as possible, it is best not to install the macro package yourself.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.