raw derive PDF: Auszeichnungen auf ein Minimum - Struktur zuerst (Fließtext, Code, Tabellengitter, Vorlagen), ~~ ** * nur wo die Form eindeutig ist, Bildseiten-CHECK nur für Inhaltsbilder (#231); 10.1.0-beta.5
CI / verify (push) Successful in 8m1s
CI / pwsh (push) Successful in 2m41s
Converters / converters (push) Successful in 9m30s
Release / converters (push) Successful in 26s
Release / release (push) Successful in 35s
Release / wiki-mirror (push) Skipped

Files changed:
- CHANGES.md
- VERSION
- docs/how-to/ingest-a-source.md
- docs/reference/commands/raw-material-and-uploads.md
- raw/CONTRACT.md
- tools/CONTRACT.md
- tools/chemenu/commands/raw/derive.py
- tools/chemenu/filters/pdf.py
- tools/chemenu/filters/pdf_layout.py
- tools/chemenu/tests/binary_formats.py
- tools/chemenu/tests/test_raw_derive_binary.py

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Code committed 2026-10-14 20:23:07 +02:00
1 parent 01360e9045
commit a581271165
11 files changed
+872 -178

No files matched your search

+19 -9
View File
@@ -394,15 +394,25 @@ derivation, accepted with it, and an existing one is never overwritten.
**A PDF's outline and markings are in the derivation.** The header of `derived.md` lists the
PDF's outline as `outline` entries - title, level, page and the line of that page's
`<!-- page N -->` marker in the file - so a reader finds a section without reading the whole
text. In the text, three markings carry what the page shows by form alone: a background fill is
`<mark data-farbe="…">…</mark>`, a strike-through is `~~…~~`, and text in a colour other than the
running text, without a link under it, is `*…*`. A marking records how the page looks, not what
it means: nothing in the tool decides that yellow is a deadline, and removing the markings gives
the same text as without them. The `markings` header field is the legend - each marking in use,
with its count and pages. No tag crosses a line or a page marker. A page whose text cannot be
matched to its layout gets no markings and a WARN; a PDF with images the text does not hold gets
a CHECK naming the pages, because the tool has no OCR. A PDF without outline or markings is
derived as before. Reading the layout needs `pdfminer.six` beside `pypdf`.
text. In the text, three markings carry what the page shows by form alone, as plain Markdown:
`~~…~~` is a strike-through, `**…**` is a highlighter stroke, bold type, or a colour clearly
unlike the running text (not under a link), and `*…*` is italic. The tool marks as little as it
can stand behind: it reads the structure first - running text, program text, ruled tables, and
shapes the document repeats on its pages - and marks only where the form is unambiguous. Bold,
italic and colour count inside running text only; highlighter and strike-through also in the
regulations that use them, but never in program text, a table's grid or a recurring template. A
line that is bold or italic from end to end is a heading or a quotation, not a marking. A marking
records how the page looks, not what it means: nothing in the tool decides that yellow is a
deadline, and removing the markings gives the same text as without them. The `markings` header
field is the legend, at most three lines, one per kind in use, with its count and pages; the
`**` line also names the highlighter colours with their pages. A tag never starts or ends on
whitespace and never crosses a line or a page marker. A page whose text cannot be matched to its
layout gets no markings and a WARN. A CHECK names the pages whose pictures the text does not
hold, because the tool has no OCR: a picture counts unless it is a background covering most of
the page, a filler a few pixels or points in size, or the same picture on a fifth of the pages
(a logo, a frame); a vector drawing with many paths and little text counts too. A PDF without
outline or markings is derived as before. Reading the layout needs `pdfminer.six` beside
`pypdf`.
**The original stays.** The derivation is the tool's reading of it, never the source: with the
original kept, a claim in `kb/` can still be checked against what the document said when a