Behaviour SwRS-MDOKFSTUDIO-CORE-008
Images fit the column, sit on the line and survive a missing file
When a document shows an image, the extension SHALL size it to at most the content column width and keep its aspect ratio, place it on the text line when it is written inside a line of text, and keep its element and alt text in document order when its local file is missing.
Part of StRS-MDOKFSTUDIO-CORE-001, outside the paths drawn on its map.
Another outcome at step 1 of path 1 in StRS-MDOKFSTUDIO-CORE-003, in the state “The preview shows a good render”.
Scenarios 5
The situations the tests check; open one to read it.
nominalFit images in the content column
Givenan image wider than the content column
Whenit is rendered
Thenits width equals the column width and its height scales
boundaryA narrow image keeps its natural size
Givenan image narrower than the column
Whenit is rendered
Thenit keeps its natural size
nominalPlace inline images on the text line
| Input | Outcome |
|---|---|
| an image written inside a sentence | it is rendered inline and centred on the text line |
| an image alone in its paragraph | it is a centred figure paragraph |
refusalKeep an image whose file is missing
Givenan image whose local file is absent
Whenit is rendered
Thenthe element and alt text stay in place in document order, the source is removed and the page shows no broken-image overflow
boundaryAn existing file loads
Giventhe same image with a file that exists
Whenit is rendered
Thenthe image loads normally
Implemented in 4
Tested by 4
Replaces
SwRS-MDOKFSTUDIO-CORE-009Keep an image whose file is missing superseded superseded by SwRS-MDOKFSTUDIO-CORE-008 Markdown file
SwRS-MDOKFSTUDIO-CORE-065Place inline images on the text line superseded superseded by SwRS-MDOKFSTUDIO-CORE-008 Markdown file