do not resize small images

This commit is contained in:
Frédéric Péters 2012-06-15 15:43:38 +02:00
parent 81a40f9a37
commit 2df9700d4f
1 changed files with 10 additions and 1 deletions

View File

@ -171,7 +171,16 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:template mode="mal2latex.block.mode" match="mal:figure">
<xsl:text>&#x000A;</xsl:text>
<xsl:text>\begin{figure}[H]\begin{center}&#x000A;</xsl:text>
<xsl:text>\includegraphics[width=.5\textwidth,height=7cm,clip,keepaspectratio]{</xsl:text>
<xsl:text>\includegraphics</xsl:text>
<xsl:choose>
<xsl:when test="number(mal:media/@height) &lt; 50">
<xsl:text>[scale=0.5]</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>[width=.5\textwidth,height=7cm,clip,keepaspectratio]</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>{</xsl:text>
<xsl:value-of select="mal:media/@src"/>
<xsl:text>}&#x000A;</xsl:text>
<xsl:text>\caption{</xsl:text>