# clawxiv — Provenance typesetting for human–AI collaborative writing

## Overview

The `clawxiv` package provides LaTeX environments for attributing text
passages to their actual authors in documents that mix human and AI
contributions.  Three visually distinct left-ruled boxes distinguish:

- **`seniorquote`** — the corresponding/senior human author (steel blue)
- **`aiquote`** — an AI co-author (amber/ochre)
- **`coauthorquote`** — other human co-authors (grey)

Each environment takes an author name, a timestamp, and an optional URL
linking to the original session, making provenance claims verifiable.
Aliases `humanprompt` and `airesp` support prompt/response transcript style.

## Motivation

Existing LaTeX attribution mechanisms (quotation, citation, footnotes) were
designed for text from external sources, not for co-authors who participate
in the act of composition.  As AI systems become genuine collaborators in
research writing, documents that record not only *what* was written but *who*
wrote it, *when*, and from *which session* are more honest artifacts than
those that merge all contributions into a single undifferentiated voice.

This package is the LaTeX component of the ClawXiv framework for archiving
human–AI co-authored papers with full provenance tracking.

## Usage

```latex
\usepackage{clawxiv}

\begin{aiquote}{Claude Sonnet 4.6}{2026-03-29}[https://claude.ai]
  Text contributed by the AI co-author.
\end{aiquote}

\begin{seniorquote}{András Kornai}{2026-03-29}
  Text contributed by the human author.
\end{seniorquote}
```

## Installation

Run `latex clawxiv.ins` to extract `clawxiv.sty`, then move it to a
directory on your TeX search path (e.g. `~/texmf/tex/latex/clawxiv/`).

Distributed documentation files are `clawxiv-sty-doc.tex` and
`clawxiv-sty-doc.pdf`. To rebuild the documentation, run
`pdflatex clawxiv-sty-doc.tex` twice. The literate source remains
`clawxiv.dtx`; if you edited `clawxiv.dtx`, rerun `latex clawxiv.ins`
first to regenerate `clawxiv.sty`.

## Dependencies

`mdframed`, `xcolor`, `hyperref`, `xparse`. All are available on CTAN and
included in TeX Live and MiKTeX.

## Authors and release roles

- András Kornai (BME / SZTAKI), ORCID 0000-0001-6078-6840 — author, current maintainer, releasing author
- Claude Sonnet 4.6 (Anthropic) — original AI co-author of the package design and implementation
- ChatGPT GPT-5.4 Thinking (OpenAI) — AI contributor for the 2026-04-18 documentation-build diagnosis, source-level repair, verification, explicit release-provenance metadata, and the 2026-04-19 CTAN follow-up adjustments in the final v0.4.3 bundle

## License

This work is distributed under the LaTeX Project Public License
`lppl1.3c`. See https://www.latex-project.org/lppl/lppl-1-3c/

## Version history

- v0.4 (2026-03-29): First CTAN release. Environments `seniorquote`,
  `aiquote`, `coauthorquote`, aliases `humanprompt`/`airesp`, snip
  insertion markers.
- v0.4.1 (2026-04-18): Fix `clawxiv.dtx` documentation build, remove
  unused runtime dependencies, and clarify `\snipinsert` semantics.
- v0.4.2 (2026-04-18): Record explicit bundle-internal provenance and
  bounded endorsement for the v0.4.1 repair line; no functional code changes.
- v0.4.3 (2026-04-19): CTAN follow-up release: fix the duplicated `v` in the
  documentation date line, distribute the documentation as
  `clawxiv-sty-doc.tex` / `clawxiv-sty-doc.pdf`, and state the
  `lppl1.3c` license consistently across the shipped files.

## Release provenance

The final `v0.4.3` bundle is intentionally archival in character. It preserves the repaired source line, keeps András Kornai as the durable human maintainer and releasing author, records the AI contribution of ChatGPT GPT-5.4 Thinking explicitly in both human-readable and machine-readable form, and incorporates the minor CTAN follow-up changes requested after acceptance. The endorsement conveyed by the bundled AI statement is textual and bounded by the actual work performed and tested; it is not a cryptographic signature.
