Skip to content

Commit

Permalink
Prevent captionless images from floating in LaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jan 20, 2025
1 parent f4c88b6 commit 2b2e9ac
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -39441,19 +39441,28 @@ end
\markdownSetup {
rendererPrototypes = {
image = {
\begin { figure }
\begin { center }
\includegraphics
[ alt = { #1 } ]
{ #3 }
\tl_if_empty:nF
{ #4 }
{ \caption { #4 } }
\seq_map_inline:Nn
\l_@@_image_identifiers_seq
{ \label { ##1 } }
\end { center }
\end { figure }
\tl_if_empty:nTF
{ #4 }
{
\begin { center }
\includegraphics
[ alt = { #1 } ]
{ #3 }
\end { center }
}
{
\begin { figure }
\begin { center }
\includegraphics
[ alt = { #1 } ]
{ #3 }
\caption { #4 }
\seq_map_inline:Nn
\l_@@_image_identifiers_seq
{ \label { ##1 } }
\end { center }
\end { figure }
}
},
}
}
Expand Down

0 comments on commit 2b2e9ac

Please sign in to comment.