"Publish" in pdf

Using Matlab, I would like to create a pdf document summarizing the results of several experiments. Ideally, I would have one page in one experiment, in which there would be 2 figures with several panels and some text.

I thought there publish.mwould be a way to go, however pdf publication does not support inserting page breaks, and I can neither control the quality of the figure (which is pretty bad), nor the size of the figure (which means that 2 digits occupy the entire page), and I don’t could type text into headers and footers.

How else can I create a multi-page pdf with some control over the layout from Matlab?

+5
source share
6 answers

Matlab Report Generator Toolbox, . , .

Matlab, PDF, . :

  • LaTeX, PdfLaTeX PDF
  • reStructuredText, Python docutils PDF
  • DocBook XML, DocBook PDF
  • HTML, OpenOffice PDF.

, Matlab. / , , .

+5

pdf, iText Java PDF library - Java- MATLAB.

+1
  • example.m , :

    x = -5 : 5
    for i=1:3
      plot(x, x .^ i );
      snapnow;
      disp('<latex>\clearpage</latex>')
    end
    
  • xsl-stylesheet MATLAB

    ...\toolbox\matlab\codetools\private\mxdom2latex.xsl
    

    example.m, , custom_mxdom2latex.xsl.

  • .xsl , :

    <xsl:apply-templates select="text"/>
    <xsl:apply-templates select="mcode"/>
    <xsl:apply-templates select="img"/>
    <xsl:apply-templates select="mcodeoutput"/>
    
  • :

    <xsl:apply-templates select="text|mcode|img|mcodeoutput"/>
    
  • opts.format='latex';opts.stylesheet='custom_mxdom2latex.xsl'
    publish('example', opts)
    

    :)

P.S. , , .

+1

MathWorks , - publish.

0

LaTeX, , HTML.

, publish.m , LaTeX. , , , , N , .

, LaTeX ( export_fig , ), - pdf. , LaTeX, .

0

LaTeX, . , , . , . TexWorks LaTeX pdf. ( , ) , , PDF-. , , , pdf.

%% 
% <latex>
% \clearpage
% </latex>

: , , Matlab 2012b ( , ). LaTeX, , , Matlab, , , .

\ usepackage {amsmath}

\ usepackage {amssymb}

LaTeX TeXworks, , , TeXworks pdfLaTeX + MakeIndex + BibTeX

0

All Articles