Bug 577068 - Bug When Rendering PDF Files - Publican Creates Erroneous Program Listings
Summary: Bug When Rendering PDF Files - Publican Creates Erroneous Program Listings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 578706 579786 581961 588748 (view as bug list)
Depends On:
Blocks: 591745
TreeView+ depends on / blocked
 
Reported: 2010-03-26 00:49 UTC by David Le Sage
Modified: 2010-11-24 04:19 UTC (History)
10 users (show)

Fixed In Version: publican-1.6.3-0.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-17 18:56:18 UTC


Attachments (Terms of Use)
VDSO PDF (41.60 KB, image/png)
2010-04-15 20:59 UTC, Lana Brindley
no flags Details
VDSO HTML (14.66 KB, image/png)
2010-04-15 21:00 UTC, Lana Brindley
no flags Details
VDSO Source (32.41 KB, image/png)
2010-04-15 21:00 UTC, Lana Brindley
no flags Details
sysctl PDF (46.98 KB, image/png)
2010-04-15 21:01 UTC, Lana Brindley
no flags Details
sysctl HTML (17.97 KB, image/png)
2010-04-15 21:01 UTC, Lana Brindley
no flags Details
sysctl Source (26.72 KB, image/png)
2010-04-15 21:01 UTC, Lana Brindley
no flags Details

Description David Le Sage 2010-03-26 00:49:35 UTC
Description of problem:
When the user has a program listing that contains a forward slash (/), Publican will place a hyphen before that slash.  This only occurs when the file is compiled as a PDF and does not occur if the "language=" attribute is added to the <programlisting> tag. HTML renders properly

Version-Release number of selected component (if applicable):
Publican 1.6.1 (Fedora 13 Alpha with daily yum updates.)

How reproducible:
Every time.

Steps to Reproduce:
1. Include this code in a Docbook file:

<programlisting>&lt;property name="retries"&gt;&lt;int value="3" /&lt;&lt;/property&lt;</programlisting>

(NOTE:  The code can also be put in a separate XMLT file and the same problem will occur.)
2. Run publican build --formats pdf  --langs en-US
3. Open in a PDF viewer.  I have tested it in both Evince and Okular.
  
Actual results:
It comes out as:
<property name="retries"><int value="3" -/></property>

(Note the hyphen after "3".)

Expected results:
<property name="retries"><int value="3" /></property>

Additional info:

Comment 1 Jeff Fearn 🐞 2010-03-26 01:09:02 UTC
Hi, I have tested this on F12 and can not duplicate this behaviour.

Can you build the PDF and then check the following files to see if, and where, the offending hyphen has been added?

tmp/en-US/xml_tmp/<FILE>.xml
tmp/en-US/xml/<FILE>.xml

If the hyphen isn't there, then it may be in the XML:FO file, which would be:

tmp/en-US/xml/<BOOKNAME>.fo

The fo file is quite large and poorly formatted, so you will need to search for a string, e.g. retries in the example provided, to find the right place.

If the hyphen isn't there then it is probably being added by FOP.

Cheers, Jeff.

Comment 2 Ruediger Landmann 2010-03-26 01:13:41 UTC
(collision)

I cannot reproduce this in F12: html and pdf versions are identical:

<property name="retries"><int value="3"
/<</property<

(literal output of the DocBook in step 1 above)

<property name="retries"><int value="3"/></property>

(corrected DocBook)

Comment 3 David Le Sage 2010-03-26 01:27:39 UTC
Hello Jeff,

Thanks for the quick feedback.  I checked all of those files and it did not appear in any of them, so probably a FOP issue.   The Fed 13 builds are currently utilising FOP 0.95 release 4.

Comment 4 Jeff Fearn 🐞 2010-03-26 01:36:06 UTC
$ uname -a
Linux captcha 2.6.32.9-70.fc12.x86_64 #1 SMP Wed Mar 3 04:40:41 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

$ rpm -q fop
fop-0.95-4.noarch

Spook diddley ooky!

Comment 5 David Le Sage 2010-03-26 01:45:42 UTC
LOL - I thought it was just me being naughty and being a veeerrrry early adopter of Fed 13....

Comment 6 Jeff Fearn 🐞 2010-03-26 02:28:15 UTC
(In reply to comment #5)
> LOL - I thought it was just me being naughty and being a veeerrrry early
> adopter of Fed 13....    

It probably is, maybe something in the java stack related to the XSLT or layout engines. Which Java are you using?

Comment 7 David Le Sage 2010-03-26 02:51:48 UTC
LOL - was trying to dodge the guilt.


On a serious note, I am running OpenJDK and the version is  1.6.0_17.

Comment 8 David Le Sage 2010-03-26 05:26:36 UTC
Hey Jeff,

Rudi has found a way around it.  Changing:

<xsl:-Param name="hyphenate.verbatim" select="1"/> 

to 

<xsl:-Param name="hyphenate.verbatim" select="0"/> 


eliminates the problem.  He thinks it is due to changes in hyphenation that you guys have been trying to implement.  


Cheers.

Comment 9 Jeff Fearn 🐞 2010-04-06 01:15:06 UTC
*** Bug 578706 has been marked as a duplicate of this bug. ***

Comment 10 Jeff Fearn 🐞 2010-04-06 23:27:35 UTC
*** Bug 579786 has been marked as a duplicate of this bug. ***

Comment 11 Jeff Fearn 🐞 2010-04-07 02:49:41 UTC
set hyphenate.verbatim to 0

Comment 12 Jeff Fearn 🐞 2010-04-13 21:15:38 UTC
*** Bug 581961 has been marked as a duplicate of this bug. ***

Comment 13 Lana Brindley 2010-04-15 20:58:57 UTC
I'm still seeing this. See attached screenshots labeled "vdso..."

It also appears to be doubling single hyphens. See attached screenshots labeled "sysctl..."

LKB

Comment 14 Lana Brindley 2010-04-15 20:59:48 UTC
Created attachment 406934 [details]
VDSO PDF

Comment 15 Lana Brindley 2010-04-15 21:00:16 UTC
Created attachment 406935 [details]
VDSO HTML

Comment 16 Lana Brindley 2010-04-15 21:00:39 UTC
Created attachment 406936 [details]
VDSO Source

Comment 17 Lana Brindley 2010-04-15 21:01:06 UTC
Created attachment 406937 [details]
sysctl PDF

Comment 18 Lana Brindley 2010-04-15 21:01:30 UTC
Created attachment 406938 [details]
sysctl HTML

Comment 19 Lana Brindley 2010-04-15 21:01:54 UTC
Created attachment 406939 [details]
sysctl Source

Comment 20 Lana Brindley 2010-04-15 21:05:15 UTC
# rpm -qa publican
publican-1.6-0.fc12.noarch

LKB

Comment 21 Jeff Fearn 🐞 2010-04-15 21:57:06 UTC
(In reply to comment #13)
> I'm still seeing this. See attached screenshots labeled "vdso..."

This bug isn't 'CLOSED ERRATA' so no errata has been shipped. We are getting the translators to test some changes to the translation code before we ship 1.6.3.

Comment 22 Jeff Fearn 🐞 2010-05-04 21:55:29 UTC
*** Bug 588748 has been marked as a duplicate of this bug. ***

Comment 23 Ruediger Landmann 2010-05-06 03:49:15 UTC
Confirmed fixed in 1.6.3.t122

Comment 24 Andrew Beekhof 2010-05-10 07:14:35 UTC
Can we get an update for F-12 too please?

Comment 25 Fedora Update System 2010-05-13 22:20:00 UTC
publican-1.6.3-0.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc13

Comment 26 Fedora Update System 2010-05-13 22:21:24 UTC
publican-1.6.3-0.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc12

Comment 27 Fedora Update System 2010-05-15 20:35:34 UTC
publican-1.6.3-0.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update publican'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc12

Comment 28 Fedora Update System 2010-05-15 20:45:00 UTC
publican-1.6.3-0.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update publican'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc13

Comment 29 Fedora Update System 2010-05-17 18:54:54 UTC
publican-1.6.3-0.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2010-05-17 18:58:46 UTC
publican-1.6.3-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.