Copy link to clipboard
Copied
In my company's Programmer Guide we want to give syntax examples in several programming languages.
Ideally, we'd like to have on each relevant page a small "window" with tabs for each language (which when clicked display the proper syntax for the clicked-upon language)-similar to MSDN (http://msdn.microsoft.com/en-us/library/dd483660.aspx)
Can this be done in RoboHelp 8?
TIA.
Copy link to clipboard
Copied
Hi,
It can be done, but takes some effort (ie handwork):
- You need to script the tabs.
- If needed, you need to add a script for syntax highlighting, unless you want to do that by hand.
The syntax highlighting is easy, I use: http://alexgorbatchev.com/SyntaxHighlighter/. In RoboHelp add a <pre> tag with the appropriate class and load the correct JavaScript. <pre class="brush: csharp"></pre> Will apply the highlight for C# between the pre tags.
As for the tabs, there are several ways you can do this. Look at http://www.alistapart.com/articles/slidingdoors/. With a little effort, you can make these behave the way you want. Also, you may want to check out http://jqueryui.com/demos/tabs/. I've never tried adding jquery to RoboHelp output, but it may work.
Greet,
Willam