db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Haase (JIRA)" <derby-...@db.apache.org>
Subject [jira] Reopened: (DERBY-408) Fix formatting of manuals in PDF output
Date Thu, 12 Oct 2006 19:51:37 GMT
     [ http://issues.apache.org/jira/browse/DERBY-408?page=all ]

Kim Haase reopened DERBY-408:

I'm very grateful for these fixes. However, I believe that the fix to the part of the bug
that involves line breaks has introduced another somewhat subtle bug. If the line breaks within
a <codeblock> tag aren't contained by other formatting tags (<b>, for example),
the line breaks are ignored in PDF and monohtml generation, though they are preserved in HTML

For example, in the file src/getstart/rgsdocs10012.dita, the codeblock (on two lines) is formatted
like this.

<section><p>An example of how SQL syntax is presented:   <codeblock><b>CREATE
[ UNIQUE ] INDEX <b><i>IndexName</i></b>
  ON <b><i>TableName</i></b> ( <b><i>SimpleColumnName</i></b>
[ , <b><i>SimpleColumnName</i></b> ] * ) </b></codeblock></p></section>

The output looks like this in HTML, monohtml, and PDF (it's in the "SQL syntax" section),
preserving the line break and indent before ON:

  ON TableName ( SimpleColumnName [ , SimpleColumnName ] * ) 

The reason it works in all formats is that all the text within the codeblock is contained
by the <b></b> tags at the beginning and end, even though there are also a number
of <b></b> tags within. 

If I change this codeblock to remove any formatting at the line break -- note the closing
</b> tag at the end of the first line and the starting <b> tag on the second --

<section><p>An example of how SQL syntax is presented:   <codeblock><b>CREATE
[ UNIQUE ] INDEX <i>IndexName</i></b>
  <b>ON <i>TableName</i> ( <i>SimpleColumnName</i> [ , <i>SimpleColumnName</i>
] * ) </b></codeblock></p></section>

the line break is not preserved in the PDF and monohtml, and the output looks like this:

CREATE [ UNIQUE ] INDEX IndexNameON TableName ( SimpleColumnName [ , SimpleColumnName ] *

The Working With Derby book contains a lot of codeblocks that contain unformatted line breaks.
For example, in twwdactivity1.dita, the empty line here is intentional and shows up correctly
in the HTML:

<dd><codeblock frame="topbot"><b>java -jar %DERBY_HOME%\lib\derbyrun.jar

<i>ij version <ph conref="wwdconrefs.dita#vers/shortversionnumber"></ph></i>

In the PDF and monohtml, we get

java -jar %DERBY_HOME%\lib\derbyrun.jar ijij version 10.2

You can compare http://db.apache.org/derby/docs/10.2/workingwithderby/workingwithderby-single.html
with http://db.apache.org/derby/docs/10.2/workingwithderby/index.html to see several instances
of the problem.

A stopgap solution would be to fix codeblocks to remove unformatted line breaks. It would
be better to fix the PDF/monohtml generation, though, if possible.

> Fix formatting of manuals in PDF output
> ---------------------------------------
>                 Key: DERBY-408
>                 URL: http://issues.apache.org/jira/browse/DERBY-408
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>         Environment: all
>            Reporter: Jeff Levitt
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>             Fix For:
>         Attachments: derby-408.diff
> 1.  The syntax boxes in many of the Derby manuals seem to output with extra End-of-line
feeds in the PDF's.  Some syntax boxes print one word per line.   For example:
> http://incubator.apache.org/derby/docs/tools/tools-single.html#rtoolsijpropref10135
> This might be a bug with the DITA toolkit, because the DITA source files dont have these
End-of-line feeds in them.
> This bug was originally reported in the doc reviews for version 10.1:
> http://issues.apache.org/jira/browse/DERBY-383
> (see Myrna's comments)
> 2.  Based on http://issues.apache.org/jira/browse/DERBY-384 comments to the doc review
(see Sunitha's comments), we need to figure out how to et the table numbers to ascend.  Currently,
they all output as table 1.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message