- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something for the suggestion box: I think it would be great if the Fortran code snippets in the HTML documentation were syntax highlighted. I've gotten to the point where I can't look at non-syntax highlighted code without my eyes bleeding. :)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestion - I'll pass it on. I don't think I've seen a single syntax highlighter that works well enough for Fortran to deal with this, though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The new syntax-highlighted documentation looks great! Now they just need to fix the display of comment lines. Example here: https://software.intel.com/en-us/node/679950
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see they are using the same (or similar) highlighter used in the forum. It doesn't understand submodule and other new constructs. My guess is that the documentation team made a deliberate choice not to color comment lines, but I will ask.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another related problem: English words such as "not" and "real" that are part of a line-end comment or comment line are highlighted as if they were operators and keywords. See, for example, the 140-line example code at https://software.intel.com/en-us/node/679950 .
I often have a hard time distinguishing extensions to Fortran from Standard Fortran because, with background shading, slight differences in the darkness of gray text is not enough to tell them apart: for example, look for "This color" in the third table of https://software.intel.com/en-us/node/677893 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was not aware that extensions were shaded in such a difficult to distinguish color. I will ask the documentation people to work on that.
The syntax highlighter is fairly stupid - it doesn't know to not highlight things in comments. I'll see what can be done about that. The doc folk told me what they are using and I enhanced it to understand F2008 keywords and also changed the comment color. If you want to try it, unzip the attached to
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\documentation\en\compiler_f\common\core\resources\prism
and then browse the on-disk documentation.
Let me know what you think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
the syntax highlighting is great. Many thanks to the team!
The online version looks very nice with the above mentioned minor issues. The offline local help version could be better. However, the modified version is much better than the original one. I read through the lines of the css and js files and it seems to be quite easy to adjust colors to my own like. I made the comment's green darker to increase the contrast and changed string/char to look more like the VS standard highlighting (dark red in my case).
If somebody like to change colors, my way I did it:
- Find the 'keyword' for '*'-symbol in the prism.js -> operator.
- In the prism.css you will find 'token.operator'.
- From other token entities you can copy and change color and font adjustments
e.g. for black bold operators
.token.operator{ color: #000000; font-weight: bold; },
Line numbers in the offline-docu would also be great. I don't understand how it works, but maybe the development team can add it (http://prismjs.com/plugins/line-numbers/). In my opinion, it would be less confusing, if the online and offline docu syntax highlighting would look more similar.
Are there plans to add syntax highlighting for the PDF version too?
Best regards, Johannes
ps: I attached my changes, if anybody likes to test them...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will make the suggestions to add line numbers. Do keep in mind that any changes you make to the prismjs scripts will be overwritten on the next install. I'll also pass on the suggestions for the PDF version, though I am unsure if that would be as simple.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
many thanks for the very fast update. :-)
I tested the new version (exchanged prism.css and prism.js), but unfortunately line numbering seems not to to work on my computer (IE11 or FF49 on Win7 x64, no script blocker). The additional code lines within prism.js imply that it should work. Are there any additional settings necessary or do I have to update more files?
Best regards, Johannes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - simply adding the plugin to the js is not sufficient - the HTML needs to have the line-number class added to any pre tags. I stuck it in there as I gave this version to our doc people in case they wanted to use it, but I'm guessing that they won't as line numbers would just clutter most of the examples and reduce available width.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page