Forum How do I...?

How/Can I use point numbers and whole numbers for footnotes at the same time?

dlpBNA
I know how to get footnote numbering to work and how to reset the number back to 0 on new pages and even how to start the document with a number like 1557.

But we also have point numbers in our footnotes. Example: 100 ,100.1, and 100.2, so that footnotes numbers on pages were the data has not changed will not have to change.

Is there a way to deal with this? Can Prince use the <sup> number or something else to get the current footnote number? Can this be a variable on the span tag we use for our footnotes?

I have not been able to find an example of this anywhere at this point and everything I try fails.

I guess I can provide an example but I did not think it would be needed. Let me know.

Thank You
Dennis
howcome
Certainly, footnote calls/markers can take several counters. Here's an example of using «compound counters»
https://www.princexml.com/howcome/2022/guides/footnotes/index.html#compound-counters
dlpBNA
I am not sure counters will work here. The calls are okay, I can just display the sup tag to handle that but the markers are a different story.

We do not know when a whole number will have a point added to it. So that makes me think we will need to look at the sup tag for each footnote to know and just display that as the call and maker. Is that possible?
howcome
Could you post a page or two to show your preferred rendering? And also describe under what conditions the number would change from a simple to a compound number?

Edited by howcome

dlpBNA
I actually found a way to do this but I need to do more testing to make sure it really works.

The attached image shows what I want/have. It is rough and needs more styling.

Here is the css that I have to make this happen. Let me know if you have a better way.

@media print {
	sup {
		string-set: fnum content();
	}
}
@page {
	size: 8.5in 5in;
}
span {
	float: footnote;
}

::footnote-marker {
	content: string(fnum);
	vertical-align: super;
	font-size: 60%;
}

::footnote-call {
	font-size: 0pt;
}
  1. Capture.PNG18.7 kB

Edited by dlpBNA

aquazoo
I'm working with Dennis (dipBNA), trying to sort out the style of the footnote calls. When it's 0pt, as above, we get a call that's 83% of the text size and a super alignment too high -- it affects the line spacing. I also get a space before the call number, which I don't want.
When I add styles to the footnote call,

::footnote-call {
content: string(fnum);
vertical-align: super;
font-size: 60%;
color: green;
}

I get the number twice; the first one as above and the second one as I specified in the footnote-call.
Also is there a way to control the vertical alignment so it's not positioned as high?
Thank you!
-Carol
  1. footnoteCall.PNG5.0 kB
howcome
Could you attach your HTML code?
aquazoo
<p id="a0r8x6p7r8" origin.id="a0g2m1x0r3">The personal holding company surtax of <cite><cite.usc ref="usc\26\541">&sect;541</cite.usc></cite> through <cite><cite.usc ref="usc\26\547">&sect;547</cite.usc></cite><footnote id="a0r8x6p7r9" origin.id="a0g2m1x0r4">
<span class="popup" onClick="myFunction(1)"><sup>1</sup>

<span class="popuptext footnote" id="1">

All &ldquo;Section&rdquo; and &ldquo;&sect;&rdquo;

references are to the Internal Revenue Code of 1986, as amended, and the regulations promulgated thereunder, unless otherwise indicated.

</span></span>

</footnote> was enacted in 1934
---------------

Removing the id="1" from the span tag, or removing the (1) from myFunction does not make a difference.
Removing <sup>1</sup> makes both numbers disappear.
howcome
Could you attach the HTML a a complete file with CSS in it?
aquazoo
Here it is. (removed)

Edited by aquazoo

howcome
Try adding these lines:
p { line-height: 1.3 }
sup { line-height: 0; font-size: 0.7em }

By setting the line-height to zero for the sup elements, you avoid disrupting the line rhythms. By increasing the line height for paragraphs, you make room for the footnote calls. I wouid probably not change the vertical position of the footnote calls, but if you prefer, you can experiment with code like this:
vertical-align: 0.3em
aquazoo
Hmmm, I am able to change the green footnote calls, thank you for the tips there. Problem is, I want to get rid of the blue ones, which I don't seem to be able to change. I'm still getting both footnote calls.
I see what you mean about the paragraph line height, but I'm trying to match the style in our current system and actually need the leading to be slightly smaller.
howcome
If you create a minimalistic HTML document with all CSS code inside the <style> element, it's easier to debug and suggest solutions.
aquazoo
Aha, silly me! I needed to put the footnote-call style back to zero, to remove it.
Styling the sup is working.
The only issue I have left is that there is still space after the sup number. Maybe I can reduce the type size for the footnote-call style and see if that has an effect.
Thank you so much for your help!
dlpBNA
I believe we have resolved all these issues.