Hi Ivan!
the License page doesn't look good indeed in this way, we have to do something.

As you noticed, applying the `prettyprint` class to <div
class="source"><pre> elements, would warrant that feature even to
formats where classes cannot be set (due to some limitations of the
language).

Suggesting our users to port their existing sites to xdoc to have the
prettification feature wouldn't be so nice - the maven site itself is
written in APT and is a lot of documentation! - so what I suggest is
trying to understand when is not appropriate applying the current
document modification.
Maybe the License page - and few other cases that I don't know - are
just exceptions.

My 2 cents,
Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



2011/10/18 Ivan Habunek <ivan.habu...@gmail.com>:
> Hi,
>
> One problem with using APT for writing docs is that code can only be
> included within the +-- tags. This is rendeder as two nested elements <div
> class="source"><pre> Then you add the prettpyrint class by javascript to all
> <pre> elements within <code> elements.
>
> This does not allow for non-prettified <pre> blocks and makes some pages
> look pretty weird, e.g.:
> http://people.apache.org/~olamy/maven/site/license.html
>
> The only reasonable alternative i discovered is using XDOC and specifying
> your own blocks as either:
> a) <pre>
> b) <pre class="prettyprint">
> c) <pre class="prettyprint linenums">
>
> This allows for much more flexibility, but requires usage of XDOC format to
> have code prettification. APT +-- syntax always produces plain <pre> blocks.
>
> Again, the problem is that maven transforms <pre class="prettyprint"> to
> <div class="prettyprint"><pre> (why o why?) but this can also be fixed by
> javascript.
>
> To conclude, I'm migrating most of log4php docs to XDOC format because of
> this and some other APT limitations. It is a bit more difficult to write,
> but it is more flexible.
>
> If you like the solution I can transfer it to the sandbox.
>
> Regards,
> Ivan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to