0

I need help again. I'm almost done with my idea and actually just need some fine tuning of my bible. Is it possible that the chapter number stand as drop cap? Here is an example from another bible: https://i.stack.imgur.com/1uRTp.png

The link for the the editing code: https://xsltfiddle.liberty-development.net/nb9PtDi/118

Thank you very much!

Andrej90
  • 9
  • 2

2 Answers2

0

https://xsltfiddle.liberty-development.net/nb9PtDi/120 uses fo:float rather than the AH Formatter extension for initial capitals. This works in AH Formatter (see below), but a fresh install of FOP 2.6 stops after the floated '1', and the FOP used by xsltfiddle.liberty-development.net loses the floated chapter numbers. Maybe you can make it work with FOP, since FOP is supposed to be able to float to the left and right.

Sample showing dropped chapter numbers.

The size and position of the dropped numbers were determined by a bit of trial and error and are adequate for the font that I was using. You'd need to know the font metrics of the font that you are using to properly align the top of the number with the cap height of the first line and align the baseline of the number with the baseline of the second line.

Tony Graham
  • 7,306
  • 13
  • 20
  • Thanks first of all for the help and opportunity. Unfortunately I have AH Formatter as trial version with watermark. Is there any other solution? Thanks again! – Andrej90 Jun 26 '21 at 13:30
  • I tried again with FOP 2.6, however the number disappears from the chapter, unfortunately. – Andrej90 Jun 26 '21 at 14:08
0

Just use floats, they should work with FOP. The structure you are looking to create should be something like this:

<fo:block>
  <fo:float float="start">
   <fo:block margin="0pt" color="red" text-depth="0pt" font-size="62pt" line-height="40pt" font-weight="bold" font-family="Courier">F</fo:block>
  </fo:float>loats dimensions derived from its content width/height, accompanying text should wrap around floating block. Drop capital in this paragraph implemented using side float that contains fo:block with single big letter "F". Floats dimensions derived from its content width/height, accompanying text should wrap around floating block. Drop capital in this paragraph implemented using side float that contains fo:block with single big letter "F".
</fo:block>

See http://www.renderx.com/usecasestest.html "creating drop capitals using side floats"

Used this test file and FOP 2.5, the result is:

enter image description here

There is no need for any extensions to any FO formatter to accomplish this, as long as they support floats.

Kevin Brown
  • 8,805
  • 2
  • 20
  • 38
  • Thank you very much. This variant actually works with FOP 2.6. I thank you very much for this help! All the best! – Andrej90 Jun 28 '21 at 08:52