From 03169d44bb9d8b8a7195dd7e7772142264319316 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 31 Dec 2008 01:00:07 +0000 Subject: pygments update (29dec08) git-svn-id: svn://tug.org/texlive/trunk@11756 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/texments/texments.sty | 46 ++++++++++++++++++----- 1 file changed, 37 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/tex/latex/texments') diff --git a/Master/texmf-dist/tex/latex/texments/texments.sty b/Master/texmf-dist/tex/latex/texments/texments.sty index 2b920d11e13..d10f3154ddf 100644 --- a/Master/texmf-dist/tex/latex/texments/texments.sty +++ b/Master/texmf-dist/tex/latex/texments/texments.sty @@ -8,23 +8,29 @@ %% %% This is a generated file. %% -%% Copyright (C) 2008 by Marek Kubica +%% Copyright 2008 Marek Kubica, %% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.2 of this license -%% or (at your option) any later version. The latest version of this -%% license is in: +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008/05/04 or later. %% -%% http://www.latex-project.org/lppl.txt +%% This work has the LPPL maintenance status `maintained'. %% -%% and version 1.2 or later is part of all distributions of LaTeX version -%% 1999/12/01 or later. +%% The Current Maintainer of this work is Marek Kubica. +%% +%% This work consists of the files textments.dtx and texments.ins +%% and the derived file texments.sty. %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{texments} - [2008/10/10 0.1.0 The Pygments highligher accessible in LaTeX] + [2008/12/27 0.2.0 The Pygments source code highligher integrated into LaTeX documents] \RequirePackage{fancyvrb} \RequirePackage{color} +\RequirePackage{ifthen} \newcommand{\usestyle}[1]{ \immediate\write18{pygmentize -S #1 -f latex > \jobname.pyg} \input{\jobname.pyg} @@ -39,6 +45,28 @@ \immediate\write18{pygmentize -l #1 -f latex -o \jobname.out.pyg \jobname.pyg} \input{\jobname.out.pyg} } + +\newcommand{\lexercommand}[1]{} + +\newcommand{\includecode}[2][auto]{ + \ifthenelse{\equal{#1}{auto}} + {\renewcommand{\lexercommand}[1]{}} + {\renewcommand{\lexercommand}[1]{-l #1}} + \immediate\write18{pygmentize \lexercommand{} -f latex -o #2.out.pyg #2} + \input{#2.out.pyg} +} + + +\newcommand{\proglang}[1]{} + +\newenvironment{pygmented}[1]% + {\VerbatimEnvironment + \renewcommand{\proglang}[1]{#1} + \begin{VerbatimOut}{\jobname.pyg}}% + {\end{VerbatimOut} + \immediate\write18{pygmentize -l \proglang{} -f latex -o \jobname.out.pyg \jobname.pyg} + \input{\jobname.out.pyg}} + \endinput %% %% End of file `texments.sty'. -- cgit v1.2.3