PC Review Forums Newsgroups Microsoft Word Microsoft Frontpage How do I display syntax hightlighted FORTRAN/C++ source code?

Reply

How do I display syntax hightlighted FORTRAN/C++ source code?

 
Thread Tools Rate Thread
Old 21-07-2006, 03:18 PM   #1
=?Utf-8?B?SmFzb24uUy5MZWlnaA==?=
Guest
 
Posts: n/a
Default How do I display syntax hightlighted FORTRAN/C++ source code?


I have a project with many FORTRAN and C++ source files, and would like to
display the source code on my web page and if possible have the code syntax
highlighted.
  Reply With Quote
Old 22-07-2006, 12:23 AM   #2
Trevor L.
Guest
 
Posts: n/a
Default Re: How do I display syntax hightlighted FORTRAN/C++ source code?

Jason.S.Leigh wrote:
> I have a project with many FORTRAN and C++ source files, and would
> like to display the source code on my web page and if possible have
> the code syntax highlighted.

http://www.scit.wlv.ac.uk/encyc/code.html
suggests use of the <code> tag

If you don't like the default font or background, you can always add a style for <code> in the <head> section
e.g.
<style type="text.css">
code {font: arial, helvetica, sans-serif; background-color: aqua;}
</style>

--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


  Reply With Quote
Old 22-07-2006, 12:48 AM   #3
Steve Easton
Guest
 
Posts: n/a
Default Re: How do I display syntax hightlighted FORTRAN/C++ source code?

If you mean simply highlight the code part you can do it with CSS.
If you mean you want to display the color coded text as seen in the IDE,
take screenshots of the code you want to display and then use the images.


--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm


"Jason.S.Leigh" <Jason.S.Leigh@discussions.microsoft.com> wrote in message
news:A8307272-54B2-4010-9559-4450BB45D297@microsoft.com...
>I have a project with many FORTRAN and C++ source files, and would like to
> display the source code on my web page and if possible have the code syntax
> highlighted.



  Reply With Quote
Old 08-08-2006, 07:53 PM   #4
=?Utf-8?B?SmFzb24uUy5MZWlnaA==?=
Guest
 
Posts: n/a
Default Re: How do I display syntax hightlighted FORTRAN/C++ source code?

Here is what I've done, I created a web page with a bulleted list of the
FORTRAN and C++ source files I have in a directory, and each bulleted item
has a hyperlink to an .htm file where I wrapped the source code with the
<PRE> tag targetted to an inline frame, so I can scroll through the code.

The problem is that I have many files and I don't want to have to create an
..htm file for every source file and just wrap a <PRE> tag around it. I've
tried hyperlinking directly to the source file, but it opens an "Open/Save"
dialog box, which is no good because ultimately the web pages will be
compiled into a .chm HTML Help File.

What I would like to do is to be able to link directly to the FORTRAN or C++
source file and have it displayed inside a scrollable frame, preferrably with
syntax highlighting, without having to create an .htm file for each source
file.

Jason Leigh

"Steve Easton" wrote:

> If you mean simply highlight the code part you can do it with CSS.
> If you mean you want to display the color coded text as seen in the IDE,
> take screenshots of the code you want to display and then use the images.
>
>
> --
> Steve Easton
> Microsoft MVP FrontPage
> FP Cleaner
> http://www.95isalive.com/fixes/fpclean.htm
> Hit Me FP
> http://www.95isalive.com/fixes/HitMeFP.htm
>
>
> "Jason.S.Leigh" <Jason.S.Leigh@discussions.microsoft.com> wrote in message
> news:A8307272-54B2-4010-9559-4450BB45D297@microsoft.com...
> >I have a project with many FORTRAN and C++ source files, and would like to
> > display the source code on my web page and if possible have the code syntax
> > highlighted.

>
>
>

  Reply With Quote
Old 08-08-2006, 10:20 PM   #5
Thomas A. Rowe
Guest
 
Posts: n/a
Default Re: How do I display syntax hightlighted FORTRAN/C++ source code?

Not possible to do as you want, you have to create the HTML page and format it for each file.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================


"Jason.S.Leigh" <JasonSLeigh@discussions.microsoft.com> wrote in message
news3CB4C4B-02D2-427D-8684-5177EF2F140F@microsoft.com...
> Here is what I've done, I created a web page with a bulleted list of the
> FORTRAN and C++ source files I have in a directory, and each bulleted item
> has a hyperlink to an .htm file where I wrapped the source code with the
> <PRE> tag targetted to an inline frame, so I can scroll through the code.
>
> The problem is that I have many files and I don't want to have to create an
> .htm file for every source file and just wrap a <PRE> tag around it. I've
> tried hyperlinking directly to the source file, but it opens an "Open/Save"
> dialog box, which is no good because ultimately the web pages will be
> compiled into a .chm HTML Help File.
>
> What I would like to do is to be able to link directly to the FORTRAN or C++
> source file and have it displayed inside a scrollable frame, preferrably with
> syntax highlighting, without having to create an .htm file for each source
> file.
>
> Jason Leigh
>
> "Steve Easton" wrote:
>
>> If you mean simply highlight the code part you can do it with CSS.
>> If you mean you want to display the color coded text as seen in the IDE,
>> take screenshots of the code you want to display and then use the images.
>>
>>
>> --
>> Steve Easton
>> Microsoft MVP FrontPage
>> FP Cleaner
>> http://www.95isalive.com/fixes/fpclean.htm
>> Hit Me FP
>> http://www.95isalive.com/fixes/HitMeFP.htm
>>
>>
>> "Jason.S.Leigh" <Jason.S.Leigh@discussions.microsoft.com> wrote in message
>> news:A8307272-54B2-4010-9559-4450BB45D297@microsoft.com...
>> >I have a project with many FORTRAN and C++ source files, and would like to
>> > display the source code on my web page and if possible have the code syntax
>> > highlighted.

>>
>>
>>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off