sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

Can't adjust size of drop-cap chapter (\c) numbers #447

Closed livingfield closed 3 years ago

livingfield commented 3 years ago

In the Styles tab, for chapter numbers (\c), adjusting the "Font Size Factor" or checking the box "Scale Relative to Parent" doesn't affect the size of the printed drop-cap chapter numbers. I am, however, able to change the color of the chapter number in the same dialog box. (PTXprint 1.7)

mhosken commented 3 years ago

Yes probably. We go through some hard work to come up with a good estimate of the chapter number size. Are you wanting to change it because it isn't quite right for you?

livingfield commented 3 years ago

The script I'm using has numerals with either large ascenders or large descenders. Ptxprint generally works around this to avoid overlapping characters but leaves too much space below numbers without a descender while numbers with a large ascender and a long \s or \r line can cause an extra gap between \s and the text.

The size of the drop cap chapter numbers are about twice the size that would be aesthetically pleasing. Reducing the size of the numbers would help alleviate these issues.

mhosken commented 3 years ago

That's some interesting maths the automatic size calculation is doing. Examining the font, I notice that both the highest and lowest points on any characters are in the digits, so whatever we do they are going to look oversized. So I have added back a feature to allow you to say: I know best. Always a good thing to do.

If you add \CalcChapSizefalse to your ptxprint-mods.tex then the macros will not calculate the size or shift of the chapter numbers. I suggest something around 2.5 for fontsize and say 3pt for raise as an example, which you set in the chapter style.

This feature will land with the next code release in a few days.

markpenny commented 3 years ago

Version 1.7.9 has just been put up on the site. It should have the change that Martin explained above. Here's how to do that: image

then paste the above code: image

And then you will need to make your own adjustments to the Style settings for \c image

livingfield commented 3 years ago

Thanks. This works great!