How to get AMPL source file in LaTeX?

1,229 views
Skip to first unread message

Sive.Chr...@googlemail.com

unread,
Mar 23, 2007, 10:52:10 AM3/23/07
to AMPL Modeling Language
Hi!

I'm a student from Germany and currently I'm writing my diploma thesis
in optimization. Therefor I'd like to include an AMPL source file in
the appendix of the LaTeX file. I found the TeX-package 'listings' and
embedded it by the declaration \usepackage{listings}. Then you've to
choose different options with the command \lstset{ ... }, e.g. the
used programming language. Do you know, if there's any possibility to
use "AMPL" in this declaration? Or if not, which of the supported
languages' syntax (you can find them here at page 12:
ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/listings/listings.pdf)
is most similar to AMPL?

Thank a lot!
Greetz, alibaba :)

oli...@engr.smu.edu

unread,
Mar 23, 2007, 6:23:36 PM3/23/07
to am...@googlegroups.com
A simple solution is to use the verbatim enviroment to include AMPL sources.

Sive.Chr...@googlemail.com

unread,
Mar 24, 2007, 5:36:02 AM3/24/07
to AMPL Modeling Language
Thanks! It looks much better than the TeX output with \lstset and
another programming language (not AMPL). The use of the listing
package has the advantage that you've features like syntax
highlighting and line numbering. You can adapt the style file to AMPL
syntax by yourself but that means much work and I hoped maybe there
already exists such a template.


On 23 Mrz., 23:23, olin...@engr.smu.edu wrote:
> A simple solution is to use the verbatim enviroment to include AMPL sources.
>
>
>
> > Hi!
>
> > I'm a student from Germany and currently I'm writing my diploma thesis
> > in optimization. Therefor I'd like to include an AMPL source file in
> > the appendix of the LaTeX file. I found the TeX-package 'listings' and
> > embedded it by the declaration \usepackage{listings}. Then you've to
> > choose different options with the command \lstset{ ... }, e.g. the
> > used programming language. Do you know, if there's any possibility to
> > use "AMPL" in this declaration? Or if not, which of the supported
> > languages' syntax (you can find them here at page 12:

> >ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/listings/list...)

Reply all
Reply to author
Forward
0 new messages