[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Embedding a mathprog model in latex
From: |
Nilo Cesar Teixeira |
Subject: |
Re: [Help-glpk] Embedding a mathprog model in latex |
Date: |
Sun, 13 Nov 2011 13:23:05 -0200 |
Guys, it's solved.
\usepackage{listingsutf8}
\usepackage{lstlang0} %Syntax file, I added some keywords like 'display'
\definecolor{CommentCode}{RGB}{20,20,100}
\lstset{
inputencoding=utf8/latin1,
basicstyle=\ttfamily,
commentstyle=\color{CommentCode},
language=ampl,
breaklines=true
}
\lstinputlisting{PerfectMatching.mprg}
I couldn't make accents work in utf-8 (comments of the model), so I changed the encoding to latin1 (It's in portuguese) and it worked :)
2011/11/13 Nigel Galloway
<address@hidden>
A cheating way to do this is to use an editor which saves the source
code as HTML (inc colours), arrange it (if required using an html
editor), and then use an html to latex converter (if you must).
--
Nigel Galloway
address@hidden
On Saturday, November 12, 2011 4:02 AM, "Andrew Makhorin" <address@hidden>
wrote:
>
> > I had tried verbatim already, but a problem occurred when using it
> > with sciposter class (I'm writing a poster), lines don't wrap and
> > source code text floats all over the next column.
>
> You may place the code listing to occupy the entire page width even the
> ordinary text is placed in two or three columns. This is normal for
> articles and reports.
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
>
--
http://www.fastmail.fm - Access all of your messages and folders
wherever you are
--
Nilo Cesar Teixeira
address@hidden
Re: [Help-glpk] Embedding a mathprog model in latex, glpk xypron, 2011/11/11