windows latex error: file 'slashbox.sty' not found

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010801696/article/details/79410545

1.下载slashbox.sty

https://www.ctan.org/tex-archive/macros/latex/contrib/slashbox/

2.拷贝到 「作者目录(sty存放目录)」C:\texlive\texmf-local\tex\latex\local 目录下

[参考信息:

All of the other answers cover things quite well, but I thought a slightly different version might be helpful.

There are two parts to telling TeX about a new .sty file. First, you have to put it in the 'right' place and second you need to update the database TeX uses to find files. The place to put the file depends on your operating system. Assuming you have a standard installation, this will probably be:

  • Windows 10 (and miktex) 
    C:\Users\<user name>\Appdata\Local\MikTex\<number>\tex\latex\local\
  • Windows Vista/7 C:\Users\<user name>\texmf\tex\latex\local\
  • Windows XP C:\Documents and Settings\<user name>\texmf\tex\latex\local\
  • Linux ~/texmf/tex/latex/local/
  • Mac OS X /Users/<user name>/Library/texmf/tex/latex/local/

Note: the local/ folder might not exist; in this case, go ahead and create it.

A few of notes on that. First, on Windows the 'Users' part of the location is language dependent. Second, I've represented your home/user folder as '<user name>': this will obviously be dependent on your system. The folder I've indicated may well not exist: you may just have the texmf part, bits within that or nothing at all. The file location is important, and although you could just put your file inside texmf/tex/latex is is usual to keep things organised by package. The local folder is reserved for stuff installed on individual machines.

Letting TeX 'know' about the file means running a program that builds a database of file locations. There are graphical interfaces to do this, but the way that works on all operating systems is to use the Command Prompt/Terminal and type texhash. This will build the databases for your tree (the one that is in your home folder). Once the 'hash' is created TeX should be able to find your file. For recent TeXLive distributions, this step is not necessary for files in the local folder.

 ]

3.run:texhash

猜你喜欢

转载自blog.csdn.net/u010801696/article/details/79410545