Syntax for e-book topic plus anchor

Discussions about Help+Manual 9

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Erik
Posts: 17
Joined: Tue Mar 07, 2006 9:52 pm

Syntax for e-book topic plus anchor

Unread post by Erik »

In previous releases the syntax for starting an e-Book with a topic page and anchor was

MyEbook.exe "mytopic.htm#myanchor"

but that now gets me an error popup that says

Cannot open "mytopic.htm#myanchor"!
File not found.

If I do not include the anchor, e.g.

MyEbook.exe "mytopic.htm"

it works fine and opens the e-reader on the specified page. Is there new syntax for the anchor specification. Using a derivative of one of the Premium skins, but the same skin worked in H&M 8. Thanks!
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Syntax for e-book topic plus anchor

Unread post by Tim Green »

Using a derivative of one of the Premium skins, but the same skin worked in H&M 8.
Try both of the following:

Code: Select all

mytopic.htm?anchor=myanchor
mytopic.html?anchor=myanchor
Also make sure that you are using the current version of Help+Manual 9 (9.1.0 Build 6440). The earlier versions that included the new eViewer application didn't support the old eWriter calling syntax. The new syntax is:

Code: Select all

"<path>eViewer.exe" "<path>ewriter://myfile.ewriter?loadpage=mytopic.html?anchor=myanchor"
The double use of the ? character is OK here because the viewer parses it out into two references. See this page in the help for details:

https://www.helpandmanual.com/help/hm_p ... tions.html
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Erik
Posts: 17
Joined: Tue Mar 07, 2006 9:52 pm

Re: Syntax for e-book topic plus anchor

Unread post by Erik »

Thanks Tim. The full "ewriter://myprog.exe...." syntax works as long as I specify the anchor using the "...#myanchor" syntax not the "...?anchor=myanchor" syntax.Almost works. The correct page displays and the anchored section is scrolled into view ever so briefly, then the page immediately scrolls back to the top. Any idea what that is? Thanks!
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Syntax for e-book topic plus anchor

Unread post by Tim Green »

Erik wrote: Thu May 11, 2023 10:33 pm The correct page displays and the anchored section is scrolled into view ever so briefly, then the page immediately scrolls back to the top. Any idea what that is? Thanks!
What versions of Help+Manual and the Premium Pack are you using? Check the Help+Manual version with Help > About, and the Premium Pack version in the title bar of the Toolbox utility.

Also, you say you are using a modified Premium Pack skin. Please try with an unmodified skin. It is possible that you have made a change that is actually causing this problem. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Erik
Posts: 17
Joined: Tue Mar 07, 2006 9:52 pm

Re: Syntax for e-book topic plus anchor

Unread post by Erik »

Thank Tim. I rebuilt using a stock unmodified skin (V5_MinimalModern_BlueDiamond_eWriter.hmskin) and get the same effect: the eviewer navigates to the correct page and then briefly scrolls to the anchor point before scrolling back to the top of the page.

H&M Version: V9.1.0, Build 6440
Premium Pack Version: V5.0.1
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Syntax for e-book topic plus anchor

Unread post by Tim Green »

Hi Erik,

Your Premium Pack is out of date. The current version is 5.0.4, so please do although I don't think that is the cause here. I just noticed that you are still using the EXE version of eWriter Help, which is not recommended. However, if you do, you need to have the file call itself, rather than eViewer.exe, like this:

Code: Select all

test.exe "ewriter://test.exe?loadpage=topicid.html?anchor=anchorname"
I just tested this with the skin you are using and it is working correctly. If you continue to have problems using this syntax and the 5.0.4 version of the skin, please send a small demo project to support AT ec-software.com (replace the AT with @) so that I can check it directly.

Note that if you use eViewer.exe and an *.ewriter file, the response will also be a lot faster:

Code: Select all

"<path>eViewer.exe" "ewriter://test.ewriter?loadpage=topicid.html?anchor=anchorname"
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim Frost
Posts: 319
Joined: Mon Nov 22, 2004 11:45 pm

Re: Syntax for e-book topic plus anchor

Unread post by Tim Frost »

Can you please explain the benefit of preceding the e-book pathname with "ewriter://"? The ewriter documentation seems to include this in examples, but your sample Vcl.EwriterHelpViewer.pas (which I use, modified for our exe name) does not. The two command line parameters for our renamed eviewer.exe are simply the double-quoted help file path name (v5 skin, with a custom extension) and the context ID number. We do not use topic names or anchor names when calling ewriter help from an application. It seems to work well now; would it be more reliable, or faster, with an "ewriter://" prefix?
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Syntax for e-book topic plus anchor

Unread post by Tim Green »

Hi Tim,
Can you please explain the benefit of preceding the e-book pathname with "ewriter://"?
This was necessary for the MacOS version, because MacOS requires an explicit protocol for things like this. We decided to make it consistent across both versions so that you don't need to deal with two sets of syntaxes. The old syntax is still supported, so you can continue to use that.

What is definitely faster is using the external eViewer program rather than the EXE help files. The EXE file needs to call itself when you access it with a link, and that takes additional time.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply