PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?SmFzb24uUy5MZWlnaA==?=
Guest
Posts: n/a
 
      21st Jul 2006
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
 
 
 
 
Trevor L.
Guest
Posts: n/a
 
      22nd Jul 2006
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
 
Steve Easton
Guest
Posts: n/a
 
      22nd Jul 2006
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" <(E-Mail Removed)> wrote in message
news:A8307272-54B2-4010-9559-(E-Mail Removed)...
>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
 
=?Utf-8?B?SmFzb24uUy5MZWlnaA==?=
Guest
Posts: n/a
 
      8th Aug 2006
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" <(E-Mail Removed)> wrote in message
> news:A8307272-54B2-4010-9559-(E-Mail Removed)...
> >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
 
Thomas A. Rowe
Guest
Posts: n/a
 
      8th Aug 2006
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" <(E-Mail Removed)> wrote in message
news3CB4C4B-02D2-427D-8684-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:A8307272-54B2-4010-9559-(E-Mail Removed)...
>> >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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help and Find in IE display source code =?Utf-8?B?VG1pYmVy?= Windows XP Internet Explorer 1 26th Apr 2006 11:19 PM
Codase - a syntax-aware source code search engine =?Utf-8?B?SHVpaG9uZw==?= Microsoft VC .NET 0 10th Sep 2005 12:27 AM
Codase - syntax aware source code search engine =?Utf-8?B?SHVpaG9uZw==?= Microsoft Dot NET 0 9th Sep 2005 05:09 PM
Field control source - code syntax error rob mccoy via AccessMonster.com Microsoft Access Form Coding 1 14th Jan 2005 08:42 AM
HELP!: Some web pages display as source code JC Windows XP Internet Explorer 0 21st Apr 2004 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:40 PM.