Closed tbm closed 3 years ago
Thanks, it should be fixed now
Yes, this is fixed, but it introduced a new problem: the top of the image is now cut off. Changing the size parameter or the size of the photo doesn't make a difference. It's always cut off.
I'll prepare a test case.
Cutting off the top also happens with 10pt font.
Here's a test case:
https://github.com/tbm/kaobook-testcase
I used a spreadsheet as the image because that has a lot of lines/boxes. You will see that the top few lines of the image are cut off.
This comment is unrelated to the cut off of the image, but relates to the recent change:
I see you changed \setchapterimage[6.5cm]{seaside}
to \setchapterimage[7.5cm]{seaside}
when you made the change. I had to change mine to 9.5cm
to get the same result as with older kaobook. I blindly copied 1279x551 (from seaside.jpeg) as the dimensions of my photos, but I don't know the aspect ratio was calculated. 1279x551 is 2.3212. Neither 7.5cm nor 9.5 matches that ratio when you take the 21.0cm width of A4. I'm not sure what that means. Anyway, 1279x551 works for me but maybe you have some insights on this.
Thanks for reporting this. Hopefully now I have figured out the TikZ package a little bit more, and the problems should be fixed (including the last one you mentioned, about the aspect ratio)
@fmarotta thank you! As far as I can tell it works as expected now. I'll look at it in more detail on the weekend or Monday.
(including the last one you mentioned, about the aspect ratio)
Can you expand on this some more? I still haven't quite figured out how to determine the aspect ratio.
Sure, I believe that now, as opposed to before, the optional argument to \setchapterimage
is the true height of the picture. The width of the picture is always the paper width. So the aspect ratio of the original picture is not preserved... This is to allow users to always choose the same height across the chapters, so that the baseline of the image will always be at the same height.
As far as I can tell, this issue has been fixed. Thanks @fmarotta
Prerequisites
Description
If you use
fontsize12=pt
together with\setchapterimage
, there's a line right below the headline text that shouldn't be there:I tried to use an image with a larger height but that made no difference, so I think this is a problem with the template.
Minimal Working Example
Change
fontsize=10pt
tofontsize=12pt
inexamples/documentation/main.tex
. I can provide a smaller example if you want.Expected behavior: No such line should be there. It should look the same as when using 10pt font.
Additional Information
I tried with LaTeX from Debian stable and with the upcoming release, so it's not a problem with my LaTeX being old.