# Public export examples

These files use a synthetic lesson, “函数与变化率”, with two equations and a small table. They contain no user documents and can be downloaded without creating a conversion or consuming a trial.

- Word, WPS and MathType DOCX files were generated by the corresponding HTTP export paths. WPS reuses the deployed custom Pandoc writer and the shared Go WPS compatibility pass; both formula counts were verified. MathType converted both equations.
- DOCX page previews were rendered with LibreOffice and explicit Noto Sans CJK fonts. They illustrate exported content and structure, not a native WPS or Microsoft Word screenshot; editing must be checked in the corresponding application.
- The searchable PDF was generated by rasterizing the synthetic Word page and passing the image-only PDF with matching text geometry through the actual text-layer endpoint. Searchable text was absent before conversion and present afterward.
- Markdown, LaTeX and Typst files were generated from the same HTML source with Pandoc. The HTML preview is a browser rendering of document.html.

## Reproduce the LaTeX sample

`document.tex` is a synthetic Pandoc fixture generated from the tracked `document.html`, not a real Doc2X conversion or evidence of recognition accuracy. `latex-preview.png` shows its PDF compiled with XeLaTeX, including Chinese text, equations and the table.

Requirements: local Pandoc 3.4+, XeLaTeX with the Fandol fonts (including `FandolSong-Regular.otf` and `FandolSong-Bold.otf`), and Poppler's `pdftoppm`. These commands do not install tools or access the network. Run from the repository root:

```sh
node scripts/generateLatexExportSample.mjs
mkdir -p work/latex-export-sample
xelatex -no-shell-escape -interaction=nonstopmode -halt-on-error -jobname=latex-compiled -output-directory=work/latex-export-sample public/samples/export-effects/document.tex
xelatex -no-shell-escape -interaction=nonstopmode -halt-on-error -jobname=latex-compiled -output-directory=work/latex-export-sample public/samples/export-effects/document.tex
cp work/latex-export-sample/latex-compiled.pdf public/samples/export-effects/latex-compiled.pdf
pdftoppm -f 1 -singlefile -r 120 -png public/samples/export-effects/latex-compiled.pdf public/samples/export-effects/latex-preview
```

The generation script writes only `document.tex`; compilation produces `latex-compiled.pdf`, and rasterization produces `latex-preview.png`. Keep compilation logs outside the public sample directory and check them for missing glyphs before updating the published assets.
