The row format could probably be turned into a template on its own merit. It would either be one of the two (or perhaps it could function as both, with paramete
| Broad editing organization | More specific projects | ||||||
|---|---|---|---|---|---|---|---|
| Article improvements | Mental accretion | Phrases to watch | Templates | Character encoding | DKC organizing | Footnotes | Tooltips |
| If my subpages inspire you to carry out an idea yourself or you have any questions or concerns, I'm interested in hearing about it! | |||||||
| Group type | Footnote marker template or markup |
Transclusion count |
Reference list template |
Transclusion count |
Sample labels |
|---|---|---|---|---|---|
| none | <ref>...</ref> |
4,258,757 | {{reflist}}
|
1 2 3 4 5 6 7 8 9 10 | |
{{refn}} (for nested references) |
16,351 | 4,258,757 | |||
| lower-alpha | {{efn}} |
41,714 | {{notelist}} |
46,366 | a b c d e f g h i j |
| upper-alpha | {{efn-ua}} |
1,202 | {{notelist-ua}} |
2,163 | A B C D E F G H I J |
| lower-roman | {{efn-lr}} |
1,121 | {{notelist-lr}} |
2,156 | i ii iii iv v vi vii viii ix x |
| upper-roman | {{efn-ur}} |
22 | {{notelist-ur}} |
15 | I II III IV V VI VII VIII IX X |
| lower-greek[a] | {{efn-lg}} |
31 | {{notelist-lg}} |
55 | α β γ δ ε ζ η θ ι κ |
| Note | {{NoteTag}} |
69 | {{NoteFoot}} |
58 | Note 1 Note 2 Note 3 |
The row format could probably be turned into a template on its own merit. It would either be one of the two (or perhaps it could function as both, with parameter conditions):
|-
| {{tlx|}} || {{TC|}} || {{tlx|}} || {{TC|}}|-
| {{Harvard citation no brackets}} ({{harvnb}}) || 31000 || {{#invoke:Footnotes|harvard_citation_no_bracket}} || || the current page's transclusion count
|-
| {{Harvard citation text}} ({{harvtxt}}) || 4600 || {{Harvard citation/core || {{[[Template:|]]}} || the current page's transclusion count
|-
| {{Harvard citations}} ({{harvs}}) || 1500 || || {{[[Template:|]]}} || the current page's transclusion count
|-
| {{[[Template:|]]}} || the current page's transclusion count || {{[[Template:|]]}} || the current page's transclusion count
|-
| {{[[Template:|]]}} ({{[[Template:|]]}}) || the current page's transclusion count || {{[[Template:|]]}} || the current page's transclusion count
|}
I previously tried to replace some {{cref}} and {{cnotes}} templates, but it turned out poorly because I didn't understand all the technical details. I will want to ensure I understand all the technical details before embarking upon such a quest again.
That this regex is placed higher than all regex in notes is incidental; the quality may vary. Regex is actually suboptimal because of its relative inclarity, so I will probably transition to custom AWB C#.
\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\}
.*?
\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\}){{efn|\3}}\2\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\}(?=(?:[^{]*(?:(?!\{\{\s*(?:[Tt]emplate:)?[cC]note\s*\|\s*\1).)?)*\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\}){{efn|\2}}\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\}(?=(?>.*?\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1)\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\} (?= (?> [^{]*(?:.?[^{]*)*? \{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1) \s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})
(?:[^{]*.??)*?[^{]*(?:.?[^{]*)*?[^{}]*(\{(?(\{)[^{}]*(?1)?\}|(?!)[^{}]*)*Needs a subroutine, not a backreference.
(\(((?>[^()]+)|(?1))*\))*[Old note:] I'm just not going to get recursion today, and I'm fine with that; there are two many possible confusing variables.
(\{[^{]*\2[^}]*}\)\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\} ((?:[^{]*(?:(?!\{\{\s*(?:[Tt]emplate:)?[cC]note\s*\|\s*\1).)?)* \{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})
{{efn|\3}}\2Iteration 2: Lookahead time!:
\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\} (?!((?:[^{]*(?:(?!\{\{\s*(?:[Tt]emplate:)?[cC]note\s*\|\s*\1).)?)* \{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\}))
\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\}(?=(?:[^{]*(?:(?!\{\{\s*(?:[Tt]emplate:)?[cC]note\s*\|\s*\1).)?)*\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})
{{efn|\2}} Efficiency tweaking :-p: *{{code|<nowiki>(?:[^{}]*(?:\{\{[^}]*\}\})?)+(\{\{[Rr]efbegin\}\})?((?:[\s*]*?\{\{\s*?(?:[Tt]emplate:)?[E]fn\s*?((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})*)\s*(?(1)\{\{[Rr]efend\}\})(\{{2})([Rr]efbegin\}{2}\s*)?((?:\{{2}\s*?(?:[Tt]emplate:)??[E]fn\s*?(?:[^{}]*(?:\{{2}[^}]*\}{2})?)+\}{2}[\s*]*?)+)\s*(?(1)\{{2}[Rr]efend\}{2})List of {{efn}} -> {{notelist}}:
(\{\{[Rr]efbegin\}\})?((?:[\s*]*?\{\{\s*?(?:[Tt]emplate:)?[E]fn\s*?((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})*)\s*(?(1)\{\{[Rr]efend\}\}|(?!))\{{2}([Rr]efbegin\}{2}\s*)?((?:\{{2}\s*?(?:[Tt]emplate:)??[E]fn\s*?(?:[^{}]*(?:(?(1)\{{2)[^}]*\}{2})?)+\}{2}[\s*]*?)+)\s*(?(1)\{{2}[Rr]efend\}{2})\{{2}([Rr]efbegin\}{2}\s*)?((?:\{{2}\s*?(?:[Tt]emplate:)??[E]fn\s*?(?:[^{}]*(?:(?(1)\{{2})[^}]*\}{2})?)+\}{2}[\s*]*?)+)\s*(?(1)\{{2}[Rr]efend\}{2})\{{2} ([Rr]efbegin\}{2}\s*)? ((?: \{{2}\s*?(?:[Tt]emplate:)??[eE]fn\s*?(?:[^{}]*(?:(?(1)\{{2})[^}]*\}{2})?)+\}{2}[\s*]*? )+) \s* (?(1)\{{2}[Rr]efend\}{2})
Substitution:
Unique {{cref}} -> inline {{efn}}:
\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\}(?=(?:[^{]*(?:(?!\{\{\s*(?:[Tt]emplate:)?[cC]note\s*\|\s*\1).)?)*\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}]*)\s*?\}\}(?=(?>[^{]*(?:.?[^{]*)*?\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1)\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})\{\{\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}\s]*)\s*?\}\}(?=(?>[^{]*(?:.?[^{]*)*?\{\{\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1)\s*?\|((?:[^{}]*(?:\{\{[^}]*\}\})?)+)\}\})\{{2}\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}\s]*)\s*?\}{2}(?=(?>[^{]*(?:.?[^{]*)*?\{{2}\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1)\s*?\|((?:[^{}]*(?:\{{2}[^}]*\}{2})?)+)\}{2})\{{2}\s*?(?:[Tt]emplate:)?[cC]ref\s*?\|\s*?([^}\s]*)\s*?\}{2} (?= (?>[^{]*(?:.?[^{]*)*? \{{2}\s*?(?:[Tt]emplate:)?[cC]note\s*?\|\s*?\1) \s*?\|((?:[^{}]*(?:\{{2}[^}]*\}{2})?)+)\}{2} )
I assume these were part of an idea to have a middle transition stage between notes templates. But I want to avoid doing that if possible. I only thought of this because it was done previously, I wonder where it was done previously.
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.