New on CTAN: statrep
The StatRep package is a LaTeX package that provides two environments and two tags that work together to display your SAS code and results and to generate the SAS program that produces those results. The two environments (Datastep and Sascode) display SAS code. The two tags (Listing and Graphic) display SAS output.
This package is located at http://mirror.ctan.org/macros/latex/contrib/statrep . More information is at http://www.ctan.org/pkg/statrep (if the package is new it may take a day for that information to appear). We are supported by the TeX Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/usergroups.html .
Thanks for the upload. For the CTAN Team Rainer Schöpf
StatRep – Displays SAS code and results of running the code
The StatRep package provides a system for creating reproducible research documents that combine LaTeX markup with SAS code and output. It allows authors to write a single LaTeX source document that simultaneously serves as the analysis script and the final report.
The package provides two environments (Datastep and Sascode) to display SAS code, and two tags (Listing and Graphic) to display SAS output. At compile time, StatRep automatically generates a SAS program that captures all requested output using the SAS Output Delivery System (ODS).
This updated version brings the following improvements over the original StatRep package:
- Improved path resolution with the SASmode option: WorkStation mode uses the current directory as root, while Server mode dynamically resolves the path from the _SASPROGRAMFILE SAS macro variable, enabling use in SAS Studio and SAS OnDemand for Academics.
- Full UTF-8 encoding support for SAS output files, with automatic detection from the inputenc package and fallback to UTF-8 by default.
- New SAS macros (STATREPResults, STATREPAllResults, STATREPMACROVAR) for automatic export of SAS numeric results and macro variables directly into LaTeX via \def commands, using predefined formatting for numbers, percentages, and dates
The package also includes the longfigure package for multi-page figures, a complete suite of SAS macros (statrep_macros.sas), and full documentation including a user's guide and a quickstart example.
This is an updated and maintained version of the original StatRep package developed by Tim Arnold and Warren F. Kuhfeld at SAS Institute Inc.
| Package | StatRep |
| Version | 2.0 |
| Copyright | 2014–2015 SAS Institute Inc. 2026 Martial Phélippé-Guinvarc'h |
| Maintainer | Martial Phélippé-Guinvarc'h |