Is there a hook that will allow me to change the document style and/or add packages to the latex file produced by the publish(...,'latex') command?

13 visualizaciones (últimos 30 días)
I'm preparing notes for a class on numerical analysis. I would like to use the publish command to create a latex file that includes markup more sophisticated than matlab's embedded tex processor can handle, which I can then run through latex directly to produce class notes and handouts. Is there a hook that will allow me to change the document style and/or add packages to the latex file produced by the publish(...,'latex') command (and, so, save me the manual step of adding these by hand after the publish command produces the .tex file)?

Respuesta aceptada

François
François el 19 de Mzo. de 2016
Hi,
You have just to put your own XSL file.
For instance:
publish('General.m','format','latex','stylesheet','/FullPath/mydom2latex.tex') where mydom2latex.tex is my own mxdom2latex.xsl, the default file using by matlab.
I add \usepackage{listings} and colours, some package and encoding for UTF8 french and it works...
So I attach files.

Más respuestas (1)

Walter Roberson
Walter Roberson el 2 de Ag. de 2015
  2 comentarios
Lee Samuel Finn
Lee Samuel Finn el 2 de Ag. de 2015
Thanks for the references. In my case, however, I'm not interested in html: I want the latex file produced by the command
publish('foo.m','latex')
to have a specified set of \documentstyle and \usepackage commands. It's my intent to run these through (pdf)latex to produce a set of notes that I will post as pdf files.
Walter Roberson
Walter Roberson el 2 de Ag. de 2015
The second and third links show you how to augment the MATLAB latex processing to recognize additional packages.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Report Generator en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by