File: coollist.plt

package info (click to toggle)
tralics 2.14.4-2
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 17,152 kB
  • ctags: 8,260
  • sloc: cpp: 49,403; xml: 18,145; sh: 140; makefile: 118
file content (53 lines) | stat: -rw-r--r-- 1,324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%%% -*- latex -*-
\ProvidesPackage{coollist}[2008/04/24 v1.0  COntent Oriented LaTeX Lists]
%% based on a package by nsetzer
%% This file may be distributed and/or modified under the
%% conditions of the Limited General Product License


%% $Id: coollist.plt,v 2.1 2008/04/01 17:02:06 grimm Exp $
%% TRALICS, copyright (C) INRIA/apics (Jose' Grimm) 2007
%% Licensed under the CeCILL free software license 
%% (See the file COPYING in the main directory for details)

\newboolean{COOL@found}

\newcommand{\setlistStop}[1]{}
\newcommand{\setlistEnd}[1]{}


\def\COOL@listgobble#1,{%
  \def\@tempa{#1}%
  \ifx\@tempa\@nnil
  \else
  \advance\@tempcntb by 1
  \ifnum\@tempcnta=\@tempcntb\COOL@foundtrue#1\fi
  \expandafter\COOL@listgobble\fi}

\newcommand{\listval}[2]{%
  \@tempcntb=0
  \@tempcnta=#2
  \COOL@foundfalse
  \COOL@listgobble#1,\@nil,}

\newcommand{\listlen}[1]{%
  \listval{#1}{0}%
   \number\@tempcntb}

\newcommand{\listlenstore}[2]{%
  \listval{#2}{0}%
  \setcounter{#1}{\@tempcntb}}

\def\COOL@liststore@gobbler#1,{%
  \def\@tmpa{#1}%
  \ifx\@tmpa\@nnil
  \else
  \advance\@tempcntb by 1
  \expandafter\gdef\csname \@tmpb\romannumeral\@tempcntb\endcsname{#1}%
  \expandafter\COOL@liststore@gobbler\fi}

\newcommand{\liststore}[2]{%
  \@tempcntb=0\def\@tmpb{#2}%
  \COOL@liststore@gobbler#1,\@nil,}

\endinput