Tables, Figures and Document Structure
In this article
- Name the relationships a table, a figure and a section carry (cell to header, rows across a page break, caption to figure, block to heading, content to page furniture) and the wrong answer each loss causes.
- Store those relationships as block fields of the canonical document: a parent, a table as cells with row, column and page, a caption linked to its figure, a furniture marker, a page and bounding box.
- Explain linearization and why the plain text a later component reads is rendered from the stored blocks, never stored in their place.
- Terms defined here: linearization.
Overview
Copy a table out of a PDF into a text editor and the grid is gone. You get the words in a row, and nothing says which value sat under which column. A person guesses; a search index and the model reading its results cannot.
In an invented example, Brightline, a home-internet provider, runs a support assistant on its website that answers customers and can look up an order, issue a refund of at most $50 and hand a conversation to a person on the support team. Brightline's 12 router manuals are PDF files; most have a text layer, and one older manual is a scan. The company, its manuals and their pages are made up.
The manual manual-bl-r7 is already ordered, typed blocks, but its error-code table, the figure below it and the headings above it need more than order. The map: each relationship on a page becomes a field of a block, and any plain text is rendered from those fields, never kept instead of them.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- What order alone cannot say
- Sections: every block knows its parent
- Tables: a grid, not a run of text
- Figures, captions and page furniture
- The block graph
- Linearization: text rendered from the structure
- A real parser stores the same pattern
- Common mistakes
- Sources
- Check yourself, 13 questions