• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Tweaking a compilation

New Here ,
Jan 11, 2007 Jan 11, 2007

Copy link to clipboard

Copied

Hi,

I have recently used RoboHelp to convert an existing WinHelp project to HTML Help with very good results.
Upon review by some of our developers, several noted that the code examples generated may look OK, but there are a few quirks when copy and pasting this text into a code editor.

The best bet would be to look at a specfic example. Here is a link to the online help generated by the RoboHelp Compiler:
http://www.dbase.com/help/Plus-en.htm

- Click on Index and search for FINDINSTANCE()
- Select it and click on the Example link at the top of the topic

This produces a code sample for this function. If you copy and paste this text into the code editor, there are blank lines between each line of code and the indentation is lost. Originally, I was thinking this was no big deal for an online help system. However, this HTML Help system will eventually be included with the software, so the ability to copy and paste code from examples into the code editor is fairly important.

I am trying to figure out my options for resolving this issue. I looked at the generated HTML and it looked like this:
================================================================================================
<P class="Banner-Base" >FINDINSTANCE( ) example</P> <P class="Base" >The first example checks if there is already an instance of the EditToolbar class. If not, one is created.</P> <P class="Code1" >function attachEditToolbar(formObj)</P> <P class="CodeNext" style="margin-top:0;margin-bottom:0"> local t </P> <P class="CodeNext" style="margin-top:0;margin-bottom:0"> t = findinstance(&quot;EditToolbar&quot;) </P>
<P class="CodeNext" style="margin-top:0;margin-bottom:0"> if empty(t) // If null, no instance exists, so </P>
<P class="CodeNext" style="margin-top:0;margin-bottom:0"> t = new EditToolbar() // Create one (defined in this file) </P>
<P class="CodeNext" style="margin-top:0;margin-bottom:0"> set procedure to program(1) additive // Load this file as procedure file </P>
<P class="CodeNext" style="margin-top:0;margin-bottom:0"> endif </P> <P class="CodeNext" style="margin-top:0;margin-bottom:0"> t.attach(formObj) </P>
=================================================================================================

I see how each line is embedded in a <P> tag with two associated styles "Code1" and "CodeNext". The font is OK, and the only difference aI could find was that lines marked with "CodeNext" were indented further than the first line ("Code1").

I'm guessing that the <P> tags are whats causing the spaces between lines of code when pasted into the editor.

I am trying to figure out the best way to "fix" this. This is a very large Help file, so manual tweaking would take forever.

Should I:

- Do a global search/replace for a common formatting string within the original help document before running the compiler
- Alter settings on the HTML Help compiler to produce the desired result
- Attempt to search/replace text across the compiled HTML output

I would be open to any ideas on how to tackle this issue.

Thanks in advance,

-Ben

Views

201

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2007 Jan 11, 2007

Copy link to clipboard

Copied

LATEST
Welcome to the forum.

Take a look at this page on my site and note the field that you can click in to copy text.

http://www.grainge.org/pages/authoring/twisty/twisty.htm

Use View Code to see how that has been set up. I think that will work better for you as the users will find it much easier than selecting text.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp