Environment:7onez Cti expert Pandoc
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Reporting |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Linux/macOS environment with Pandoc and XeLaTeX for deterministic Markdown→PDF/DOCX report rendering in the IntelReport layer.
Description
This environment provides the two system tools that `render_report.py` (the IntelReport renderer) needs to compose publication-grade PDF and DOCX deliverables from the house-style Markdown. Pandoc converts Markdown to both DOCX (direct) and LaTeX (for PDF); XeLaTeX compiles the LaTeX to PDF with full Unicode/CJK support. A Vietnamese-capable font is auto-selected from fontconfig. The renderer is stdlib-only Python — it shells out to `pandoc` and `xelatex` as subprocesses.
= Usage
Use this environment for deterministic report composition — the house report build's final render step. It is the mandatory prerequisite for `House_Report_Build` when `--pdf` or `--docx` output is requested. Without these system tools, the composed Markdown (`<stem>.house.md`) is still written, but the PDF/DOCX render step fails with a `render_error`.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS | WSL2 on Windows |
| Hardware | Any CPU | 2GB RAM; PDF compilation is CPU-bound |
| Disk | 1GB | TeX Live + Pandoc + fonts |
Dependencies
System Packages
- `pandoc` (install: `brew install pandoc` / `apt install pandoc`)
- `xelatex` (install: `brew install --cask mactex-no-gui` / `apt install texlive-xetex texlive-fonts-recommended`)
- `fonts-noto-core` (Linux: `apt install fonts-noto-core`) — Vietnamese-capable font, auto-selected via `fc-list :lang=vi`
Python Packages
None — `render_report.py` is stdlib-only.
Credentials
No credentials required. This is a local document rendering pipeline.
Quick Install
# Linux
sudo apt install pandoc texlive-xetex texlive-fonts-recommended fonts-noto-core
# macOS
brew install pandoc && brew install --cask mactex-no-gui
Code Evidence
IntelReport requirements documenting system tools, from `intel_engine/IntelReport/requirements.txt:1-6`:
# IntelReport has NO Python package dependencies — render_report.py is stdlib-only.
# It requires two SYSTEM tools already used by this repo:
# pandoc (brew install pandoc / apt install pandoc)
# xelatex (brew install --cask mactex-no-gui / apt install texlive-xetex texlive-fonts-recommended)
# A Vietnamese-capable font is auto-selected from what fontconfig reports (fc-list :lang=vi);
# on a bare Linux box install e.g. fonts-noto (apt install fonts-noto-core).
House report invocation of the renderer, from `intel_engine/tools/house_report.py:1602-1606`:
cmd = [PY, RENDER_REPORT, md_path, os.path.join(rep_dir, stem), "--case-id", c["case"],
"--classification", classification, "--audience", audience, "--pdf", "--docx"]
if no_figures:
cmd.append("--no-figures")
r = _run(cmd, timeout=600)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `render_error: pandoc not found` | Pandoc not installed | `apt install pandoc` / `brew install pandoc` |
| `render_error: xelatex not found` | XeLaTeX not installed | `apt install texlive-xetex` / `brew install --cask mactex-no-gui` |
| Tofu/missing glyphs in PDF | No Vietnamese font installed | `apt install fonts-noto-core` |
| `Dimension too large` in xelatex | Image exceeds 4000px (`_MAX_PX`) | Downscale image; the report builder auto-downscales hi-res figures |
Compatibility Notes
- Pandoc HTML escaping: Pandoc reads `<word ...>` as raw HTML and drops it from PDF/DOCX. The house report escapes every `<` outside code spans so attacker strings like `Sign in to <Acme Bank>` survive.
- XeLaTeX image limit: `xelatex \includegraphics` chokes on images exceeding 4000px (`_MAX_PX = 4000`). The report builder auto-downscales oversized PNGs.
- Markdown-only fallback: `--md-only` composes the Markdown without rendering, so the report is still usable even without Pandoc/XeLaTeX.