[[Image(ImprovingBoostDocs:ibdp.png,nolink)]] * [ImprovingBoostDocs Improving Boost Docs] * [ImprovingBoostDocs About this project] * [BoostDocsRepository Boost docs repository] * [UnifiedLookAndFeelProject Unified look & feel project] * [HelpingBoostAuthors Helping Boost Authors] * [GlueDocsProject Glue docs project] * [StandardCppLibraryDocumentation Standard C++ Library Docs] * [DocumentationBestPractices Documentation Best Practices] * '''[DocsOrganization Docs organization proposal]''' * [DocumentationTools Documentation Tools] * [ImprovingBoostDocsSubprojects Subprojects] * [BrowserTestingChart Browser Testing Chart] * [LibrariesLogos Logo Playground] ---- = Docs orgainzation proposal = A standard layout for our docs files. [[PageOutline(2-4,Table of contents,inline)]] ---- == Docs files Organization == '''[#example_boostbook Docbook source]''' - ''Required'' * '''[#example_boostbook_xml doc/lib_name.xml]''' [[Br]] Doc source in docbook format. Optionally it can include boostbook extensions. * '''[#example_boostbook_xsl doc/lib_name.xsl]''' [[Br]] Library dependents output configuration parameters (i.e. chunker depth). * '''[#example_boostbook_jamfile doc/Jamfile.v2]''' [[Br]] "doc/bjam --v2" will generate the HTML docs. '''[#example_quickbook Quickbook Source]''' - ''Optional'' * '''[#example_quickbook_main_qbk doc/lib_name.qbk]''' [[Br]] Main quickbook file. * '''[#example_quickbook_moderate_section_qbk doc/*.qbk]''' [[Br]] Moderate size main sections quickbook files * '''[#example_doc_example_qbk doc/larger_section.qbk]''' * '''[#example_doc_example_qbk doc/larger_section/*.qbk]''' [[Br]] Large size main sections (i.e reference) may be splitted again, organizing them in a directory tree to avoid cluttering the '''doc''' directory. '''[http://en.wikipedia.org/wiki/Category:Graphics_file_formats Images]''' - ''Optional'' * '''[http://en.wikipedia.org/wiki/PNG doc/images/*.png]''' [[Br]] You can use other formats, but be a good web citizen and use portable networks graphics. * '''[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics doc/images/*.svg]''' [[Br]] If you intend to have a decent rendering in the pdf docs, use svg. '''[#example_doc_example Examples]''' - ''Optional'' * '''[#example_doc_example_cpp example/doc/*.cpp]''' [[Br]] Quickbook allows us to import code chunks, instead of hard-coding them in the qbk source. This allow as to be sure that every code example will be in sync and with out typos. * '''[#example_doc_example_jamfile example/doc/Jamfile.v2]''' [[Br]] Testsuite for the doc examples. '''[#example_navigation Navigation aid]''' - ''Will be automated in the future'' * '''[#example_navigation_sections_xml doc/html/sections.xml]''' [[Br]] Nested links xml definition of the library sections. This file is used to generate the navigation select boxes and tree sidebar (''expected it soon''). ---- == Docs files examples == [[PageOutline(3-4,Examples list,inline)]] === Docbook source === #example_boostbook ==== doc/lib_name.xml ==== #example_boostbook_xml Doc source in docbook format. Optionally it can include boostbook extensions. {{{ name name year name Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Standard boostbook example Boost.LibraryName
Section Title This is an example of a standard Boostbook document. An external link These should be syntax highlighted: #include <iostream> int main() { // Sample code std::cout << "Hello, World\n"; return 0; }
}}} ==== doc/lib_name.xsl ==== #example_boostbook_xsl Library dependents output configuration parameters (i.e. chunker depth). {{{ }}} ==== doc/Jamfile.v2 ==== #example_boostbook_jamfile "doc/bjam --v2" will generate the html docs. {{{ # Boost.LibraryName # # Copyright (c) Years author name, author name # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) using quickbook ; xml library_name : library_name.qbk ; boostbook standalone : library_name : library_name.xsl ; }}} [[Br]] === Quickbook Source === #example_quickbook ==== doc/lib_name.qbk ==== #example_quickbook_main_qbk Main quickbook file. {{{ [library LibraryName [quickbook 1.4] [copyright Year author name, author name] [purpose Standard qbk example] [id library_name] [dirname library_name] [license Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at [http://www.boost.org/LICENSE_1_0.txt]) ] [authors [surname, firstname], [surname, firstname] ] [category library_category] ] [/ Templates ] [/ Images ] [template Diagram [$../images/diagram.png]] [/ External Links ] [template SgiAssignable [@http://www.sgi.com/tech/stl/Assignable.html Assignable]] [/ Sections ] [section Small Section] A few lines. A nice diagram of the lib: [Diagram] [endsect] [/ Moderate section abstract ] [include moderate_size_section.qbk] [/ Larger section abstract ] [include larger_size_section.qbk] [section Other Small Section] Some more lines. An external resource: [SgiAssignable] [endsect] }}} ==== doc/moderate_section.qbk ==== #example_quickbook_moderate_section_qbk Moderate size main sections quickbook files {{{ [/ Boost.LibrayName Copyright (c) Year author name Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ] [/ QuickBook Document version 1.4 ] [/ Section specifics templates ] [template ModerateSizeImage [$../images/moderate_size_image.svg] [/ Sections ] [section Moderate section] You can use this sections templates to show an image: [ModerateSizeImage] Main templates are allowed too, reuse [SgiAssignable]. A nice table, including marketting stuff [table Quickbook Rocks [[Feature ][Purpose ]] [[Templates ][Extensibility and constants ]] [[Code import ][Code consistency, callouts and reuse ]] [[Wiki style formating ][High signal to noise ratio in source code ]] [[Internal links ][Easy to use inter-doc anchors ]] [[Syntax Highlighting ][Both in code blocks and in `inline code` ]] ] [endsect] }}} [[Br]] === Doc Examples === #example_doc_example ==== example/doc/code_example.cpp ==== #example_doc_example_cpp Quickbook allows us to import code chunks, instead of hard-coding them in the qbk source. This allow as to be sure that every code example will be in sync and with out typos. {{{ // Boost.LibraryName // // Copyright (c) Year author name, author name // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Doc example #include #include //[ DocCodeFunctionName std::string greeting() { return "Hello world!"; } //] //[ DocCodeExampleName int main() { /*<< A callout bug >>*/ std::string message = greeting(); std::cout << message; /*< Inlined callout bug >*/ } //] }}} ==== doc/larger_section.qbk ==== #example_doc_example_qbk {{{ [/ Boost.LibrayName Copyright (c) Year author name Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ] [/ QuickBook Document version 1.4 ] [/ Section specifics code ] [import ../example/doc/example_name.cpp] [/ Sections ] [section Larger section] [section Introduction] A few lines. We can easily use the imported code: [DocCodeFunctionName] And then the main function [DocCodeExampleName] That is it! [endsect] [include larger_section/subsection_name.qbk] [endsect] }}} ==== example/doc/Jamfile.v2 ==== #example_doc_example_jamfile Testsuite for the doc examples. {{{ # Boost.LibraryName # # Copyright (c) Years author name, author name # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import testing ; test-suite "doc_code" : [ compile compilable_example.cpp ] [ run runable_example.cpp ] [ compile-fail compile_fail_example.cpp ] ; }}} [[Br]] === Navigation aid === #example_navigation ==== doc/html/sections.xml ==== #example_navigation_sections_xml Nested links xml definition of the library sections. This file is used to generate the navigation select boxes and tree sidebar (''expected it soon!''). {{{ <link tag="Introduction" href="library_name/introduction.html" /> <link tag="Moderate size section" href="library_name/moderate_section.html" > <link tag="First Subsection" href="library_name/moderate_section/first_subsection.html" /> <link tag="Second Subsection" href="library_name/moderate_section/second_subsection.html" /> <link tag="Last Subsection" href="library_name/moderate_section/last_subsection.html" /> </link> <link tag="Larger size section" href="library_name/larger_section.html" > <link tag="First Subsection" href="library_name/larger_section/first_subsection.html" /> <link tag="Second Subsection" href="library_name/larger_section/second_subsection.html" > <link tag="Deeper section" href="library_name/.../deeper_section.html" /> </link> <link tag="Last Subsection" href="library_name/larger_section/last_subsection.html" /> </link> <link tag="Acknowledgments" href="library_name/acknowledgments.html" /> </nestedLinks> }}} ---- * [ImprovingBoostDocs Improving Boost Docs] * [ImprovingBoostDocs About this project] * [BoostDocsRepository Boost docs repository] * [UnifiedLookAndFeelProject Unified look & feel project] * [HelpingBoostAuthors Helping Boost Authors] * [GlueDocsProject Glue docs project] * [StandardCppLibraryDocumentation Standard C++ Library Docs] * [DocumentationBestPractices Documentation Best Practices] * '''[DocsOrganization Docs organization proposal]''' * [DocumentationTools Documentation Tools] * [ImprovingBoostDocsSubprojects Subprojects] * [BrowserTestingChart Browser Testing Chart] * [LibrariesLogos Logo Playground]