From cdbc5d3bd4d89338a033d47d1368e8e30d273544 Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Fri, 4 Jul 2008 10:14:39 +0000 Subject: new forarray package git-svn-id: svn://tug.org/texlive/trunk@9221 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/forarray/README.txt | 59 + Master/texmf-dist/doc/latex/forarray/forarray | 316 ++++ .../doc/latex/forarray/forarray-test.pdf | Bin 0 -> 54385 bytes .../doc/latex/forarray/forarray-test.tex | 140 ++ Master/texmf-dist/doc/latex/forarray/forarray.dtm | 1729 +++++++++++++++++++ Master/texmf-dist/doc/latex/forarray/forarray.dts | 344 ++++ Master/texmf-dist/doc/latex/forarray/forarray.pdf | Bin 0 -> 242184 bytes .../texmf-dist/source/latex/forarray/forarray.dtx | 1764 ++++++++++++++++++++ Master/texmf-dist/tex/latex/forarray/forarray.sty | 838 ++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/forarray.tlpsrc | 2 + 12 files changed, 5194 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/forarray/README.txt create mode 100644 Master/texmf-dist/doc/latex/forarray/forarray create mode 100644 Master/texmf-dist/doc/latex/forarray/forarray-test.pdf create mode 100644 Master/texmf-dist/doc/latex/forarray/forarray-test.tex create mode 100644 Master/texmf-dist/doc/latex/forarray/forarray.dtm create mode 100644 Master/texmf-dist/doc/latex/forarray/forarray.dts create mode 100644 Master/texmf-dist/doc/latex/forarray/forarray.pdf create mode 100644 Master/texmf-dist/source/latex/forarray/forarray.dtx create mode 100644 Master/texmf-dist/tex/latex/forarray/forarray.sty create mode 100644 Master/tlpkg/tlpsrc/forarray.tlpsrc diff --git a/Master/texmf-dist/doc/latex/forarray/README.txt b/Master/texmf-dist/doc/latex/forarray/README.txt new file mode 100644 index 00000000000..defab01b9a1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/forarray/README.txt @@ -0,0 +1,59 @@ +Note: This file should be viewed with character map ISO-8859-1 (Latin1, +Western). + +Using array structures in LaTeX: The package 'forarray' + +Version 1.01 (2008/06/20) + +Abstract: +The package 'forarray' provides functionality for processing lists and +array structures in LaTeX. Arrays can contain characters as well as TeX +and LaTeX commands, nesting of arrays is possible, and arrays are +processed within the same brace level as their surrounding environment. +Array levels can be delimited by characters or control sequences +defined by the user. Practical uses of this package include data +management, construction of lists and tables, and calculations based on +the contents of lists and arrays. + +Copyright: +The package 'forarray' is (c) 2008 by Christian Schröppel, and +distributed under the terms of the LaTeX Project Public License (LPPL), +version 1.3c. + +Content: +The package 'forarray' consists of the master file 'forarray.dtm', the +file 'README.txt', and the derived files 'forarray.dtx', +'forarray.sty', 'forarray.pdf', 'forarray-test.tex', and +'forarray-test.pdf'. + +Installation: +In order to use the package, you need to save the file 'forarray.sty' +to a directory where your LaTeX installation will find it. This will +often be /tex/latex/forarray. Please +consult the manuals for your LaTeX system for further information. In +many cases, it will be possible to use a package manager provided with +your LaTeX system to install the package. + +Documentation: +The file 'forarray.pdf' contains the documentation for the package +'forarray'. + +The file 'README.txt' contains some basic information about the package. + +The file 'forarray-test.tex' can be used to obtain a test page for the +package. You can run this file with your LaTeX installation and compare +the result with the file 'forarray-test.pdf' to check if everything +works well. + +DTM File: +You can obtain the files 'forarray.dtx', 'forarray.sty', +'forarray.pdf', 'forarray-test.tex', and 'forarray-test.pdf', as well +as 'README.txt' by placing the files 'forarray.dtm', 'forarray.dts' and +the Bourne shell script 'forarray' in a single directory and typing in +forarray at the command prompt (after cd ). The +installation script 'forarray' and the documentation style file +'forarray.dts' are not part of the package 'forarray'. Please note, +however, that the provisions in the section "No warranty" of the LaTeX +Project Public License (LPPL), version 1.3c, exempting the author and +other parties from liability with regard to the work, apply to the +contents of the package as well as to these files. diff --git a/Master/texmf-dist/doc/latex/forarray/forarray b/Master/texmf-dist/doc/latex/forarray/forarray new file mode 100644 index 00000000000..c6a79f4796e --- /dev/null +++ b/Master/texmf-dist/doc/latex/forarray/forarray @@ -0,0 +1,316 @@ +#!/bin/sh + +# Functions +setargs() +{ + case $2 in + 0) + getfilename + scope=5; + ;; + 1) + getfilename + scope=$3; + ;; + 2) + fileid=$3 + scope=$4; + ;; + *) + echo "You can only use two arguments together with the script $1." + exit; + ;; + esac + file="./$fileid" +} +getfilename() +{ + fileid=$(echo "$0" | sed -e s-^.*/-- -e s-\\..*--) +} +logoutput() +{ + exec 3>&1 + exec >$1.dtl + $2 + exec 1>&3 + 3>&- +} +echonewline() +{ + echo "" + echo $1 +} +docstrip() +{ + filename="$2" + echonewline "$1" + echo "\input docstrip" > $filename.tmp + echo "\declarepreamble\dtmpre" >> $filename.tmp + if [ -e $filename.pre ] ; then + echo " Using preamble from $filename.pre" + cat $filename.pre >> $filename.tmp + fi + echo "\endpreamble" >> $filename.tmp + echo "\declarepostamble\dtmpst" >> $filename.tmp + if [ -e $filename.pst ] ; then + echo " Using postamble from $filename.pst" + cat $filename.pst >> $filename.tmp + fi + echo "\endpostamble" >> $filename.tmp + echo "$3" >> $filename.tmp + echo "\endbatchfile" >> $filename.tmp + logoutput $filename "tex -ini $filename.tmp" + rm $filename.tmp +} +setversion() +{ + filename="$1" + if [ $2 == $3 ] ; then + echo "Processing $1.$2 (Pass No. $4 of $5) ..." + else + echo "Replacing items in $1.$3 with information from $1.$2 ..." + fi + echo "#!/bin/sed -f" > $filename.sed + cat $filename.$2 | while read ITEM + do + read CONTENT + read BLANK + ITEM=$(echo $ITEM | sed "s|:||g") + echo "s|<<$ITEM>>|$ITEM:\\ +<<$ITEM>>|g" >> $filename.sed + echo "s|<<$ITEM>>|$CONTENT|g" >> $filename.sed + done + $filename.sed < $filename.$3 > $filename.tmp + mv $filename.tmp $filename.$3 +} +dolatex() +{ + filename="$1" + echonewline "LaTeX pass No. $2 of $1 ..." + latex $filename +} +doindex() +{ + filename="$1" + echonewline "Creating index with makeindex -s gind.ist." + sed 's\|hyperpage\\' <$filename.idx >$filename.idt + mv $filename.idt $filename.idx + makeindex -q -s gind.ist $filename.idx +} +dopsandpdf() +{ + filename="$1" + echonewline "Creating $1.ps and $1.pdf ..." + logoutput $filename "dvips -q -t a4 -Ppdf -D600 $filename.dvi" + logoutput $filename "ps2pdf14 -q -r600 $filename.ps $filename.pdf" +} +rmfiles() +{ + echo "" + for rmfile in $1 ; do + filename="./$rmfile" + if [ -e "$rmfile" ] ; then + echo "Deleting file $rmfile in current directory." + rm "$filename" + fi + done +} +deletelatex=" +s|<+L>[^<]*<-L>||g +s|<[+-][T]>||g +s|<[+-]Q>|\"|g +s|§[+-]F§|\'|g +s|§[+-]P§||g +s|§PAR§[ ]*|\\ +\\ +|g +s|§<§|<|g +s|§>§|>|g +s|§VERB§||g +s|§ESC§||g +" +setlatex=" +s|<+T>[^<]*<-T>||g +s|<[+]Q>|\`\`|g +s|<[-]Q>|\'\'|g +s|<[+-]L>||g +s|§+[FP]§|\\\\mbox\{\\\\fontfamily{cmss}\\\\selectfont |g +s|§-[FP]§|\}|g +s|§[<>]§||g +s|§PAR§[ ]*|\\\\par |g +s|§ESC§|\\\|g +s/§VERB§/|/g +s|\ä|\\\\\"\{a\}|g +s|\ö|\\\\\"\{o\}|g +s|\ü|\\\\\"\{u\}|g +s|\ß|\\\\ss|g +" +replaceinmodules() +{ + filename="$1" + for module in $2 + do + echo "Processing $1 (module: $module)." + sed "/^%<\*$module>/,/^%<\/$module>/{ + $3 + }" < $filename > $filename.tmp + mv $filename.tmp $filename + done +} +commentinmodules() +{ + filename="$1" + for module in $2 + do + sed "/^%<\*$module>/,/^%<\/$module>/{ + s/^/% / + s/^% %<\*$module>/%<\*$module>/ + s/^% %<\/$module>/%<\/$module>/ + }" < $filename > $filename.tmp + mv $filename.tmp $filename + done +} +folduncommentedlines() +{ + filename="$1" + sed "/^[^%]/{ + s/§CR§/%\\ +/ + }" < $filename > $filename.tmp + mv $filename.tmp $filename + sed "/^%/{ + s/§CR§// + }" < $filename > $filename.tmp + mv $filename.tmp $filename +} +removemoduletags() +{ + filename="$1" + for module in $2 + do + sed "s/^%<[\*\/]$module>/%/" < $filename > $filename.tmp + mv $filename.tmp $filename + done +} +hidetext() +{ + filename="$1" + sed -e "s|^%|% \\\\iffalse|" -e "s|^%|% \\\\fi|" < $filename > $filename.tmp + mv $filename.tmp $filename +} +replacemoduletags $file.dtx "tex" "% \\iffalse" "% \\fi" +dofold() +{ + filename="$1" + for foldfile in $2 + do + fold -s -$filename < $foldfile > $foldfile.tmp + mv $foldfile.tmp $foldfile + done +} +# End Functions + +# Variables +overwrite="\\askforoverwritefalse" +nopreorpostamble="\\usepreamble\\empty\\usepostamble\\empty" +dtmpreandpostamble="\\usepreamble\\dtmpre\\usepostamble\\dtmpst" +# End Variables + +setargs $0 $# $1 $2 + +# Info about this script + echonewline "This script extracts the derivative files of the" + echo "package $file from the master file $file.dtm." + echonewline "Script file: $0." + echo "Process ID: $$." + echo "Scope: $scope." +# End Info + +filesindirectory=$(ls -1 | wc -l) +if [ $filesindirectory -ne 3 ] ; then + echonewline "The number of files in this directory is not equal to 3." + echo "Please put the files" + echo "'$fileid' (this script)," + echo "'$fileid.dtm' and" + echo "'$fileid.dts'" + echo "in an empty directory before executing this script." + exit +fi + +cp $file.dtm $file.dtx + +docstrip "Extracting version file from $file.dtx." $file "\ +\\generate{$overwrite$nopreorpostamble\\file{$file.ver}{\\from{$file.dtx}{version}}}" + +echonewline "Inserting information from the version file into $file.dtx." +if [ $scope -gt 0 ] ; then + setversion $file ver ver 1 4 + setversion $file ver ver 2 4 + setversion $file ver ver 3 4 + setversion $file ver ver 4 4 + setversion $file ver dtx 1 1 +fi + +echonewline "Adapting files to LaTeX or ASCII environment." +replaceinmodules $file.dtx "version preamble postamble sty readme" "$deletelatex" +replaceinmodules $file.dtx "tex" "$setlatex" +commentinmodules $file.dtx "manual" +removemoduletags $file.dtx "tex manual" +folduncommentedlines $file.dtx +hidetext $file.dtx + +docstrip "Extracting preamble and postamble from $file.dtx." $file "\ +\\generate{$overwrite$nopreorpostamble\ + \\file{$file.pre}{\\from{$file.dtx}{preamble}}\ + \\file{$file.pst}{\\from{$file.dtx}{postamble}}\ +}" + +dofold 69 "$file.pre $file.pst" + +docstrip "Extracting README file, style file and test file from $file.dtx." $file "\ +\\generate{$overwrite$nopreorpostamble\\file{README.txt}{\\from{$file.dtx}{readme}}}\ +\\generate{$overwrite$dtmpreandpostamble\ + \\file{$file.sty}{\\from{$file.dtx}{sty}}\ + \\file{$file-test.tex}{\\from{$file.dtx}{test}}\ +}" + +dofold 72 "README.txt" + +if [ $scope -gt 1 ] ; then + echonewline "Creating LaTeX file for processing documentation." + echo "\documentclass[11pt,a4paper]{article}" > $file.tmp + echo "\input $file.dts" >> $file.tmp + echo "\begin{document}" >> $file.tmp + echo "\DocInput{$file.dtx} \newpage \DOCindex" >> $file.tmp + echo "\end{document}" >> $file.tmp + dolatex $file.tmp 1 +fi +if [ $scope -gt 2 ] ; then + doindex $file + dolatex $file.tmp 2 +fi +if [ $scope -gt 3 ] ; then + doindex $file + dolatex $file.tmp 3 + doindex $file + dolatex $file.tmp 4 +fi +if [ $scope -gt 1 ] ; then + dolatex $file-test.tex 1 +fi +if [ $scope -gt 3 ] ; then + dopsandpdf $file + dopsandpdf $file-test +fi +if [ $scope -gt 4 ] ; then + rmfiles "$file.dvi $file.ps $file.out.ps $file-test.dvi $file-test.ps" +fi +if [ $scope -gt 3 ] ; then + rmfiles "$file.ilg $file.ind" +fi +if [ $scope -gt 2 ] ; then + rmfiles "$file.aux $file.dtl $file.idx $file.log $file.tmp $file.toc $file.ver" + rmfiles "$file.sed" + rmfiles "$file-test.aux $file-test.dtl $file-test.log pexa-sam.tex" +fi +rmfiles "$file.pre $file.pst" diff --git a/Master/texmf-dist/doc/latex/forarray/forarray-test.pdf b/Master/texmf-dist/doc/latex/forarray/forarray-test.pdf new file mode 100644 index 00000000000..85ccecb5f22 Binary files /dev/null and b/Master/texmf-dist/doc/latex/forarray/forarray-test.pdf differ diff --git a/Master/texmf-dist/doc/latex/forarray/forarray-test.tex b/Master/texmf-dist/doc/latex/forarray/forarray-test.tex new file mode 100644 index 00000000000..be5823d3867 --- /dev/null +++ b/Master/texmf-dist/doc/latex/forarray/forarray-test.tex @@ -0,0 +1,140 @@ +%% +%% This is file `./forarray-test.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ./forarray.dtx (with options: `test') +%% +%% The file 'forarray.dtx' was generated with the shell script +%% 'forarray' from the master file 'forarray.dtm'. +%% +%% COPYRIGHT NOTICE: +%% +%% This file is part of the package 'forarray'. +%% +%% The package 'forarray' is (c) 2008 by Christian Schröppel. It may be +%% distributed and/or modified under the conditions of the LaTeX +%% Project Public License (LPPL), version 1.3c. This licence allows you +%% to distribute unmodified copies of the package, as long as you +%% include all components of the package in your distribution. It also +%% allows modification of the package under certain conditions. Please +%% read the licence if you intend to modify any of the contents of this +%% package. +%% +%% If any later version of the LPPL replaces this version, the package +%% may be distributed and/or modified under the conditions of the +%% current version of the LPPL at that time. The latest version of the +%% LPPL is available at http://www.latex-project.org/lppl.txt. +%% +%% The Author of the package is Christian Schröppel. You can contact +%% the author at 'christian@schroeppel.com'. +%% +%% This package has the LPPL maintenance status "maintained". The +%% Current Maintainer is Christian Schröppel. +%% +%% The package 'forarray' consists of the master file 'forarray.dtm', +%% the file 'README.txt', and the derived files 'forarray.dtx', +%% 'forarray.sty', 'forarray.pdf', 'forarray-test.tex', and +%% 'forarray-test.pdf'. +%% +%% The installation script 'forarray' and the documentation style file +%% 'forarray.dts' are not part of the package 'forarray'. Please note, +%% however, that the provisions in the section "No warranty" of the +%% LaTeX Project Public License (LPPL), version 1.3c, exempting the +%% author and other parties from liability with regard to the work, +%% apply to the contents of the package as well as to these files. +%% +\documentclass[10pt,a4paper]{article} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[margin=2cm]{geometry} +\usepackage[dvips, pdfborder={0 0 0}, pdfstartview={FitH}, + pdfpagelayout={OneColumn}, bookmarks=false, pdfnewwindow, + unicode=true]{hyperref} +\urlstyle{same} +\usepackage{examplep} +\usepackage{forarray} +\author + { + Christian Schr\"{o}ppel% + \footnote% + { + Please send any comments or suggestions to % + \protect\href{mailto:christian@schroeppel.com}% +{\mbox{\fontfamily{cmss}\selectfont christian@schroeppel.com}}.% + } + } +\title + { + Test page for the % + {\fontfamily{cmss}\selectfont forarray} % + package\\ [.5ex]\Large Version 1.01 (2008/06/20) + } +\def\ShowExample{ + \PexaShowBoth{ + yalign=b, + allowbreak=yes, + srcstyle=leftnumcol, + } + } +\arrayrulewidth=0pt +\begin{document} +\errorcontextlines=20\relax +\maketitle +\thispagestyle{empty} +\small +\section{Test of \texttt{ForEach} (Simple List)} +\begin{WBoth} +\begin{itemize} +\ForEach{,} + {\item Item No.\ % + \the\thislevelcount\ is: + ``\thislevelitem''\\{\footnotesize + \meaning\thislevelitem}} + { + {Hello, World!}, Sec{ond}, + {Thi}rd,{\bf Last} item% + } +\end{itemize} +\end{WBoth} +\ShowExample +\section{Test of \texttt{ForEach} (Nested)} +\begin{WBoth} +\begin{itemize} +\ForEach{;} + {\item[\the\thislevelcount)] + \raggedright\thislevelitem + \begin{itemize} + \ForEachX{,} + {\item Item No.\ % + \the\thislevelcount\ % + is: \thislevelitem} + {\thislevelitem} + \end{itemize}} + {$\alpha$,$\beta$,$\gamma$; + {\Large A Large Item}, + Transparency \it test, + Ends \rm here.} +\end{itemize} +\end{WBoth} +\ShowExample +\section{Test of \texttt{ForArray}} +\makeatletter +\begin{WBoth} +\parindent=0pt +\def\MyArray{\ForArray(3){;,}{*}{|}} +\MyArray + {*\par\vskip 3ex|\parbox{8em}{*}} + { + A,B,C; + \textit{A nested array:}\par + \MyArray{[*]\par|(*)}{1,2;3,4},b,c; + $\alpha$,$\beta$,$\gamma$ + } +\end{WBoth} +\ShowExample +\end{document} +%% +%% +%% End of file `./forarray-test.tex'. diff --git a/Master/texmf-dist/doc/latex/forarray/forarray.dtm b/Master/texmf-dist/doc/latex/forarray/forarray.dtm new file mode 100644 index 00000000000..4f4a92e0e56 --- /dev/null +++ b/Master/texmf-dist/doc/latex/forarray/forarray.dtm @@ -0,0 +1,1729 @@ +% +%<*version> +Character Map: +ISO-8859-1 (Latin1, Western) + +File Identifier: +forarray + +Package: +§+F§<>§-F§ + +Description: +Using array structures in §ESC§LaTeX + +Abstract: +The package <> provides functionality for processing lists and array structures in §ESC§LaTeX. Arrays can contain characters as well as §ESC§TeX§ESC§ and §ESC§LaTeX§ESC§ commands, nesting of arrays is possible, and arrays are processed within the same brace level as their surrounding environment. Array levels can be delimited by characters or control sequences defined by the user. Practical uses of this package include data management, construction of lists and tables, and calculations based on the contents of lists and arrays. + +Version: +1.01 + +Date: +2008/06/20 + +Licence: +§ESC§LaTeX§ESC§ Project Public License (LPPL), version 1.3c + +Licence Site: +<+L>§ESC§href{<-L>http://www.latex-project.org/lppl.txt<+L>}{§+P§www.latex-project.org/lppl.txt§-P§}<-L> + +Copyright: +The package <> is <+L>§ESC§textcopyright§ESC§<-L><+T>(c)<-T> <> by <>, and distributed under the terms of the <>. + +Copyright Years: +2008 + +Author: +Christian Schröppel + +Maintainance Status: +maintained + +Current Maintainer: +Christian Schröppel + +Address: +<+L>§ESC§href{mailto:christian@schroeppel.com}§CR§{<-L>§+F§christian@schroeppel.com§-F§<+L>}<-L> + +Master File: +§+F§<>.dtm§-F§ + +Documentation Style File: +§+F§<>.dts§-F§ + +Installation Script: +§+F§<>§-F§ + +Derived Files: +§+F§<>.dtx§-F§, <