I made a change in the blogger configuration to ease the later work when blogging. It is possible that older entries are not correctly formatted.

Wednesday 10 July 2013

Maven Apt and Code Snippets

For a documentation and course I will give I am using the document creation properties from apt of maven. For a documentation of the format see:
the APT format. In order to give an example, you can use a very simple snippet:

    ------
    The APT format ( or the html title of the document)
    ------
    Me the author
    ------
    2013-7-9


The title at the top of the page (not indented)

  The first introduction paragraph.... which is indented so that it is clear that it is a paragraph.

* The first subsection

  Another paragraph also indented

** a subsection with two * in order to mark it as a sub subsection

  A third paragraph followed by an ordered list with numbers

    [[1]] first element

    [[1]] second element


This create the following snippet HTML fragment (in a given generated page).



<h2>The title at the top of the page (not indented)
<a name="The_title_at_the_top_of_the_page_not_indented"></a></h2>

<p>The first introduction paragraph.... which is indented so that it is clear that it is a paragraph.</p>

<div class="section"><h3>The first subsection

<a name="The_first_subsection"></a>

</h3><p>Another paragraph</p>

<div class="section"><h4>a subsection with two * in order to mark it as a sub subsection<a name="a_subsection_with_two__in_order_to_mark_it_as_a_sub_subsection"></a></h4>

<p>A third paragraph followed by an ordered list with numbers</p>

<ol style="list-style-type: decimal"><li>first element</li><li>second element</li></ol></div></div></div>

In order to get snippets, then I use snippet macros as described in: Guide to the Snippet Macro.