It hasn't bothered me, but
If the name is unique enough it produces a short list of search results. In my case the page of interest is the top one. One extra click needed.
Next a one-liner, which opens the documentation home page in the help browser (using a bit of magic)
web('documentation_home_page.html','-new')
However, this must be hidden from the user in one way or another and still be easy to use. A favorite doesn't really provide much of an improvement.
/R2018b
In response to comment
The magic works better for me
>> web('m2umlToolbox.html', '-new')
produces this
opens the page shown above and
opens the expected Matlab page.
Listing of doc
function doc( varargin )
persistent mdc
if isempty( mdc )
wch = which('doc.m','-all');
isf = contains( wch, matlabroot );
wch = wch{isf};
pth = fileparts( wch );
old = cd( pth );
mdc = str2func('doc');
cd( old );
end
switch varargin{1}
case 'm2uml'
web('m2umlToolbox.html', '-new')
otherwise
mdc( varargin{:} )
end
end
Files and search path
I've used the word "magic" a couple of times to indicate that I don't understand how it works or what's required to make it work. I've stumbled upon one way that hasn't failed so far.
Important files, i.e files which I beleive are required
- ...\tbx\info.xml where tbx is on the search path. Used by Matlab to find the documentation (i.e. create some kind of database entry)
- ...\tbx\doc\helptoc.xml where doc is on the search path.
- ...\tbx\doc\*.html all the html-files
where info.xml (there must be exactly one info.xml with the name-tag-value m2uml)
<productinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="optional">
<?xml-stylesheet type="text/xsl"href="optional"?>
<!-- Copyright 2019 The MathWorks Ltd. -->
<matlabrelease>R2018b</matlabrelease>
<name>m2uml</name>
<type>toolbox</type>
<icon></icon>
<help_location>doc</help_location>
</productinfo>
and helptoc.xml
<?xml version='1.0' encoding="utf-8"?>
<toc version="2.0">
<tocitem target="m2umlToolbox.html"> m2uml Toolbox
<tocitem target="Overview.html"> Overview </tocitem>
<tocitem target="Installation.html"> Installation </tocitem>
<tocitem target="Limitations.html"> Limitations </tocitem>
<tocitem target="IntroductoryExamples.html"> Introductory examples </tocitem>
<tocitem target="Options.html"> Options </tocitem>
<tocitem target="UserInterface.html"> User interface </tocitem>
<tocitem target="Layout.html"> Layout </tocitem>
<tocitem target="Relationships.html"> Relationships </tocitem>
<tocitem target="ImageRow.html"> ImageRow </tocitem>
<tocitem target="Examples.html"> Examples </tocitem>
<tocitem target="TechnicalDocumentation.html"> Technical documentation </tocitem>
</tocitem>
</toc>
It seems, it doesn't matter which html-file (in the folder, doc) I open
>> web('ImageRow.html','-new')
works as I have come to expect (i.e. navigation panel to the left).
Best Answer