在 Mac 上安装 olympiad 软件包

在 Mac 上安装 olympiad 软件包

我一直在尝试安装奥林匹克套餐在我的 Mac 上安装了 asymptote 以在 TexShop 中使用,但我不知道在哪里安装它。我尝试将文件移动到文件夹olympiad.asyLibrary\TexShop\Engines\Asymptote,但没有编译。我也尝试将其移动到众多\usr\local\share\doc\asymptote文件夹中的一个,但也没有用。有人能帮我吗?唯一没有编译的是我尝试导入 olympiad;。

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./Poles&Polars.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size11.clo))
(/Users/SaiyanSparta/Library/texmf/tex/latex/Tyler/tyler.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amscls/amsthm.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/asymptote/asymptote.sty
(./Poles&Polars.pre)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2014/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/catchfile.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.4 i
     mport olympiad;
? 
(/usr/local/texlive/2014/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/mh/mathtools.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/tools/calc.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/mh/mhsetup.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifvtex.sty)))
(./Poles&Polars.aux)
(/usr/local/texlive/2014/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/grfext.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex

Package Fancyhdr Warning: \headheight is too small (12.0pt): 
 Make it at least 13.59999pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

[1{/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsb.fd)
<"Poles&Polars-1".pdf, id=7, 199.1691pt x 80.1123pt>
<use "Poles&Polars-1".pdf>
<"Poles&Polars-2".pdf, id=8, 211.50919pt x 133.28194pt>
<use "Poles&Polars-2".pdf> [2 <./Poles&Polars-1.pdf>]

Package Fancyhdr Warning: \headheight is too small (12.0pt): 
 Make it at least 13.59999pt.
 We now make it that large for the rest of the document.
 This may cause the page layout to be inconsistent, however.

[3 <./Poles&Polars-2.pdf>] (./Poles&Polars.aux) )</usr/local/texlive/2014/texmf
-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/texlive/2014/texmf-
dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2014/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmbxti10.pfb></usr/local/texlive/2014/texmf-
dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/local/texlive/2014/texmf-d
ist/fonts/type1/public/amsfonts/cm/cmmi12.pfb></usr/local/texlive/2014/texmf-di
st/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2014/texmf-dist
/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/local/texlive/2014/texmf-dist/f
onts/type1/public/amsfonts/cm/cmr17.pfb></usr/local/texlive/2014/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmr7.pfb></usr/local/texlive/2014/texmf-dist/fonts/
type1/public/amsfonts/cm/cmr8.pfb></usr/local/texlive/2014/texmf-dist/fonts/typ
e1/public/amsfonts/cm/cmsy10.pfb></usr/local/texlive/2014/texmf-dist/fonts/type
1/public/amsfonts/cm/cmsy8.pfb>
Output written on Poles&Polars.pdf (3 pages, 125754 bytes).
SyncTeX written on Poles&Polars.synctex.gz.
Transcript written on Poles&Polars.log.
Processing Poles&Polars-1
Wrote Poles&Polars-1.pdf
Processing Poles&Polars-2
Wrote Poles&Polars-2.pdf
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./Poles&Polars.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size11.clo))
(/Users/SaiyanSparta/Library/texmf/tex/latex/Tyler/tyler.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amscls/amsthm.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/asymptote/asymptote.sty
(./Poles&Polars.pre)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2014/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/catchfile.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
    l.4 i
     mport olympiad;
? 

答案1

简短回答:软件包可以安装在隐藏目录中。使用终端~/.asy检查此目录是否已存在(标志表示包含隐藏目录)。如果不存在,则创建目录。ls -a ~-a

较长的回答:原则上,以下列表中的任何地方(引自搜索路径在手册中)应该可以工作:

  • 当前目录;
  • 由配置变量 dir 或环境变量指定的一个或多个目录的列表ASYMPTOTE_DIR:在UNIX下以 分隔,;在MSDOS下以 分隔);
  • 环境变量指定的目录;如果未设置此变量,则使用用户主目录中的ASYMPTOTE_HOME目录(在 MSDOS 下);.asy%USERPROFILE%\.asy
  • Asymptote 系统目录(默认情况下,/usr/local/share/asymptote在 UNIX 和C:\Program Files\AsymptoteMSDOS 下)。

我不建议乱动 Asymptote 系统目录,因为找到正确的位置通常比人们想象的要难。最简单的做法就是将包放在“当前目录”中(通常与要编译的 Asymptote 文件位于同一目录)。对于可以跨目录工作的更广泛的安装,该~/.asy目录通常是一个不错的选择。

答案2

在我的特克斯现场在 macos 上安装,全部.asy文件(geometry、plain、three 等)位于 /usr/local/texlive/2022/texmf-dist/asymptote/

(顺便说一句,我的系统上没有 ~/.asy。)

相关内容