本帖最后由 zyzx 于 2014-1-24 09:50 编辑 + G! p$ U4 f8 a `* N( }
( \* _, Z& {$ V6 U
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
1 K$ M" l u5 u- X“
1 W/ }+ c c$ X/ R8 [' O! LaTeX Error: File `booktabs.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ”* z: y# Y9 \% t3 v4 |
* I: B0 W& y2 y/ A2 y
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:# t' m, v3 j: r$ O1 K! T
booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme
$ s' c, M: k1 ^6 Q0 p其中readme里面有文件列表和安装方法:! m7 d3 G; m2 o% W
“
* d" E3 ^) R6 f5 |3 D: t, ?7 vFILES IN DISTRIBUTION4 ~( v; H2 w5 B. W' X# A( E- J
===================== ^5 K4 C Z& `
BASE DISTRIBUTION:
" |, `# x$ `# V7 n. h# z5 F; W# ^ README This file.2 ^; a; O: B6 ~1 Q
booktabs.ins Package installation file.$ S7 m( \& U, k, u9 W9 j% Z
booktabs.dtx Package source file.* O. a6 L2 p1 W6 \% \
COPYING GPL license file.1 ^4 k- f) F9 R$ r3 N
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".
1 G" U0 m' L, V& Y& k6 v; U DOCUMENTATION:; r& x2 B9 h6 S( W% o9 _
booktabs.pdf User manual for booktabs package. It was produced by executing:
7 e i; E; J2 a3 D pdflatex booktabs.dtx5 f$ a; Q) W' Q
pdflatex booktabs.dtx/ u' F( H' W5 l0 Y
makeindex -s gglo.ist -o booktabs.gls booktabs.glo
) m' f0 a# g: Y% ~( |. E5 a makeindex -s gind.ist -o booktabs.ind booktabs.idx4 {" N2 Y# y4 [. H" E1 u& y8 `4 m
pdflatex booktabs.dtx
4 K W6 z- _7 T' f4 } pdflatex booktabs.dtx8 T* Y0 X3 I2 t; [& o( {; [
BASIC INSTALLATION
4 P. Z' C x6 x, D====================
/ U+ H8 n" }# ]* L1 ]( H1 p The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
* D. i2 K" S" L! b5 l4 [ For a basic installation on a TDS compliant system, move the following files to the following directories:
; y- O: F I% k6 e <texmf>/tex/latex/booktabs/
$ X* ]( D) w0 E: j4 X0 N booktabs.sty
- o) v, e9 \( P1 r0 \. D <texmf>/source/latex/booktabs/
& }3 M8 Z0 s5 { booktabs.ins
5 n6 ^# h/ N! W% r% M, {) @ booktabs.dtx, I6 x/ }) B& Y2 @5 e/ b2 [& ^
COPY, [2 X, U2 h# N! L. d4 Z
<texmf>/doc/latex/booktabs/+ \! i: ]* U% T
README( S3 |9 f# V3 ? \ r9 F, b
booktabs.pdf
' V! Y. f2 U( H% N9 }9 w# r”+ G) D+ G# ~# c- s3 W
e6 z. h# S7 r$ t8 Q我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |