latex sty文件缺失問題 [轉(zhuǎn)載]

原文出處

安裝style文件

方法一:自動安裝

terminal中

sudo tlmgr install xxxx

方法二:半自動安裝

如果壓縮包中沒有sty文件畏浆,可以先用latex命令編譯一下

sudo latex packagename.ins

注意,要在.ins的目錄下,否則找不到該文件愿待,然后一路回車,就會發(fā)現(xiàn)編譯出一些.sty文件或者其他更多文件,下一步就是方法三種的步驟了

sudo texhash

sudo mktexlsr

方法三:手動安裝

將.sty文件拷貝到 /usr/local/texlive/2016basic/texmf-dist/tex/latex/packagename

然后利用命令告訴系統(tǒng)

sudo texhash

sudo mktexlsr

安裝完宏包之后,texhash烦味、mktexlsr等工作都做了,但是還是提示找不到宏包壁拉,我?guī)缀趺看味紩龅竭@個(gè)問題谬俄,偶然發(fā)現(xiàn),把.tex文檔的內(nèi)容繼續(xù)編輯一下弃理,然后保存溃论,再編譯,就ok啦

查看宏包信息

sudo tlmgr info xxxx

或者

sudo tlmgr show xxxx

其中xxxx就是想要查看的宏包名

示例

sudo tlmgr info titlesec

如果已經(jīng)安裝了titlese宏包痘昌,反饋結(jié)果如下

tlmgr: package repository http://ctan.math.washington.edu/tex-
archive/systems/texlive/tlnet (not verified: gnupg not available)
package: titlesec
category: Package
shortdesc: Select alternative section titles
longdesc: A package providing an interface to sectioning commands for selection from various title styles. E.g., marginal titles and to change the font of all headings with a single command, also providing simple one-step page styles. Also includes a package to change the page styles when there are floats in a page. You may assign headers/footers to individual floats, too.

installed:  Yes

revision:    40129

sizes:      run: 121k

relocatable: No

cat-version: 2.10.2

cat-date:    2016-03-21 21:28:19 +0100

cat-license: lppl

cat-topics:  headings page-hf

cat-related: fancyhdr titleps sectsty titletoc tocloft

collection:  collection-latexextra

宏包定位

locate xxxx

比如locate titlesec

反饋結(jié)果如下:

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/CHANGES

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/README

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/block.tss

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/drop.tss

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/frame.tss

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/leftmargin.tss

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/margin.tss

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/rightmargin.tss

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titleps.pdf

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titleps.sty

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titleps.tex

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titlesec.pdf

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titlesec.sty

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titlesec.tex

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/titletoc.sty

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/ttlkeys.def

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/ttlps.def

/usr/local/texlive/2016basic/texmf-dist/tex/latex/titlesec/wrap.tss

/usr/local/texlive/2016basic/tlpkg/tlpobj/titlesec.tlpobj

卸載sty文件

sudo tlmgr remove --force xxxx

示例

sudo tlmgr remove --force biblatex

反饋結(jié)果:

tlmgr: removing package biblatex

tlmgr: ultimately removed these packages: biblatex

tlmgr: package log updated: /usr/local/texlive/2016basic/texmf-var/web2c/tlmgr.log

running mktexlsr ...

done running mktexlsr.

尋找文件

tlmgr search --file biblatex

如果已經(jīng)安裝過biblatex钥勋,結(jié)果如下

texmf-dist/bibtex/bib/biblatex/biblatex/biblatex-examples.bib

    texmf-dist/bibtex/bib/biblatex/biblatex/biblatex-examples.bltxml

    texmf-dist/bibtex/bst/biblatex/biblatex.bst

    texmf-dist/tex/latex/biblatex/bbx/alphabetic-verb.bbx

    texmf-dist/tex/latex/biblatex/bbx/alphabetic.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle-comp.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle-ibid.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle-icomp.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle-tcomp.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle-terse.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle-ticomp.bbx

    texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx

    texmf-dist/tex/latex/biblatex/bbx/authoryear-comp.bbx

    texmf-dist/tex/latex/biblatex/bbx/authoryear-ibid.bbx

    texmf-dist/tex/latex/biblatex/bbx/authoryear-icomp.bbx

    texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx

    texmf-dist/tex/latex/biblatex/bbx/debug.bbx

    texmf-dist/tex/latex/biblatex/bbx/draft.bbx

    texmf-dist/tex/latex/biblatex/bbx/numeric-comp.bbx

    texmf-dist/tex/latex/biblatex/bbx/numeric-verb.bbx

    texmf-dist/tex/latex/biblatex/bbx/numeric.bbx

    texmf-dist/tex/latex/biblatex/bbx/reading.bbx

    texmf-dist/tex/latex/biblatex/bbx/standard.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose-ibid.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose-inote.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose-note.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose-trad1.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose-trad2.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose-trad3.bbx

    texmf-dist/tex/latex/biblatex/bbx/verbose.bbx

    texmf-dist/tex/latex/biblatex/biblatex.cfg

    texmf-dist/tex/latex/biblatex/biblatex.def

    texmf-dist/tex/latex/biblatex/biblatex.sty

    texmf-dist/tex/latex/biblatex/blx-bibtex.def

    texmf-dist/tex/latex/biblatex/blx-compat.def

    texmf-dist/tex/latex/biblatex/blx-dm.def

    texmf-dist/tex/latex/biblatex/blx-mcite.def

    texmf-dist/tex/latex/biblatex/blx-natbib.def

    texmf-dist/tex/latex/biblatex/cbx/alphabetic-verb.cbx

    texmf-dist/tex/latex/biblatex/cbx/alphabetic.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle-terse.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx

    texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx

    texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx

    texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx

    texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx

    texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx

    texmf-dist/tex/latex/biblatex/cbx/debug.cbx

    texmf-dist/tex/latex/biblatex/cbx/draft.cbx

    texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx

    texmf-dist/tex/latex/biblatex/cbx/numeric-verb.cbx

    texmf-dist/tex/latex/biblatex/cbx/numeric.cbx

    texmf-dist/tex/latex/biblatex/cbx/reading.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx

    texmf-dist/tex/latex/biblatex/cbx/verbose.cbx

    texmf-dist/tex/latex/biblatex/lbx/UKenglish.lbx

    texmf-dist/tex/latex/biblatex/lbx/USenglish.lbx

    texmf-dist/tex/latex/biblatex/lbx/american.lbx

    texmf-dist/tex/latex/biblatex/lbx/australian.lbx

    texmf-dist/tex/latex/biblatex/lbx/austrian.lbx

    texmf-dist/tex/latex/biblatex/lbx/brazil.lbx

    texmf-dist/tex/latex/biblatex/lbx/brazilian.lbx

    texmf-dist/tex/latex/biblatex/lbx/british.lbx

    texmf-dist/tex/latex/biblatex/lbx/canadian.lbx

    texmf-dist/tex/latex/biblatex/lbx/catalan.lbx

    texmf-dist/tex/latex/biblatex/lbx/croatian.lbx

    texmf-dist/tex/latex/biblatex/lbx/czech.lbx

    texmf-dist/tex/latex/biblatex/lbx/danish.lbx

    texmf-dist/tex/latex/biblatex/lbx/dutch.lbx

    texmf-dist/tex/latex/biblatex/lbx/english.lbx

    texmf-dist/tex/latex/biblatex/lbx/finnish.lbx

    texmf-dist/tex/latex/biblatex/lbx/french.lbx

    texmf-dist/tex/latex/biblatex/lbx/german.lbx

    texmf-dist/tex/latex/biblatex/lbx/greek.lbx

    texmf-dist/tex/latex/biblatex/lbx/icelandic.lbx

    texmf-dist/tex/latex/biblatex/lbx/italian.lbx

    texmf-dist/tex/latex/biblatex/lbx/naustrian.lbx

    texmf-dist/tex/latex/biblatex/lbx/newzealand.lbx

    texmf-dist/tex/latex/biblatex/lbx/ngerman.lbx

    texmf-dist/tex/latex/biblatex/lbx/norsk.lbx

    texmf-dist/tex/latex/biblatex/lbx/norwegian.lbx

    texmf-dist/tex/latex/biblatex/lbx/nynorsk.lbx

    texmf-dist/tex/latex/biblatex/lbx/polish.lbx

    texmf-dist/tex/latex/biblatex/lbx/portuges.lbx

    texmf-dist/tex/latex/biblatex/lbx/portuguese.lbx

    texmf-dist/tex/latex/biblatex/lbx/russian.lbx

    texmf-dist/tex/latex/biblatex/lbx/slovak.lbx

    texmf-dist/tex/latex/biblatex/lbx/slovene.lbx

    texmf-dist/tex/latex/biblatex/lbx/spanish.lbx

    texmf-dist/tex/latex/biblatex/lbx/swedish.lbx

更新

sudo tlmgr update --all


來源:CSDN

原文

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末炬转,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子算灸,更是在濱河造成了極大的恐慌返吻,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,311評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件乎婿,死亡現(xiàn)場離奇詭異,居然都是意外死亡街佑,警方通過查閱死者的電腦和手機(jī)谢翎,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,339評論 2 382
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來沐旨,“玉大人森逮,你說我怎么就攤上這事〈判” “怎么了褒侧?”我有些...
    開封第一講書人閱讀 152,671評論 0 342
  • 文/不壞的土叔 我叫張陵,是天一觀的道長谊迄。 經(jīng)常有香客問我闷供,道長,這世上最難降的妖魔是什么统诺? 我笑而不...
    開封第一講書人閱讀 55,252評論 1 279
  • 正文 為了忘掉前任歪脏,我火速辦了婚禮,結(jié)果婚禮上粮呢,老公的妹妹穿的比我還像新娘婿失。我一直安慰自己,他們只是感情好啄寡,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,253評論 5 371
  • 文/花漫 我一把揭開白布豪硅。 她就那樣靜靜地躺著,像睡著了一般挺物。 火紅的嫁衣襯著肌膚如雪懒浮。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,031評論 1 285
  • 那天姻乓,我揣著相機(jī)與錄音嵌溢,去河邊找鬼。 笑死蹋岩,一個(gè)胖子當(dāng)著我的面吹牛赖草,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播剪个,決...
    沈念sama閱讀 38,340評論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼秧骑,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起乎折,我...
    開封第一講書人閱讀 36,973評論 0 259
  • 序言:老撾萬榮一對情侶失蹤绒疗,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后骂澄,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體吓蘑,經(jīng)...
    沈念sama閱讀 43,466評論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,937評論 2 323
  • 正文 我和宋清朗相戀三年坟冲,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了磨镶。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,039評論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡健提,死狀恐怖琳猫,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情私痹,我是刑警寧澤脐嫂,帶...
    沈念sama閱讀 33,701評論 4 323
  • 正文 年R本政府宣布,位于F島的核電站紊遵,受9級特大地震影響账千,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜暗膜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,254評論 3 307
  • 文/蒙蒙 一蕊爵、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧桦山,春花似錦攒射、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,259評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至钉凌,卻和暖如春咧最,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背御雕。 一陣腳步聲響...
    開封第一講書人閱讀 31,485評論 1 262
  • 我被黑心中介騙來泰國打工矢沿, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人酸纲。 一個(gè)月前我還...
    沈念sama閱讀 45,497評論 2 354
  • 正文 我出身青樓捣鲸,卻偏偏與公主長得像,于是被迫代替她去往敵國和親闽坡。 傳聞我的和親對象是個(gè)殘疾皇子栽惶,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,786評論 2 345

推薦閱讀更多精彩內(nèi)容