# A2x Processor
## Purpose
Converts AsciiDoc files to PDF using [a2x](https://asciidoc-py.github.io/).
## How It Works
Discovers `.txt` (AsciiDoc) files in the project and runs `a2x -f pdf` on each
file. The output format is fixed to PDF; there is no format field.
## Source Files
- Input: `**/*.txt`
- Output: `out/processor.generator.a2x/{relative_path}.pdf`
## Configuration
```toml
[processor.generator.a2x]
command = "a2x" # The a2x command to run
args = [] # Additional arguments to pass to a2x
output_dir = "out/processor.generator.a2x" # Output directory
dep_inputs = [] # Additional files that trigger rebuilds when changed
```
| `command` | string | `"a2x"` | The a2x executable to run |
| `args` | string[] | `[]` | Extra arguments passed to a2x |
| `output_dir` | string | `"out/processor.generator.a2x"` | Output directory |
| `dep_inputs` | string[] | `[]` | Extra files whose changes trigger rebuilds |
## Batch support
Each input file is processed individually, producing its own output file.
## Clean behavior
This processor is a Generator — `rsconstruct clean outputs` removes each declared output file individually with no directory recursion. After all per-product cleans complete, the orchestrator removes any parent directories that are now empty. Pass `--no-empty-dirs` to keep them. See [Clean behavior](../../processors.md#clean-behavior) and [`rsconstruct clean`](../../commands.md#rsconstruct-clean).