It looks like maxWidth
option affects only pixel images, like png, bmp etc. It affects actual image size, so with maxWidth set to 3, you will get images with maximum 3 pixel width. It's not controlled by format itself, like width
argument in html or latex. PUBLISH function uses XML as the intermediate format and I believe this is the problem of current XML schema design.
With latex format PUBLISH by default uses epsc2 print driver and produces vector image in EPS format. So maxWidth is simply ignored. If you use ...'imageFormat','png',...
in publish call you notice that the size of output png file changes in accordance with maxWidth
. Anyway the size of the image in tex document will be 4in (with bad image resolution in case of low maxWidth) as set in the default stylesheet for latex.
Looks like there is no way to change this behavior in PUBLISH.
You can modify the xml stylesheet (matlabroot/toolbox/matlab/codetools/private/mxdoom2latex.xls).
Check for those lines:
<xsl:template match="img">
\includegraphics [width=4in]{<xsl:value-of select="@src"/>}
</xsl:template>
Copy this file, modify and specify the new file with stylesheet
option.
Or simply change the width argument in the output .tex file(s).