Re: How to change FOP hyphenation points?

2003-10-11 Thread Steinar Bang
 J.Pietschmann [EMAIL PROTECTED]:

 Steinar Bang wrote:
 Chris Bowditch [EMAIL PROTECTED]:
 I tried inserting #200b; after http://;.  The result was like this:
 http://   some-
 machine/path/to/somewhere

 You'll have to turn off hyphenation too

Is using #x200b; and turning hyphenation off, better than inserting
fo:block/?

 (in addition to using the correct character).

I used the correct character in the document.  I just mistyped it in
the message to the mailing list.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to change FOP hyphenation points?

2003-10-10 Thread Steinar Bang
Platform: DocBook XML 4.2,
  DocBook XSL 1.62.4,
  xsltproc 1.0.27,
  fop 0.20.5

Is there a way to introduce soft line breaks into FOP formatting? 
I'm using the DocBook XSL style sheets to create XSL:FO files from
DocBook XML documents, and feed the XSL:FO files through FOP to create
PDF files.

I have two URLs in table cells, that breaks in this manner:
  ht-
  ttp://somemachine/path/to/some-
  where

And that looks a bit silly.

I can't make the table columns wider, and I can't make the URLs
shorter, and I don't want to change the table.  It's a table that
lists PUT and GET URLs for different services.  Ie. like this:

 +--+--+-+
 |  | GET URL  | PUT URL |
 +--+--+-+
 | Some desc.   |  | |
 +--+--+-+
 | Some other desc. |  | |
 +--+--+-+

Is there eg. a character I could insert that would tell FOP to break
at a particular point?  I tried using shy; after http://;.

But the result was that the URLs were broken in the same way as before
in the PDF output, and a hyphen character was inserted where I had put
in shy;.  The numerical character reference inserted into the
XSL:FO, was xAD;.

I've looked at http://xml.apache.org/fop/hyphenation.html, but it
looked a bit complicated, for what I wanted to do.

I was looking for a way to find a file I could drop in the document's
directory, where I could put the URLs, with proper break points
inserted.

Thanx!


- Steinar


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to change FOP hyphenation points?

2003-10-10 Thread Steinar Bang
 Chris Bowditch [EMAIL PROTECTED]:

 From: Steinar Bang [EMAIL PROTECTED]
 snip/

 I have two URLs in table cells, that breaks in this manner:
 ht-
 ttp://somemachine/path/to/some-
 where

 Take a look at

 http://xml.apache.org/fop/faq.html#cells-overflow

 Specifically the bit about inserting zero-width spaces. That will
 allow FOP to break your http where you have inserted the spaces.

Thanx for the tip!

I tried inserting #200b; after http://;.  The result was like this:

 http://   some-
 machine/path/to/somewhere

The result I was hoping for, was:

 http://   
 somemachine/path/to/somewhere


There is room enough on the second line to fit everything after
http://;, but there may be some special handling for the last lines
of paragraphs?

Thanx!


- Steinar


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to change FOP hyphenation points?

2003-10-10 Thread Steinar Bang
 Steinar Bang [EMAIL PROTECTED]:

 Chris Bowditch [EMAIL PROTECTED]:

 Specifically the bit about inserting zero-width spaces. That will
 allow FOP to break your http where you have inserted the spaces.

 Thanx for the tip!

 I tried inserting #200b; after http://;.  The result was like this:
[snip!]

I tried using line feeds instead, with the same result.

I ended up using fo:block/ to force the line break at the desired
place.

I put in the PI ?fo-table-cell-break? where I wanted the break, and
put the following template into the XSLT style sheet generating the
XSL:FO: 

  xsl:template match=processing-instruction('fo-table-cell-break')
fo:block/
  /xsl:template

This is a bit clunky, but it got me desired results.

Thanx!


- Steinar




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to change FOP hyphenation points?

2003-10-10 Thread Steinar Bang
 Chris Bowditch [EMAIL PROTECTED]:

 From: Steinar Bang [EMAIL PROTECTED]

 I tried inserting #200b; after http://;.  The result was like this:

 you've inserted the wrong character, the link I provided says to use
 #x200b. Notice the x which indicates the number is in hex rather
 than decimal

I inserted the correct character into the document.

I mistyped it in the mailing list message you quote.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scaling of SVG in FOP doesn't work

2003-05-24 Thread Steinar Bang
 On Thu, 20 Mar 2003 15:03:11 +0100, Steinar Bang [EMAIL PROTECTED] said:

 At the end of this message is a DocBook fragment including an SVG
 figure, with scaling.  Imediately following, is a Tidy'd XSL:FO
 fragment generated by the DocBook XSL style sheets.

 The SVG image isn't scaled in the resulting PDF file.  I just see the
 top of a big image that stretches outside of the page.

 Is there a way to make SVG images scale?  Do I have to change to a
 different version of FOP?

To answer my own question: this is a FOP FAQ:
http://xml.apache.org/fop/graphics.html#svg-scaling

  Currently, SVG images are rendered with the dimensions specified in
   the SVG file, within the viewport specified in the
   fo:external-graphic element. For everything to work properly, the
   two should be equal. The SVG standard leaves this issue as an
   implementation detail. FOP will probably implement a scaling
   mechanism in the future.

Ie. when creating the FOP image, you have to create it with the
dimensions you wish it to have in the result.

I haven't figured out a way to do this with my Dia[1] drawing.  Dia
0.90 doesn't seem to have a way to select all objects, and scale them
to a certain size.


- Steinar

References:
[1] http://www.lysator.liu.se/~alla/dia/ 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Do Fop have problems with keep-with-...?

2002-04-23 Thread Steinar Bang
 Steinar Bang [EMAIL PROTECTED]:

 J.Pietschmann [EMAIL PROTECTED]:

 [snip!] If you are generating FO from DocBook, this will probably
 be hard, or harder. You can try to fiddle with the docbook style
 sheets to achieve this effect.

 Some workaround around those lines, is what I will try tomorrow.

What I did was to put beginpage/ elements at appropriate places in
the DocBook XML source, to force line breaks _before_ the problematic
sections. 

This is a hack, because it is vulnerable to changes to the XML
source.  But it is less ugly than the other hacks on the table, and
I'll remove the beginpage/ elements when Fop supports keep-*.

I noticed that the DocBook XSL style sheets didn't have a template for
beginpage, so I put the following in my local FO-producing style
sheet: 

  xsl:template match=beginpage
fo:block break-after=page/
  /xsl:template




Do Fop have problems with keep-with-...?

2002-04-22 Thread Steinar Bang
Platform: Intel PIII, debian testing, Blackdown Java SDK 1.3.1,
  Saxon 6.4.4, DocBook XML 4.1.2, DocBook-XSL 1.48,
  Fop-0.20.3rc

Does Fop still have a problem with keep-with-*?  Searches on the net
seem to indicate that this was the case as late as February this year:
   http://lists.w3.org/Archives/Public/www-xsl-fo/2002Feb/0064.html

If the problem still persists, does anyone know of a good workaround? 

I have a problem with the title of a section, in a DocBook XML
article, not sticking with the rest of the section, when a page
break is inserted.

Since what I'm writing is a step-by-step cookbook with screen shots,
this results in pages consisting of a large image (a screen dump), the
descriptive text for that image, and the section title for the next
screen dump.  And this looks rather silly.

More info on what I have done and tried, can be found in the thread
starting with:
   http://lists.oasis-open.org/archives/docbook-apps/200204/threads.html#00221

Thanx!


- Steinar




Re: to J.Pietschmann (about keep-together)

2002-04-22 Thread Steinar Bang
 J.Pietschmann [EMAIL PROTECTED]:

 MARTIN Franck wrote:
 Thank you for your advice but what do you mean by blind table?

 A table without borders, so you don't notice it's actually
 there. Often used for doing complicated layouts which can be fitted
 manually to an underlying grid.
 In your case, just for keeping stuff together.

I have a similar problem.

My problem is that my FO is generated from DocBook source, and that
the only way I can see how to accomplish a blind table, is to create a
different template for DocBook section elements that will create a
mess for regular sections.

Hm...




Re: Do Fop have problems with keep-with-...?

2002-04-22 Thread Steinar Bang
 J.Pietschmann [EMAIL PROTECTED]:

 [snip!] If you are generating FO from DocBook, this will probably be
 hard, or harder. You can try to fiddle with the docbook style sheets
 to achieve this effect.

Some workaround around those lines, is what I will try tomorrow.

I won't fiddle with the DocBook XSL style sheets directly, but I will
replace a template or several templates, in a local XSL style sheets.

The local style sheet is already in place.  This is where I set the
page size to be a4 instead of the default letter, and this is where I
override the standard table template, to fix stuff.

 If you are at it, you can fix a few other problems DocBook
 generated have (fo:table-and-caption,

Already done in the local style sheet, see
http://marc.theaimsgroup.com/?l=fop-userm=101829073309486w=2

 references to fo:page-sequence and to fo:block with a break-before)

What are the problems with these?  I haven't run into them yet.

 Your alternative is to use a commercial FO processor.

Or PassiveTex, perhaps...?
http://www.hcu.ox.ac.uk/TEI/Software/passivetex/

But I think I would miss the SVG rendering of Fop.





Re: DocBook tables not appearing in PDF generated by Fop

2002-04-08 Thread Steinar Bang
 J.Pietschmann [EMAIL PROTECTED]:

 Steinar Bang wrote:
 J.Pietschmann [EMAIL PROTECTED]:

 Furthermore, remove whatever produced the fo:table-and-caption in
 the FO file (probably specifying a title or caption for the table
 in DocBook).

 What's wrong with it?  Is it an illegal FO construct?  Or is it a
 construct unsupported by Fop?

 Not implemented in FOP. I think these tables are not put into the
 output, or at least the caption will be missing.  Try it yourself.

Use of fo:table-and-caption was the reason no tables appeared in the
output. 

I have fixed it, for now, by defining a new template for table, in my
local XSL style sheet for creating FO from DocBook.  This local style
sheet holds my local settings (A4 instead of letter, turn on saxon
extensions etc.).

Attached is the file with the doctored template (It's the table
template from the DocBook XSL fo style sheet, with the
fo:table-and-caption stuff commented out.

Thanx!


- Steinar


?xml version='1.0'?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version='1.0'
xmlns=http://www.w3.org/TR/xhtml1/transitional;
exclude-result-prefixes=#default
xmlns:fo=http://www.w3.org/1999/XSL/Format;

  xsl:import href=http://no-video6/xml/styles/docbook-xsl-1.48/fo/docbook.xsl/
  xsl:import href=local-common.xsl/

  !-- Changes to defaults --
  xsl:param name=paper.type select='A4' /

  xsl:template match=table
xsl:variable name=id
  xsl:call-template name=object.id/
/xsl:variable
xsl:variable name=prop-columns
  select=.//colspec[contains(@colwidth, '*')]/

fo:block
  xsl:attribute name=span
xsl:choose
  xsl:when test=@pgwide=1all/xsl:when
  xsl:otherwisenone/xsl:otherwise
/xsl:choose
  /xsl:attribute

!--
  fo:table-and-caption id={$id}
xsl:use-attribute-sets=formal.object.properties
keep-together.within-column=1
fo:table-caption
--
  fo:block xsl:use-attribute-sets=formal.title.properties
xsl:apply-templates select=. mode=object.title.markup/
  /fo:block
!--
/fo:table-caption
--
fo:table
  xsl:call-template name=table.frame/
  xsl:if test=count($prop-columns) != 0
xsl:attribute name=table-layoutfixed/xsl:attribute
  /xsl:if
  xsl:apply-templates select=tgroup/
/fo:table
!--
  /fo:table-and-caption
--
/fo:block
  /xsl:template


/xsl:stylesheet