Metadata-Version: 2.4
Name: ltc-paper-scripts
Version: 0.1.0
Summary: LTC paper PDF scripts and assets only
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Paper PDF build scripts - November 4, 2026

Standalone snapshot of the approved 17-page paper exhibit builder. Copy this
entire folder into Census. It does not import anything from the parent
`ltc_code` package or the separate `paper/` folder.

This folder is distributed as `ltc-paper-scripts` 0.1.0. It contains the paper
scripts and assets only. Installing it has no declared dependencies and does
not install rendering libraries. There is no `pyproject.toml`, `__init__.py`,
`uv.lock`, or `.gitignore` in the download. The wheel includes only the required
PyPI distribution metadata in addition to this folder.

To locate the installed folder without an initialization file:

```python
import ltc_paper_scripts
print(next(iter(ltc_paper_scripts.__path__)))
```

Copy the whole folder into your editable Census code directory. The normal
command `python build_latex.py` uses the libraries already in that environment.
The requirements file and Bash runner are optional conveniences for setting up
an environment where dependency installation is permitted.

## Run in Census

Use Python 3.9 or newer, the Python libraries in `latex_requirements.txt`, and
**pdfLaTeX** with the TeX packages listed in `latex_source/paper/preamble.tex`.
The build requires no R, XeLaTeX, LuaLaTeX, shell escape, or internet access
once those dependencies are installed. It compiles three pdfLaTeX passes.

1. Supply your real results workbook. The included workbook combines existing
   disclosed/example values and synthetic examples; it is not a new release.
2. Edit `paths.py`: set `PENDING_INPUT`, the output location, and `PDFLATEX` if
   the executable is not on PATH. Keep `PAPER_ROOT` at this folder, or adjust
   it when using a shared `paths.py` in a separate code directory.
3. Edit `input_mapping()` in `build_latex.py`: sheet/outcome/header names,
   sample/specification names, the network roster, units, and benchmarks as
   needed. Preserve the descriptive mapping keys on the left.
4. From this folder, run:

   ```sh
   python build_latex.py
   ```

On a machine with `uv`, the equivalent command is:

```sh
uv run --no-project --with-requirements latex_requirements.txt python build_latex.py
```

`run_latex.sh` is an optional convenience for systems with Bash. Census does
not need Bash or `uv` if Python and the required libraries are already available.

The output is `output/charter_exhibits_latex.pdf`, accompanied by an audit JSON.
The `output/latex_build/` directory contains the generated TeX and compile logs.
There is no preview banner on the PDF pages.

## Included exhibits and calculations

- Figures 1-3, Tables 1-7, Figures A2-A4, and Tables A1-A4.
- Excludes Figure 4, Figure A1, Tables A5-A7, and Table 1 Panel E.
- All results default to the new workbook. Table results are red; figures
  preserve their orange/teal colors.
- Wage percent = `100 * wage coef / wage CCM`. Table 6 uses this same unrounded
  percentage for every mediation denominator; there is no fixed 13.6 value.
- Real inputs must contain the required results in the mapped units. This
  builder consumes estimates, standard errors, control means, counts, and
  summary statistics; it does not estimate regressions from microdata.

## Files to keep together

Keep every included Python file, `table_bindings.json`, the entire
`latex_source/` tree, and `fonts/`. These are the core renderer and its assets.
Only `paths.py` and `build_latex.py` need routine configuration. The example
workbook can be replaced with real results. The old disclosed workbook is not
required unless you explicitly opt into `reuse_disclosed`.

The open DejaVu fonts and their license are bundled for portability. Installed
Lucida Sans is preferred where available; otherwise typography uses DejaVu.
Proprietary Office fonts are not included. The tick algorithm's license is in
`TICK_ALGORITHM_LICENSE.txt`.

Copied from `src/ltc_code/paper/` on November 4, 2026. Runtime files and templates
match that approved builder; the README is specific to this standalone copy.
The requirements file permits ReportLab 4.5 and newer. On Python 3.9 it selects
ReportLab 4.x because ReportLab 5.1 requires Python 3.10 at runtime.
