Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/macros/generic/bitelist

            README for the `bitelist' package
        "Split list at list inside in TeX's Mouth"
                (C) Uwe Lueck 2012/03/28


`bitelist.sty' provides commands for "splitting" a token list 
at the first occurrence of a contained token list. I.e., for given 
token lists s, t return b and shortest a, such that t = a s b.
As opposed to other packages providing similar features, 
  (i) the method uses TeX's mechanism of reading delimited macro 
      parameters;
 (ii) the splitting macros work by pure expansion, without 
      assignments, provided the macro doing the search has been 
      defined before processing (e.g., a file);
(iii) instead of using one macro for a "substring" test and another 
      one to replace the "substring"--which includes extracting 
      corresponding prefix and suffix--, the *same* macro that 
      detects the occurrence returns the split;
 (iv) e-TeX is not required.
(And LaTeX is not required.) This improves `fifinddo.sty' (v0.51). 

An elaborated approach (additionally to a simpler one) is provided 
that does not loose outer braces of prefix/suffix.

"Substring" detection and "string" replacement are (implicitly) 
included with respect to certain representations of characters by tokens.
Counting occurrences and "global" replacement could be achieved 
by applying the operation to earlier results, etc.--so 
this approach seems to be "fundamental" for a certain larger 
set of list analysis tasks.

The documentation aims to prove the correctness of the methods 
with mathematical rigour.

KEYWORDs: macro programming, text filtering, substrings

RELATEd PACKAGEs: datatool, stringstrings, ted, texapi, xstring

The package file `bitelist.sty' and the documentation files
`bitelist.pdf' and `bitelist.tex' can be redistributed and/or
modified under the terms of the LaTeX Project Public License;
either version 1.3c of the License, or any later version, see

    http://www.latex-project.org/lppl.txt

We did our best to help you, but there is NO WARRANTY.

The `bitelist' package is author-maintained in the sense of
this license.

The latest public version of the package is available at

    http://mirror.ctan.org/macros/latex/contrib/bitelist/

A TDS version of the package is available as

    http://mirror.ctan.org/install/macros/generic/bitelist.tds.zip

Please report bugs, problems, and suggestions via

    http://www.contact-ednotes.sty.de.vu


Direc­to­ries

Name Notes
docsrc

Files

Name Size Date Notes
README 2424 2012-03-29 03:02
SrcFILEs.txt 360 2012-03-29 01:58
bitedemo.tex 1629 2012-03-29 01:17
bitelist.pdf 405448 2012-03-29 01:57
bitelist.sty 11235 2012-03-29 01:57

Down­load the con­tents of this pack­age in one zip archive (368.2k).

bitelist – Split list, in TeX's mouth

The pack­age pro­vides com­mands for “split­ting” a to­ken list at the first oc­cur­rence of an­other (spec­i­fied) to­ken list. I.e., for given to­ken lists s, t re­turn b and the short­est a, such that t = a s b.

The pack­age’s mech­a­nism dif­fers from those of pack­ages pro­vid­ing sim­i­lar fea­tures, in the fol­low­ing ways:

  • the method uses TeX’s mech­a­nism of read­ing de­lim­ited macro pa­ram­e­ters;
  • the split­ting macros work by pure ex­pan­sion, with­out as­sign­ments;
  • – the op­er­a­tion is car­ried out in a sin­gle macro call.
A vari­ant of the op­er­a­tion is pro­vided, that re­tains outer braces.

Pack­age De­tailsbitelist
Ver­sion0.1
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2012 Uwe Lück
Main­tainerUwe Lück
TDS archivebitelist.tds.zip
Con­tained inTeXlive as bitelist
MikTeX as bitelist
Topics sup­port for de­vel­op­ment of (La)TeX macros
ma­nip­u­late strings (typ­i­cally in to­ken lists)
See also xstring
datatool
texapi
stringstrings
ted
Guest Book Sitemap Contact