Thread Subject: Publish to Latex: lstlisting instead of verbatim

Subject: Publish to Latex: lstlisting instead of verbatim

From: Uwe Brauer

Date: 24 Feb, 2009 14:09:01

Message: 1 of 7

Hello

may I propose to use the lstlisting environment for Latex files instead of verbatim. Lstlisting has much better support for Matlab than verbatim, concerning the formatting of Matlab commands.

Uwe Brauer

Subject: Publish to Latex: lstlisting instead of verbatim

From: Matthew Simoneau

Date: 24 Feb, 2009 21:14:01

Message: 2 of 7

I looked at using listing, but was worried about introducing another dependency.

Subject: Publish to Latex: lstlisting instead of verbatim

From: Uwe Brauer

Date: 25 Feb, 2009 12:06:03

Message: 3 of 7

"Matthew Simoneau" <matthew@mathworks.com> wrote in message <go1nup$rol$1@fred.mathworks.com>...
> I looked at using listing, but was worried about introducing another dependency.

looking at your email address I see that you are a working for mathworks.

Which dependecies are you afraid off?

Subject: Publish to Latex: lstlisting instead of verbatim

From: Matthew Simoneau

Date: 27 Feb, 2009 21:20:02

Message: 4 of 7

I'm not really a LaTeX expert, so I don't know I've got this right. My understanding is that this is a separate package that the user would have to install separately.

Subject: Publish to Latex: lstlisting instead of verbatim

From: Uwe Brauer

Date: 27 Feb, 2009 22:03:01

Message: 5 of 7

"Matthew Simoneau" <matthew@mathworks.com> wrote in message <go9le2$43l$1@fred.mathworks.com>...
> I'm not really a LaTeX expert, so I don't know I've got this right. My understanding is that this is a separate package that the user would have to install separately.

Well some years ago, this was correct, but meanwhile the most popular latex distribution (texlive for the linux world and miktex) include lslistings.

To be on the save side it could be implemented optionally:
publish('foo.m','latex','lslistings')

or something like this


Uwe

Subject: Publish to Latex: lstlisting instead of verbatim

From: Matthew Simoneau

Date: 2 Mar, 2009 19:17:01

Message: 6 of 7

Thanks for the info, Uwe. I'll put this back in the enhancement pile.

Just so you know, you can copy toolbox/matlab/codetools/private/mxdom2latex.xsl, modify it to your liking, and specify it as a custom stylesheet.

Subject: Publish to Latex: lstlisting instead of verbatim

From: Uwe Brauer

Date: 3 Mar, 2009 10:39:01

Message: 7 of 7

"Matthew Simoneau" <matthew@mathworks.com> wrote in message <gohbbd$rig$1@fred.mathworks.com>...
> Thanks for the info, Uwe. I'll put this back in the enhancement pile.
>
> Just so you know, you can copy toolbox/matlab/codetools/private/mxdom2latex.xsl, modify it to your liking, and specify it as a custom stylesheet.

Great! I do this, the only thing I am uncertain about is how to specify it as a custom stylesheet, but I would just make a backup copy of the old one and modify the mxdom2latex.xsl
Uwe

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
listing Matthew Simoneau 24 Feb, 2009 16:15:09
publish Matthew Simoneau 24 Feb, 2009 16:15:09
format Matthew Simoneau 24 Feb, 2009 16:15:09
latex Matthew Simoneau 24 Feb, 2009 16:15:09
publish latex v... Uwe Brauer 24 Feb, 2009 09:10:05
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com