CTAN
Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/checklistings

README.md

check­list­ings

By Ti­mothy Bourke and Marc Pouzet.

User man­u­als and pa­pers about pro­gram­ming lan­guages usu­ally con­tain many code sam­ples, of­ten with ac­com­pa­ny­ing com­piler mes­sages giv­ing the types of dec­la­ra­tions or er­ror mes­sages ex­plain­ing why cer­tain dec­la­ra­tions are in­valid.

The checklistings pack­age aug­ments the fan­cyvrb and list­ings pack­ages for in­clud­ing source code in doc­u­ments with a way to pass the source code through a com­piler and also in­clude the re­sult­ing mes­sages in the doc­u­ment.

The mo­ti­va­tion is to check the code sam­ples in a doc­u­ment for syn­tax and typ­ing er­rors and to fa­cil­i­tate the in­clu­sion of in­ferred types and com­piler warn­ings or er­rors in a text. This pack­age is in­ten­tion­ally very lightweight and un­like pack­ages like python it is not in­tended for in­ter­act­ing with an in­ter­pre­tor or in­clud­ing the ex­e­cu­tion traces of code. While checklistings does not fo­cus on a spe­cific pro­gram­ming lan­guage, it is de­signed to work well with ML-like lan­guages.

Us­ing the pack­age in­volves three el­e­ments:

  1. The dec­la­ra­tion \usepackage{checklistings}.
  2. The ver­ba­tim en­vi­ron­ment \begin{chklisting}...\end{chklisting}.
  3. The shell script checklistings.sh.

In a first pass, latex/pdflatex out­puts code sam­ples into files. The sec­ond pass is per­formed by checklistings.sh which passes each file through a com­piler to gen­er­ate cor­re­spond­ing out­put files. In a third pass, latex/pdflatex reads from the gen­er­ated files to in­cor­po­rate the re­sults into the doc­u­ment.

A checklistings.hva file is pro­vided for in­ter­op­er­abil­ity with HeVeA.

The checklistings pack­age may be dis­tributed and/or mod­i­fied un­der the con­di­tions of the Project Public Li­cense, ei­ther ver­sion 1.2 of this li­cense or (at your op­tion) any later ver­sion.

Please send com­ments, sug­ges­tions, and bug re­ports (with ver­sion num­ber and the key­word "check­list­ings" in the sub­ject of the mes­sage) to <tim@tbrk.org>. Please keep in mind that we pre­fer to keep checklistings sim­ple and lightweight rather than to in­cor­po­rate many dif­fer­ent con­fig­u­ra­tion and cus­tomiza­tion op­tions. The source code is hosted on GitHub.

This pack­age was de­vel­oped within the PARKAS at In­ria and the ENS.

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

check­list­ings – Pass ver­ba­tim con­tents through a com­piler and rein­cor­po­rate the re­sult­ing out­put

This pack­age aug­ments the fan­cyvrb and list­ings pack­ages to al­low the source code they con­tain to be checked by an ex­ter­nal tool (like a com­piler). The ex­ter­nal tool's mes­sages can be au­to­mat­i­cally rein­cor­po­rated into the orig­i­nal doc­u­ment.

The pack­age does not fo­cus on a spe­cific pro­gram­ming lan­guage, but it is de­signed to work well with lan­guages and com­pil­ers in the ML fam­ily.

Pack­agecheck­list­ings
Re­pos­i­toryhttps://github.com/tbrk/check­list­ings
Ver­sion1.0
Li­cense The Project Public Li­cense 1.2
Copy­right2015 Ti­mothy Bourke and Marc Pouzet
Main­tainer Ti­mothy Bourke
Con­tained inTeX Live as check­list­ings
Topics com­puter code list­ing
call ex­ter­nal code and pro­cess the re­sult
...
Guest Book Sitemap Contact Contact Author