TeXworks expl3.sty 错误

TeXworks expl3.sty 错误

我正在尝试检查是否minted已安装在我的电脑中。我成功安装了Pythondistributed.pypip按照本教程我现在尝试用示例测试新包:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{minted}

\setsansfont{Calibri}
\setmonofont{Consolas}

\begin{document}
\renewcommand{\theFancyVerbLine}{
  \sffamily\textcolor[rgb]{0.5,0.5,0.5}{\scriptsize\arabic{FancyVerbLine}}}

\begin{minted}[mathescape,
           linenos,
           numbersep=5pt,
           gobble=2,
           frame=lines,
           framesep=2mm]{csharp}
  string title = "This is a Unicode π in the sky"
  /*
  Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
  of an $n$-sided regular polygon circumscribing a
  circle of diameter $d$.
  */
  const double pi = 3.1415926535
\end{minted}
\end{document}

我尝试在我的 TeXworks 中生成示例,但日志文件显示,expl3.sty not found即使在我检查包管理器时,它也存在。

以下是完整的日志文件,其中包含更多信息:

    This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9)
    entering extended mode
    (C:/Users/Username/Documents/LaTeX/minted.tex
    LaTeX2e <2009/09/24>
    Babel <v3.8l> and hyphenation patterns for english, afrikaans, ancientgreek, ar
    abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
    croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
    lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
    ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
    vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
    an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
    romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
    sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
    senglishmax, welsh, loaded.
    ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))
    ("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.sty"
    ======================================================================
    starting package maintenance...
    installation directory: C:\Users\Username\AppData\Roaming\MiKTeX\2.9
    package repository: http://ctan.cdpa.nsysu.edu.tw/systems/win32/miktex/tm/packages/
    lightweight database digest: 2b12adf201b76e6cb772a57dc48b7601
    pdflatex.EXE: Unknown archive file size.
    pdflatex.EXE: Data: expl3
    ======================================================================


    ! LaTeX Error: File `expl3.sty' not found.

    Type X to quit or <RETURN> to proceed,
    or enter new name. (Default extension: sty) 

答案1

(CW 从评论中回答;这实际上是 Windows 的问题,而不是 TeX 的问题)

mintedpygmentize依赖于基于 Python 的外部程序 ( )。但是文档说 Windows 并不真正受支持minted(手册第 2.4 节);您可以尝试安装 Python,并pygmentize按照那里的建议,

相关内容