Custom HTML header & Parameter name ...

Miran B
  • Miran B

    Miran B - 2011-04-26


    I have two questions related to customizing NaturalDocs. They seem pretty
    simple but I couldn't find any documentation on whether they're supported.

    1) Is it possible to insert custom code into the HTML header?

    2) Is it possible to use a different delimiter than " - " (I assume) for
    separating the name of a function parameter from its definition?

    I ran into these issues while trying to make NaturalDocs work with XPPAUT, a
    tool for running dynamic mathematical models. XPPAUT syntax is pretty basic so
    I managed to insert documentation into its source files simply enough, and I
    must say you folks did a fantastic job in making a tool that can be adapted
    easily to new formats. However, I would like to include some math in the
    documentation. The two above bits of flexibility would, in combination, make
    it possible to put LaTeX or MathML formulas straight into the source and
    display them in HTML with MathJax. Please tell me it can be done :)

    Thank you!


  • Greg Valure

    Greg Valure - 2011-04-26

    1) If you mean inserting something static into every HTML file ("header"
    meaning HTML's head tag) edit \Modules\NaturalDocs\Builder\ or The BuildFile functions generate the page frames and you can do
    something like add a reference to another JavaScript file there. It should be
    easy to figure out even if you don't know Perl.

    If you mean inserting arbitrary HTML code into a comment and having it show up
    properly in the output, that's not supported or easily hacked in, but it's on
    the short list for possible new features in 1.x.

    2) Edit \Modules\NaturalDocs\Parser\ and search for "# If the line
    looks like a description list entry...". The next line has the regular
    expression that handles detecting definition list lines.

    If you edit Natural Docs' source code for 1 or 2, you need to rebuild all your
    documentation by running it with -r afterwards. Otherwise the changes won't
    apply everywhere as Natural Docs normally builds differentially.


Log in to post a comment.