Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/l3experimental


Ex­per­i­men­tal LaTeX3 Con­cepts

Re­lease 2016/10/19 (r6730)


The l3experimental pack­ages are a col­lec­tion of ex­per­i­men­tal im­ple­men­ta­tions for as­pects of the LaTeX3 ker­nel, deal­ing with higher-level ideas such as the De­signer In­ter­face. Some of them work as stand alone pack­ages, pro­vid­ing new func­tion­al­ity, and can be used on top of LaTeX2ε with no changes to the ex­ist­ing ker­nel. Others go fur­ther, and re­de­fine LaTeX2ε in­ter­nals to pro­vide bet­ter meth­ods for man­ag­ing cer­tain con­structs. The pack­ages in the col­lec­tion are un­der ac­tive de­vel­op­ment and the in­ter­faces may change.

All of the ma­te­rial in the col­lec­tion re­quires the LaTeX3 base layer pack­age l3kernel. The two pack­ages must be in­stalled in match­ing ver­sions: if you up­date l3experimental, make sure that l3kernel is up­dated at the same time.

Cur­rently in­cluded in the CTAN re­lease of l3­ex­per­i­men­tal are the fol­low­ing bun­dles:

  • l3sort
  • l3str
  • xcoffins
  • xgalley


Ordered vari­ables con­tent (in tl, clist or seq vari­ables) may be sorted in a flex­i­ble man­ner us­ing the l3sort mod­ule. The def­i­ni­tion of how to sort two items is pro­vided by the pro­gram­mer at the point at which the sort is car­ried out. In­ter­nally, the sort­ing al­go­rithm is de­signed to take ad­van­tage of TeX to­ken reg­is­ters to al­low a high per­for­mance and scal­able sort.


A 'string' in TeX terms is a to­ken list in which all of the to­kens have cat­e­gory code 12 ('other'), with the ex­cep­tion of spaces which have the cat­e­gory code 10 ('space'). The l3str bun­dle con­sists of two parts. The first is l3str it­self. This is a col­lec­tion of func­tions to act on strings, in­clud­ing for ma­nip­u­la­tions such as UTF8 map­pings in pdfTeX. The sec­ond part of the bun­dle is l3regex, a reg­u­lar ex­pres­sion search-and-re­place im­ple­men­ta­tion writ­ten in TeX prim­i­tives. The regex mod­ule works on to­ken lists, and is part of l3str (cur­rently) for his­tor­i­cal rea­sons: the team an­tic­i­pate split­ting the two in the fu­ture.


A cof­fin is a 'box with han­dles': a data struc­ture which com­prises both a TeX box and as­so­ci­ated in­for­ma­tion to al­low con­trolled type­set­ting. The xcoffins pack­age pro­vides a high-level in­ter­face for ma­nip­u­lat­ing coffins. This is sup­ported by the lower-level l3coffins pack­age, which pro­vides the data struc­ture.


In LaTeX3 ter­mi­nol­ogy a gal­ley is a rect­an­gu­lar area which re­ceives text and other ma­te­rial fill­ing it from top. The ver­ti­cally ex­tend of a gal­ley is nor­mally not re­stricted: in­stead cer­tain chunks are taken off the top of an al­ready par­tially filled gal­ley to form columns or sim­i­lar ar­eas on a page. This pro­cess is typ­i­cally asyn­chronous but there are ways to con­trol or change its be­haviour. The xgal­ley mod­ule pro­vides a mech­a­nism for fill­ing gal­leys and con­trol­ling the spac­ing, hy­phen­ation and jus­ti­fi­ca­tion within them.


Dis­cus­sion con­cern­ing the ap­proach, sug­ges­tions for im­prove­ments, changes, ad­di­tions, etc. should be ad­dressed to the list LaTeX-L.

You can sub­scribe to this list by send­ing mail to


with the body con­tain­ing

subscribe LATEX-L  <Your-First-Name> <Your-Second-Name>


The is­sue tracker for LaTeX3 is cur­rently lo­cated on GitHub.

Please re­port spe­cific is­sues with LaTeX3 code there; more gen­eral dis­cus­sion should be di­rected to the LaTeX-L list.

The LaTeX3 Project

Devel­op­ment of LaTeX3 is car­ried out by The LaTeX3 Project. Cur­rently, the team mem­bers are

  • Jo­hannes Braams
  • David Carlisle
  • Robin Fair­bairns
  • Morten Høgholm
  • Bruno Le Floch
  • Thomas Lotze
  • Frank Mit­tel­bach
  • Will Robert­son
  • Chris Row­ley
  • Rainer Schöpf
  • Joseph Wright

Former mem­bers of The LaTeX3 Project team were

  • Michael Downes
  • Denys Duchier
  • Alan Jef­frey
  • Martin Schröder

The de­vel­op­ment team can be con­tacted by e-mail: <la­tex-team@la­tex-project.org>; for gen­eral LaTeX3 dis­cus­sion the LaTeX-L list should be used.

Copy­right (C) 1998-2011,2015 The LaTeX3 Project
All rights re­served.

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

l3­ex­per­i­men­tal – Ex­per­i­men­tal 3 con­cepts

The l3­ex­per­i­men­tal pack­ages are a col­lec­tion of ex­per­i­men­tal im­ple­men­ta­tions for as­pects of the 3 ker­nel, deal­ing with higher-level ideas such as the De­signer In­ter­face. Some of them work as stand alone pack­ages, pro­vid­ing new func­tion­al­ity, and can be used on top of with no changes to the ex­ist­ing ker­nel.

The present re­lease in­cludes:

  • xgal­ley, which con­trols boxes re­ceiv­ing text for type­set­ting.
  • l3regex: ker­nel sup­port for reg­u­lar ex­pres­sion search and re­place op­er­a­tions;
  • l3­sort: ker­nel sup­port for sort­ing se­quences, to­ken lists or comma-lists, ac­cord­ing to user-spec­i­fied com­par­i­son cri­te­ria;
  • l3str: ker­nel sup­port for string ma­nip­u­la­tion;
  • l3tl-build: ker­nel sup­port for to­ken list build­ing;
  • l3tl_anal­y­sis: ker­nel sup­port for to­ken list anal­y­sis; and xcoffins, which al­lows the align­ment of boxes us­ing a se­ries of ‘han­dle’ po­si­tions, sup­ple­ment­ing the sim­ple ref­er­ence point.

All the files of the bun­dle are also avail­able in the Sub­ver­sion (SVN) repos­i­tory of the 3 Project.

The bun­dle on CTAN is based on a snap­shot of the SVN repos­i­tory.

Home pagehttp://www.la­tex-project.org/code.html
Ver­sionSVN 6730 2016-10-19
Li­censeThe Project Public Li­cense 1.3
Main­tainerThe Team
TDS archivel3experimental.tds.zip
Con­tained inTeX Live as l3­ex­per­i­men­tal
MiKTeX as l3­ex­per­i­men­tal
Topics work done for the project to up­grade
sup­port for de­vel­op­ment of macros
de­vel­op­ing ver­sion of new soft­ware
lay­out of ob­jects on the page
See also l3kernel
Guest Book Sitemap Contact Contact Author