Commit Graph

14 Commits

Author SHA1 Message Date
Brad King d0c863f60f docbook: Fix Sun CC warning on ptr_fun(isalnum)
The Sun compiler complains:

 cmDocumentationFormatterDocbook.cxx", line 230: Warning (Anachronism),
 badargtype2w: Formal argument x of type int(*)(int) in call to
 std::ptr_fun<int, int>(int(*)(int)) is being passed
 extern "C" int(*)(int).

Add an intermediate C++ function to forward to the C function.
2012-09-10 09:41:37 -04:00
Brad King 4e62784bf6 docbook: Fix formatter naming convention to avoid shadow
Some compilers complain:

 cmDocumentationFormatterDocbook.cxx: In member function virtual void cmDocumentationFormatterDocbook::PrintHeader(const char*, const char*, std::ostream&):
 cmDocumentationFormatterDocbook.cxx:197:73: warning: declaration of docname shadows a member of 'this' [-Wshadow]

Fix the name of the member variable.
2012-09-09 10:55:49 -04:00
Daniel Pfeifer 3a9e373a69 docbook: Add support for <abstract> at section level 1
If a section has subsections (ie. subelemens with a title), all elements
before the first title are written inside an <abstract>.  Also wrap
<programlisting> in <para>, to allow preformatted output in abstracts.
2012-09-08 07:42:06 -04:00
Daniel Pfeifer 67e7d49cb8 docbook: Cleanup formatter and generated DocBook
Comment and whitespace changes, changed docbook version to 4.5, changed
<literallayout> to <programlisting> (the latter implies a fixed-size font).
2012-09-07 10:11:27 -04:00
Daniel Pfeifer 55146ed0f0 docbook: Fix the DocBook section output
The DocBook formatter used to generate something like:

  <para id="section"><sect2><title>Title</title></sect2>Some Text</para>

Which was completely wrong. In DocBook, a section should look like this:

  <sect2 id="section"><title>Title</title><para>Some Text</para></sect2>
2012-09-07 10:10:49 -04:00
Daniel Pfeifer dbfe335099 docbook: Factor out code to write valid DocBook IDs
Attributes in XML may contain alphanumeric characters, underscores,
colons and dots.  When DocBook is chunked, the dot is often used as a
path separator.  To generate a valid ID, we take the title of the
section, transform all non-alphanumeric characters to underscores and
then add a prefix separated with dots.  We also add the document name as
a prefix, in order to 'xinclude' eg. cmake.docbook and ctest.docbook in
the same document.  IDs are written in multiple places, so the code is
factored to a function.
2012-09-07 10:09:55 -04:00
Daniel Pfeifer cffa899a47 docbook: Remove table of contents
When DocBook is transformed (eg. to PDF, HTML, ...), a TOC is generated
from the document's layout.  The TOC-like list that the docbook
formatter used to generate was both redundant and invalid.
2012-09-07 10:09:33 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Alexander Neundorf f9920b47a8 BUG: don't create empty <itemizedlist>s (#7289), dblatex didn't like that
Alex
2009-01-10 09:01:37 -05:00
Brad King 5a82a0b108 ENH: Improve generated documentation formatting
Applying patch provided in issue #7797.

Fixes to man-pages:
  - Character '-' must be espaced as '\-'
  - Surround preformatted text with '.nf' and '.fi' to adjust filling
  - Give every page a NAME section for indexing by mandb
  - Pass the man page filename without extension to .TH in its header

Also added a title to the HTML header.
2008-10-10 11:23:35 -04:00
Alexander Neundorf 0d70967a04 STYLE: insert newlines after listitem so the generated lines don't get
several thousand characters long

Alex
2008-05-09 17:50:45 -04:00
Brad King 199e85910f ENH: Fix generated documentation internal links.
- Previously all links started in 'command_' which led to conflicts
    and was confusing for non-command items.
  - Use a per-section name that is meaningful to humans.
  - Fix link id names to be valid HTML.
2008-05-05 12:02:36 -04:00
Alexander Neundorf 969ea3f449 ENH: add support for creating the documentation in docbook format
(http://www.oasis-open.org/docbook/xml/4.2/), which users can then convert
to other formats.
Tested with meinproc from KDE, which generates HTML pages which look good.

Alex
2008-02-19 14:33:43 -05:00