-
-
Notifications
You must be signed in to change notification settings - Fork 874
Footnotes use hard-coded HTML for styling where template should use CSS instead #4333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This small changes gives more flexibility to template authors and/or admins to style the footnotes in CSS. See discussion in issue dokuwiki#4333 for more information.
After some deliberation, I decided to add some other (minor) changes to allow for even more 8000 flexibility in styling the footnote symbols. My apologies if this is submitted in the wrong way - I'm not really experienced with pull-requests yet. Sorry for any mess... Firstly, by wrapping the actual footnote number into a plain In order to do so, the following code can be used to hide the number:
Then, a counter needs to be defined that is reset, once for the
then this counter can be added to the actual footnote symbols:
This example uses lowercase Roman numerals instead of the regular Arabic numbers. However, any of the list-style-type styles can be used, which includes Armenian, Bengali, Cambodian, Georgian, Hebrew, and various CJK (Han) and Japanese numberings. This may be useful for internationalisation of the Wikis as well. Moreover, it is also possible to use custom lists. The following is an example for a list of typographic symbols (as used in old-style print) to be used instead of a numeric counter (this contains a workaround for LESS currently not supporting the
The above LESS code defines a counter that uses symbols as used for footnote marks in book-printing, and then uses these instead of the numeric counters. Obviously, this style is only useful if there is a rather small number of footnotes in a typical wiki page. Last but not least, the additional Here is an example of CSS code to override the level 4 only (!) to use the paragraph symbol instead:
Admittedly, this is only useful in very specific situations, but I think it is a good extra level of specificity to have available for styling footnotes in exactly the way that the wiki operator requires. |
Interesting work, nice. |
Proposed solution to issue dokuwiki#4333. These changes replace the hard-coded <sup> and the closing brackets in the footnote numbers with CSS in the default template. This allows the footnote style to be overwritten by templates and/or user CSS.
Proposed solution to issue dokuwiki#4333. These changes replace the hard-coded <sup> and the closing brackets in the footnote numbers with CSS in the default template. This allows the footnote style to be overwritten by templates and/or user CSS.
Uh oh!
There was an error while loading. Please reload this page.
The problem
The HTML code that is currently generated for footnotes looks as follows:
This has the following problems:
by typographic convention, the reference number in the text should be indeed superscript, however, the leader number in the actual footnote should not (see e.g. Bringhurst: The Elements of Typographic Style, 4.3.3). Because there are hard-coded
<sup>
tags in the code, this can not be reasonably fixed in the template style sheets.the closing bracket style for the footnote numbering is unorthodox, to say the least, and again because it is hard-coded, can not be overwritten in the style sheet.
I suggest to remove the
<sup>
elements as well as the closing bracket, and in order to keep the current style for those who are used to it, add the same styling in the default template.The advantage of this change is that the footnote style can be overwritten in CSS (also by the user). The disadvantage will be that other existing templates may not be aware of this change and display the footnote numbering in a different way. I think, however, that the advantages of removing hard-coded styling here are more important.
Version of DokuWiki
"Kaos"
PHP Version
8.2
Webserver and version of webserver
Apache
Browser and version of browser, operating system running browser
Firefox
Additional environment information
No response
Relevant logs and/or error messages
No response
The text was updated successfully, but these errors were encountered: