<!-- saved from url=(0026)http://www.naturaldocs.org -->
<tablewidth=100%border=0cellspacing=0cellpadding=0><tr><tdcolspan=3class=Header><tablewidth=100%border=0cellspacing=0cellpadding=0><tr><td><imgsrc="images/header/leftside.png"width=30height=75><ahref="index.html"><imgsrc="images/header/logo.png"width=524height=75alt="Natural Docs"></a></td><tdalign=right><imgsrc="images/header/rightside.png"width=30height=75></td></tr></table></td></tr><tr><td><imgsrc="images/header/overleftmargin.png"width=10height=6></td><tdclass=SideMenuTop><imgsrc="images/header/overmenu.png"width=14height=6></td><tdclass=BodyTop><imgsrc="images/header/overbody.png"width=24height=6></td></tr><tr><td></td><tdclass=SideMenunowrap><divclass=SideMenuSection><divclass=SideMenuTitle><imgsrc="images/menu/about.png"width=52height=13alt="About"></div><divclass=SideMenuBody><ahref="languages.html"class=SideMenuEntry>Language Support</a><ahref="output.html"class=SideMenuEntry>Output Formats</a></div></div><divclass=SideMenuSection><divclass=SideMenuTitle><imgsrc="images/menu/using.png"width=45height=13alt="Using"></div><divclass=SideMenuBody><ahref="documenting.html"class=SideMenuEntry>Documenting<br>Your Code</a><ahref="keywords.html"class=SideMenuEntry>Keywords</a><spanclass=SideMenuEntryid=SelectedSideMenuEntry>Running</span><ahref="troubleshooting.html"class=SideMenuEntry>Troubleshooting</a></div></div><divclass=SideMenuSection><divclass=SideMenuTitle><imgsrc="images/menu/customizing.png"width=96height=13alt="Customizing"></div><divclass=SideMenuBody><ahref="menu.html"class=SideMenuEntry>Organizing the Menu</a><ahref="styles.html"class=SideMenuEntry>CSS Styles</a><ahref="customizingtopics.html"class=SideMenuEntry>Topics and Keywords</a><ahref="customizinglanguages.html"class=SideMenuEntry>Languages, Indexes,<br>and Prototypes</a></div></div><divclass=SideMenuSection><divclass=SideMenuTitle><imgsrc="images/menu/community.png"width=86height=13alt="Community"></div><divclass=SideMenuBody><ahref="http://www.naturaldocs.org/"class=SideMenuEntry>Web Site</a><ahref="http://www.naturaldocs.org/mailinglist.html"class=SideMenuEntry>Mailing Lists</a><ahref="http://www.naturaldocs.org/messageboards.html"class=SideMenuEntry>Message Boards</a><ahref="http://www.naturaldocs.org/bugs.html"class=SideMenuEntry>Bugs and<br>Feature Requests</a></div></div></td><tdclass=Bodywidth=100%><divclass=PageTitle>Running Natural Docs</div><divclass=TOC><ahref="#HowAndWhen">How and When</a>·<ahref="#CommandLine">Command Line</a>·<ahref="#Example">Examples</a></div></div><divclass=Topic><aname=HowAndWhen></a> <divclass=TopicTitle>How and When</div><p>Probably the best way to run Natural Docs is as part of the build process. This way every time you compile your code, your documentation is updated as well and you always have a current reference. Natural Docs has a differential build process so it will not rebuild the entire set of documentation every time it’s run.</p><p>If you’d like to run it manually instead, you should determine the command line you need and save it as a shortcut, batch file, or script since you should be running it often and will rarely need to fiddle with the parameters.</p><p></p></div><divclass=Topic><aname=CommandLine></a><divclass=TopicTitle>Command Line</div><pre>NaturalDocs -i [input (source) directory]
-o [output format] [output directory]
-p [project directory]
[options]</pre><tableclass=OptionTableborder=0cellspacing=0cellpadding=0><tr><tdcolspan=2class="First ParameterGroup">Required Parameters:</td></tr><tr><tdclass=Option>-i <i>[dir]</i><br>--input <i>[dir]</i><br>--source <i>[dir]</i></td><tdclass=Description><p>The input (source) directory. Natural Docs will build the documentation from the files in this directory and all its subdirectories. You can specify it multiple times to include multiple directories. <ahref="languages.html">See the list of supported programming languages.</a></p></tr><tr><tdclass=Option>-o <i>[fmt] [dir]</i><br>--output <i>[fmt] [dir]</i></td><tdclass=Description><p>The output format and directory. This can also be specified multiple times, so you can build the documentation in multiple formats in a single run. <ahref="output.html">See the list of supported output formats.</a></p></td></tr><tr><tdclass=Option>-p <i>[dir]</i><br>--project <i>[dir]</i></td><tdclass=Description><p>The project directory. Natural Docs needs a place to store configuration and data files for each project it’s run on, so this is where it will put them. No two projects should share the same directory.</p></td></tr><tr><tdcolspan=2class=ParameterGroup>Optional Parameters:</td></tr><tr><tdclass=Option>-xi <i>[dir]</i><br>--exclude-input <i>[dir]</i><br>--exclude-source <i>[dir]</i></td><tdclass=Description><p>Excludes a subdirectory from being scanned. The output and project directories are automatically excluded.</p></td></tr><tr><tdclass=Option>-img <i>[dir]</i><br>--images <i>[dir]</i></td><tdclass=Description><p>Adds a directory to search for image files when using <ahref="documenting/reference.html#Images"><code>(see <i>[file]</i>)</code></a>.</p></td></tr><tr><tdclass=Option>-s <i>[style] (<i>[style]</i> ...)</i><br>--style <i>[style]</i> (<i>[style]</i> ...)</td><tdclass=Description><p>Selects the CSS style for HTML output. <ahref="styles.html">See the default list of styles.</a></p><p>You can use any CSS file in your project directory or Natural Docs’ Styles directory just by using its name without the .css extension. If you include more than one, they will all be included in the HTML that order.</p></td></tr><tr><tdclass=Option>-r<br>--rebuild</td><tdclass=Description><p>Rebuilds everything from scratch. All source files will be rescanned and all output files will be rebuilt</p></td></tr><tr><tdclass=Option>-ro<br>--rebuild-output</td><tdclass=Description><p>Rebuilds all output files from scratch.</p></td></tr><tr><tdclass=Option>-t <i>[len]</i><br>--tab-length <i>[len]</i></td><tdclass=Description><p>Sets the number of spaces tabs should be expanded to. This only needs to be set if you use tabs in example code or text diagrams. The default is 4.</p></td></tr><tr><tdclass=Option>-do<br>--documented-only</td><tdclass=Description><p>Tells Natural Docs to only include what you explicitly document in the output, and not to find undocumented classes, functions, and variables. This option is only relevant if you have <ahref="languages.html">full language support</a>.</p></td></tr><tr><tdclass=Option>-oft<br>--only-file-titles</td><tdclass=Description><p>Tells Natural Docs to only use the file name for its menu and page titles. It won’t try to determine one from the contents of the file.</p></td></tr><tr><tdclass=Option>-nag<br>--no-auto-group</td><tdclass=Description><p>Tells Natural Docs to not automatically create group topics if you don’t add them yourself.</p></td></tr><tr><tdclass=Option>-cs <i>[charset]</i><br>--charset <i>[charset]</i><br>--character-set <i>[charset]</i></td><tdclass=Description><p>Sets the character set property of the generated HTML, such as UTF-8 or Shift_JIS. The default leaves it unspecified.</p></td></tr><tr><tdclass=Option>-q<br>--quiet</td><tdclass=Description><p>Suppresses all non-error output.</p></td></tr><tr><tdclass=Option>-?<br>-h<br>--help</td><tdclass=Descripti