Forum How do I...?

How to change Footnote rule properties

dillibabu
Please help me to change the footnote rule width(size) and above space
mikeday
You can apply the border-clip property and margin/padding properties to the @footnotes area with CSS:
@page {
    @footnotes {
        border-clip: 2in;
        margin-top: 1cm
    }
}
dillibabu
Thanks, It's work well.
newgen
Hi Mike,

We need differentiate the multipage footnote by setting the above rule. For example, every page footnote should have 36pt width but continued footnote page should have full page width above rule.

Thanks in advance.
mikeday
Unfortunately there is no way to express this yet.
dlpBNA
Any update on this issue? We need the same thing as newgen above.

Thank You
howcome
I'm curious about the use case, are these designs commonly found in the wild? Could you post (or email howcome@yeslogic.com) an example?

And, BTW, here's a guide to footnotes in Prince:

https://css4.pub/2022/footnotes/

Edited by howcome

dlpBNA
As you can see in the attached image, the footnote area in the left column starts with a full footnote and the rule is short. In the right column the footnote area starts off with a continued footnote and gets a rule the goes across the whole column. Our current XPP system can handle this and we would like for Prince to do this if possible. This should work when a footnote is continued to the next column or page and should work with one or more columns.

Please let me know if you need more information.
  1. footnote_rules.PNG107.3 kB
howcome
Thanks for sharing the image. This is not something Prince can do at this point. How would you express it in CSS?
csant
How would you express it in CSS?

It depends on content, and thus CSS alone might not suffice - but should it be possible to track it with the Box-tracking API?
howcome
Here's a crude workaround using deferred floats. It's not a good solution as it requires the use of dummy div elements, but it might get you out of a tight spot.
  1. foo.html3.1 kB
  2. foo.pdf23.9 kB
dlpBNA
I do not think this is working correctly. I added a second footnote to your data with the word "testing" as the data. I then duplicated all your p tags, including my change, so I could get more pages. If you do this and look at the second page the rules are not working correctly. Note the rule in the second column of the second page. It should be a long rule but it is short.
howcome
Could you share the code you tried?
dlpBNA
As I stated above this is the data and code you sent me. I just added a second footnote and copied the data a number of times to get more pages.

In this file I put a empty <div></div> after each footnote.

Page 1 - okay
2 - The second column should not have a rule since there are no footnotes.
3 - okay
4 - The right column should have a short rule since it start with a new footnote.
5 - both rules are wrong
6 - both rules are wrong.

I tried this again with only the <div></div> that you had in the file. I will add those to file in another reply.
  1. prince-test-file.html.html16.1 kB
  2. prince-test-file.html.pdf40.0 kB
dlpBNA
Here are the files with only one div
  1. prince-test-file.html.html16.0 kB
  2. prince-test-file.html.pdf40.0 kB
howcome
It's easier to place all <div>s at the beginning, see attached file.

As mentioned above, this is not a general solution we recommend using as it requires manually placed dummy <div>s. However, it will give you full lines when absolutely needed.

  1. foo.html16.3 kB
  2. foo.pdf33.0 kB

Edited by howcome

dlpBNA
Thanks, but since this is a manually solution it would not help us. Our documents can be hundreds and sometimes over a thousand pages.

Do you all have any plans to make this work as part of the regular process?