comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier Write-only <gautier@somewhere.nil>
Subject: Re: Ada2latex Converter available?
Date: Wed, 04 Jun 2003 20:59:45 +0200
Date: 2003-06-04T20:59:45+02:00	[thread overview]
Message-ID: <3EDE41A1.7578080D@somewhere.nil> (raw)
In-Reply-To: 3EDDDFBA.644E991@konad.de

Frank Piron:

> is there a free Ada2latex - Converter available like Ada2html?

You mean for "pretty-printing" or really convert your Ada program in
TeX code ?

For the first purpose you don't need a converter, there is
listings.sty whose \lstinputlisting command reads your sources
and includes it with a nice formatting. There is also an escape
character you can define for putting LaTeX parts among your Ada comments
(formulas, \cite, \ref, hyperlinks,...).

All you need is (after downloading listings at CTAN):
\usepackage{listings}
\lstloadlanguages{Ada}
\lstset{language=Ada}
% Example:
\def\adalist#1{
 {\sf % Standard TeX Helvetica
  {\footnotesize
   \lstinputlisting[stringspaces=false, commentstyle=\sl, %
   escapechar=`, mathescape=true]{#1}
  }
 }
}
...
\adalist{source.ads}
\adalist{source.adb}
...

Example of "escape"-ism in the Ada code:

 if eq=trans then       -- Modification de la fonction-test de base $\psi_i$
   case meth_trans is

     when Streamline => -- `formule (\ref{psistreamline})`
       psi_i_corr:= psi(i) + delt1 * stream_psi(i);

HTH
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



  parent reply	other threads:[~2003-06-04 18:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-04 12:02 Ada2latex Converter available? Frank Piron
2003-06-04 11:28 ` Preben Randhol
2003-06-06  9:53   ` Frank Piron
2003-06-06 10:25     ` Preben Randhol
2003-06-13 12:51       ` Frank Piron
2003-06-13 12:44         ` Preben Randhol
2003-06-04 15:41 ` Mário Amado Alves
2003-06-04 18:46 ` Luke A. Guest
2003-06-06  9:25   ` Frank Piron
2003-06-04 18:59 ` Gautier Write-only [this message]
2003-06-06  9:28   ` Frank Piron
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox