Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline images in captions #545

Merged
merged 2 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,12 @@
</math>

<figure class="image">
<figcaption>...</figcaption>
<figcaption>
This is a figcaption with an inline <img src="images/valentin.jpg" alt="symbol"/> to check validity
</figcaption>
<img src="images/valentin.jpg" alt="figure" aria-describedby="desc012" />
<aside class="fig-desc" id="desc012">
<p>...</p>

</aside>
</figure>

Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/xml/schema/2020-1/nordic2020-1.sch
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,7 @@
<p></p>
<rule context="html:figure[tokenize(@class, '\s+') = 'image']">
<let name="context" value="concat('(&lt;', name(), string-join(for $a in (@*) return concat(' ', $a/name(), '=&quot;', $a, '&quot;'), ''), '&gt;)')"/>
<assert test="count(.//html:img) = 1">[nordic253b] Image figures must contain exactly one img. <value-of select="$context"/></assert>
<assert test="count(html:img) = 1">[nordic253b] The img in image figures must be a direct child of the figure. <value-of select="$context"/></assert>
<assert test="count(html:img) = 1">[nordic253b] There must be exactly one img as a direct child of the figure element. <value-of select="$context"/></assert>
</rule>
</pattern>

Expand Down