Probably the most notable additions to Quanta Plus for the general user will be the addition of documentation for the markup or scripting language that you like best. To that end, this chapter will explain how I create the PHP documentation tree for my personal use.
Before starting on creating your own documentation, you may wish to check out the Quanta Plus repository to see if someone else has already done this set.
There are two parts to this process. First, you must obtain the existing
documentation for the markup/scripting/etc. language that you are after.
Second, you have to create the docrc
file. The first
is up to you, the second is what we will cover here.
The general form of the docrc file is as follows:
#KDE Config File
[Tree]
Doc dir=path, relative to this file, of the documentation html files
for example, php42/
#top level elements
Top Element=Your description for these documentation
for example, PHP 4.2 documentation
Section 1=Section1.html
Section 2=#Sec2.1,#Sec2.2,#Sec2.3
Sec2.1=Sec2.1.html
Sec2.2=Sec2.2.html
Sec2.3=Sec2.3.html
...
[Context]
ContextList=func1,func2,tag1,tag2,tag3
func1=func1.html
func2=func2.html
tag1=tag1.html
tag2=tag2.html
tag3=tag3.html
The docrc
is broken down into two sections: Tree and
Context.
The Tree section defines the presentation aspect of the documentation in the documentation tab. For example, you will see that in the PHP documentation you have something akin to this:
Relating this to the above, my PHP docrc
looks like
this:
#KDE Config File [Tree] Doc dir=php42/ #top level elements Top Element=PHP 4.2 documentation PHP 4.2 documentation=Table of Contents,#Getting Started,#Language Reference Table of Contents=index.html Getting Started=Introduction, ... Introduction=introduction.html ... Language Reference=Basic syntax, ... Basic syntax=language.basic-syntax.html ...
Notice the #
in front of “Getting Started”
and “Language Reference”. This indicates that these are sub
containers in the tree and have content of their own. I do not believe that
there is a set limit to the depth here (other than that driven by sanity)
— use your judgment.
For the Table of Contents, you will notice that it is referenced directly to a file (and consequently shows up at the bottom of the tree view — folders first!).
Spaces do not adversely affect anything, but watch out for & and < characters. These should likely be replaced by & and < respectively in all of the XML based Quanta Plus resource files.
The Context section is the section of the docrc file that is used to
facilitate context sensitive help. For example, you are writing a PHP
script and you would like to see the documentation for the
mysql_fetch_array
function. You simply highlight the
function and then press Ctrl+H for context help. The documentation on
mysql_fetch_array
will immediately display. There are
only two entry types here: the ContextList and the file association lines.
Really simple, this is just a comma separated list of the context items you wish to have available (for PHP, these are the functions for PHP).
These are of the form context item=html doc page. for example, acos=function.acos.html
A pared down version of my docrc
Context section is
as follows:
#Keywords for context help [Context] ContextList=abs,acos,acosh,addcslashes,addslashes,... abs=function.abs.html acos=function.acos.html acosh=function.acosh.html addcslashes=function.addcslashes.html addslashes=function.addslashes.html ...
Now you can just save your docrc
file, save it in
$
or HOME
/.trinity/share/apps/quanta/doc$
for local or global use respectively. Then create a folder (the one
specified in your TDEDIR
/share/apps/quanta/docdocrc
file) in the same folder
as your docrc
file and copy your HTML pages in
there.
You will need to restart Quanta Plus to see your documentation.
Once you are sure that they are good and worth sharing, send the
docrc
file along with a description of any pertinent
information on what documentation you used to the
Quanta Plus
repository for use by the Quanta Plus community. You will not get
rich, but you will feel great knowing that you contributed to the best web
development platform around.
Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team