include link to text file

Support
arbverse
2013-03-01
2013-03-03
  • arbverse

    arbverse - 2013-03-01

    I would like to know if there's a way to include a relative link to a local text file using Natural Docs. Ideally I'd like to add simple documentation like the e-mail or website link syntax that would generate a link to a local file instead of a website.

    Thanks for the help!

     
  • Greg Valure

    Greg Valure - 2013-03-03

    You can try doing it with file:/// URLs but I don't think it will be reliable. By default Firefox blocks sites from opening files this way, I don't know about other browsers.

    The other option would be to add it to the documentation instead. If you start the file with "Title: Something" and it has a .txt extension Natural Docs will interpret its contents the same as if it was a comment in the source code. If you look at License.txt included with Natural Docs that's done this way.

     
  • arbverse

    arbverse - 2013-03-03

    Thanks for the tip- I see what you mean with the License.txt file. Maybe I could make that work for documentation purposes by changing the extensions of the files I'm trying to reference (they are not .txt by default but they are ascii).

    I was hoping there was a way to use the simple html anchor link style like:
    test link to text_docs/doc1 document
    since I know the final directory structure in advance. I've proven a test simple test case that works when the html file is in the same directory as the text_docs folder (firefox 18). However, I can't seem to figure out a syntax that will work with NaturalDocs to register the name as a relative link - I always end up with <text_docs doc1=""> in brackets without any link.

    Thanks again for your suggestion! If you happen to think of a way to link like I mentioned above I'll be happy to use it. In the mean time I'll see if I can make the text document idea work.

     
  • arbverse

    arbverse - 2013-03-03

    Sorry - the syntax didn't show up for the link:
    \<a href=text_docs/doc1.txt> test link to text_docs/doc1 document \</a>
    without the \s is the syntax I used in the test html document.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks