From b2869784051063d695d532c55bad16c8d8fd7c77 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 Sep 2009 18:36:57 +0000 Subject: new latex package + sh script listings-ext (31aug09) git-svn-id: svn://tug.org/texlive/trunk@15093 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/listings-ext/listings-ext.sty | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/listings-ext/listings-ext.sty (limited to 'Master/texmf-dist/tex/latex/listings-ext') diff --git a/Master/texmf-dist/tex/latex/listings-ext/listings-ext.sty b/Master/texmf-dist/tex/latex/listings-ext/listings-ext.sty new file mode 100644 index 00000000000..4407be9ba8f --- /dev/null +++ b/Master/texmf-dist/tex/latex/listings-ext/listings-ext.sty @@ -0,0 +1,59 @@ +%% +%% This is file `listings-ext.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% listings-ext.dtx (with options: `extension') +%% +%% Copyright (C) 2008-2009 Jobst Hoffmann, +%% ----------------------------------------------------------------- +%% +%% 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: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% Please address error reports and any problems in case of UNCHANGED versions +%% to +%% j.hoffmann@fh-aachen.de +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +{% + \def\@svn@ $#1Date: #2-#3-#4 #5$$#6Revision: #7$ {% + \ProvidesPackage{listings-ext}[#2/#3/#4 v#7 an extension for the listings package (JHf)]} + \@svn@ $Date: 2009-08-31 20:30:48 +0200 (Mo, 31 Aug 2009) $$Revision: 48 $ % +} +\RequirePackage{listings} +\RequirePackage{xkeyval} +\DeclareOptionX{style}[]{\lstset{style=#1}} +\ProcessOptionsX* +\newcommand{\lstdef}[3]{% + \@namedef{lst@l@#1}##1{% + \lstinputlisting[##1, linerange={#3}]{#2}}% +} +\newcommand{\lstcheck}[2]{% + \expandafter\ifx\csname lst@l@#1\endcsname\relax% + \input{#2}\fi% + \expandafter\ifx\csname lst@l@#1\endcsname\relax% + \PackageError{listings-ext}{undefined identifier}{% + You may have mispelled the identifier, check the file% + \MessageBreak\space\space\space#2\MessageBreak% + for the correct spelling.}\fi% +} +\newcommand{\lstuse}[2][]{% + \expandafter\ifx\csname lst@l@#2\endcsname\relax% + \PackageError{listings-ext}{undefined identifier}{% + You may have mispelled the identifier.\MessageBreak% + If you go on without any change, no source code will be % + included,\MessageBreak but your options will be written % + into your formatted document.}\fi% + \@nameuse{lst@l@#2}{#1}% +} +\endinput +%% +%% End of file `listings-ext.sty'. -- cgit v1.2.3