comp.lang.ada
 help / color / mirror / Atom feed
From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Subject: Re: Regex and/or LaTeX
Date: 24 Feb 2001 15:36:34 GMT
Date: 2001-02-24T15:36:34+00:00	[thread overview]
Message-ID: <978ke2$4pi$2@drcomp.erfurt.thur.de> (raw)
In-Reply-To: 1sFl6.2330$mX4.169381@bgtnsc06-news.ops.worldnet.att.net

Rajagopalan Srinivasan <r.srinivasan@worldnet.att.net> wrote:

> gnat.regexp

Yeah, thank you, that's fine. I guess I'll use it in some projects.
Actually I don't want to limit my program to a special compiler,
so I implemented the desired functionality in this way:

        procedure texstring (ausdruck : in out ustring)
        is
                tmp : string := To_string(ausdruck);
                hs : ustring := To_Ustring("");
        begin
                ausdruck := To_ustring("");
                for I in tmp'range loop
                        case tmp(I) is
                                when '&' => hs := To_Ustring("\&");
                                when '%' => hs := To_Ustring("\%");
                                when others => hs := To_Ustring(tmp(I) & "");
                        end case;
                        ausdruck := ausdruck & hs;
                end loop;
        end texstring;

Perhaps I need to extend this for other LaTeX-symbols. For now, it works well.



-- 
mail: adi@thur.de  	http://adi.thur.de	PGP: v2-key via keyserver

Alle schimpfen �ber den Bundeskanzler. Dabei tut er doch gar nichts.



  reply	other threads:[~2001-02-24 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-22 11:01 Regex and/or LaTeX Adrian Knoth
2001-02-23  8:13 ` Lutz Donnerhacke
2001-02-23  9:41 ` Florian Weimer
2001-02-24  2:59 ` Rajagopalan Srinivasan
2001-02-24 15:36   ` Adrian Knoth [this message]
2001-02-26 11:41     ` Lutz Donnerhacke
2001-02-26 11:48     ` Lutz Donnerhacke
2001-02-26 20:15       ` Jeffrey Carter
replies disabled

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