如何在 LaTeX 上制作列表程序 ConTeXt?

如何在 LaTeX 上制作列表程序 ConTeXt?

我想在 LaTeX 中制作列表程序上下文,我的 MWE 如下:

\documentclass[]{article}
\usepackage{listings}
\usepackage[dvipsnames]{xcolor}

\lstset
{   frame=single,
    framesep=\fboxsep,
    framerule=\fboxrule,
    rulecolor=\color{white},
    xleftmargin=\dimexpr\fboxsep+\fboxrule,
    xrightmargin=\dimexpr\fboxsep+\fboxrule,
    breaklines=true,
    basicstyle=\small,
    keywordstyle=\color[HTML]{0000FF},
    identifierstyle=\color{black},
    commentstyle=\color[HTML]{00008B},
    backgroundcolor=\color{gray!10},
    tabsize=2,
    columns=flexible,
}

\lstdefinestyle{myRstyle}{
  backgroundcolor=\color[gray]{0.95},
}
\lstdefinestyle{mySstyle}{
  backgroundcolor=\color{red!30},
}
\lstnewenvironment{myR}
  {\lstset{language=[LaTeX]TeX,style=myRstyle}}
  {}
\lstnewenvironment{myS}
  {\lstset{language=[ConTeXt]TeX,style=mySstyle}}
  {}

\begin{document}

Here's some regular text.

\begin{lstlisting}
%---------STYLE TYCJA AT POWERDOT-----------
\documentclass[style= tycja]{powerdot}
\usepackage{lipsum}
\title{Presentation with \LaTeX}
\author{Hirwanto}
\begin{document}
\maketitle
\begin{slide}{Slide 1}
\lipsum[1]
\end{slide}
\begin{slide}{Slide 2}
\lipsum[2]
\end{slide}
\begin{slide}{Slide 3}
\lipsum[3]
\end{slide}
\begin{slide}{Slide 4}
\lipsum[4]
\end{slide}
\begin{slide}{Slide 5}
\lipsum[5]
\end{slide}
\begin{slide}{Slide 6}
\lipsum[6]
\end{slide}
\end{document}
\end{lstlisting}

\begin{myR}
%---------STYLE TYCJA AT POWERDOT-----------
\documentclass[style= tycja]{powerdot}
\usepackage{lipsum}
\title{Presentation with \LaTeX}
\author{Hirwanto}
\begin{document}
\maketitle
\begin{slide}{Slide 1}
\lipsum[1]
\end{slide}
\begin{slide}{Slide 2}
\lipsum[2]
\end{slide}
\begin{slide}{Slide 3}
\lipsum[3]
\end{slide}
\begin{slide}{Slide 4}
\lipsum[4]
\end{slide}
\begin{slide}{Slide 5}
\lipsum[5]
\end{slide}
\begin{slide}{Slide 6}
\lipsum[6]
\end{slide}
\end{document}
\end{myR}

\begin{myS}
\usemodule[simpleslides]
[style=SideSquares]
\setupTitle
[ title={Title of the presentation},
author={Name of authors},
date={Date of presentation},
]
\starttext
\placeTitle
\SlideTitle {The first slide}
Write whatever you want.
\SlideTitle {The second slide}
Continue writing.
\stoptext
\end{myS}

\end{document} 

但是,我遇到了这样的错误:

Command Line:   bibtex.exe "er"
Startup Folder: D:\New folder (3)

This is BibTeX, Version 0.99d (TeX Live 2014/W32TeX)
The top-level auxiliary file: er.aux
I found no \citation commands---while reading file er.aux
I found no \bibdata command---while reading file er.aux
I found no \bibstyle command---while reading file er.aux
(There were 3 error messages)


Command Line:   texify.exe --pdf --tex-option=--interaction=errorstopmode "D:\New folder (3)\er.tex"
Startup Folder: D:\New folder (3)

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
("D:/New folder (3)/er.tex"
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 68 languages 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\listings\listings.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstmisc.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\listings.cfg"))
("C:\Program Files\MiKTeX 2.9\tex\latex\xcolor\xcolor.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def"))
("D:\New folder (3)\er.aux")
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files\MiKTeX 2.9\tex\latex\base\omscmr.fd")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang1.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang2.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang3.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang1.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang2.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang3.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang1.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang2.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang3.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstmisc.sty") [1{C:/ProgramDat
a/MiKTeX/2.9/pdftex/config/pdftex.map}]
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang1.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang2.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\listings\lstlang3.sty")

! Package Listings Error: Couldn't load requested language.

See the Listings package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.97 \begin{myS}

? 

Process has been terminated ...

有什么办法可以解决吗?

相关内容