Source Code into latex [message #25712] |
Mon, 09 July 2001 06:49  |
Dominik[1]
Messages: 46 Registered: April 2001
|
Member |
|
|
Hi there,
does somebody know, how I can convert or create a latex-document out of my
IDL Source Code?
Thanks
Dom
--
====================================
Dominik Paul
Uniklinik Freiburg
Abt. Nuklearmedizin/PET
====================================
|
|
|
Re: Source Code into latex [message #25737 is a reply to message #25712] |
Thu, 12 July 2001 09:47   |
George N. White III
Messages: 56 Registered: September 2000
|
Member |
|
|
On Mon, 9 Jul 2001, Dominik Paul wrote:
>
> Hi there,
>
> does somebody know, how I can convert or create a latex-document out of my
> IDL Source Code?
I often include IDL code in LaTeX (and ConTeXt) documents using the
ProTeX literate programming macro package.
Simple example:
\documentclass[11pt]{article}
\usepackage{txfonts} %
% ProTex:
% http://www.cis.ohio-state.edu/~gurari/tpf/html/LitProg.html
% Eitan Gurari, "TeX and LaTeX: Drawing and Literate Programming".
% McGraw-Hill, 1994. ISBN 0-07-025208-4 / 0-07-911616-7
\ifx\AlProTex\undefined%
\input{ProTex.sty}
\fi
\AlProTex{f,<<<>>>,title,list,`}
\title{IDL in \LaTeX}
\author{George N. White III}
\begin{document}
\maketitle
Here is an IDL procedure. Using the literate programming tool,
sections can be defined elsewhere and will be embedded into the
output file.
\<dummy\><<<
pro dummy
;dummy IDL procdure
`<print`>
END
>>>
Here is the definition of the \verb|print| section.
\<print\><<<
print, '...'
>>>
Finally, we write the complete program.
\OutputCode[pro]\<dummy\>
\end{document}
--
George N. White III <gnw3@acm.org> Bedford Institute of Oceanography
|
|
|
|
Re: Source Code [message #35552 is a reply to message #25712] |
Fri, 20 June 2003 14:54  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
"Rick Towler" <rtowler@u.washington.edu> writes:
> "Kate" wrote in message...
>> I was wondering, what's the deal with getting the source code of IDL
>> library functions that aren't in the 'library' folder. I want to see
>> the source for QROMB but cant' find it, does this mean I'm not allowed
>> to look at it? or where do I look?
>
>
> QROMB is a "system function" which means it is written in C and no source
> code is available.
QROMB is also not a terribly flexible integrator because it is very
difficult to pass in arguments or keywords to the user function. I
think Kate has already found it, but it's worth mentioning the
QUADPACK integrator, which I have translated to IDL.
The IDL QPINT1D function has many of the QUADPACK integrators inside
of it. The source code is available; there are several ways to pass
arguments to the user function; there are several means of error
control; and improper integrals or integrands with singularities are
allowed.
Hope that helps!
Craig
P. S. http://cow.physics.wisc.edu/~craigm/idl/idl.html (under Mathematics)
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: Source Code [message #35558 is a reply to message #25712] |
Fri, 20 June 2003 11:14  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Kate" wrote in message...
> I was wondering, what's the deal with getting the source code of IDL
> library functions that aren't in the 'library' folder. I want to see
> the source for QROMB but cant' find it, does this mean I'm not allowed
> to look at it? or where do I look?
QROMB is a "system function" which means it is written in C and no source
code is available.
But, the docs state:
"QROMB is based on the routine qromb described in section 4.3 of Numerical
Recipes in C: The Art of Scientific Computing (Second Edition), published by
Cambridge University Press, and is used by permission."
I would check out http://www.nr.com/
-Rick
|
|
|
Re: Source Code [message #35561 is a reply to message #25712] |
Fri, 20 June 2003 10:52  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
The routine comes staight from the Numerical Recipes, which is also stated
in the help file.
Haje
"Kate" <faeriepunk@aol.com> wrote in message
news:c3c94d97.0306200929.2c655760@posting.google.com...
> I was wondering, what's the deal with getting the source code of IDL
> library functions that aren't in the 'library' folder. I want to see
> the source for QROMB but cant' find it, does this mean I'm not allowed
> to look at it? or where do I look?
>
> Kate Morgan
> Research Technician
> Dept. of Medical Imaging
> University of Toronto
|
|
|
Re: Source Code [message #35562 is a reply to message #25712] |
Fri, 20 June 2003 10:53  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
The functions that are not in the lib directory are c-code and contained in
the compiled libraries. Under windows this would be idl32.dll, but of course
this does not help much! :-)
Haje
"Kate" <faeriepunk@aol.com> wrote in message
news:c3c94d97.0306200929.2c655760@posting.google.com...
> I was wondering, what's the deal with getting the source code of IDL
> library functions that aren't in the 'library' folder. I want to see
> the source for QROMB but cant' find it, does this mean I'm not allowed
> to look at it? or where do I look?
>
> Kate Morgan
> Research Technician
> Dept. of Medical Imaging
> University of Toronto
|
|
|