Template talk:Template journal
<syntaxhighlight> and code style
[edit]I appreciate the effort, but two three caveats:
<syntaxhighlight lang="wikitext">
has learned to produce a similar output, hasn't it? What is the rationale then?<syntaxhighlight lang="wikitext">
:{{tj}}:{{Blockquote | Cry "Havoc" and let slip the dogs of war. | [[William Shakespeare]] | character = Mark Antony | title = ''[[Julius Caesar (play)|Julius Caesar]]'' | source = act III, scene I }}
{{BlockquoteI assume it's a template link. But at the cost of lost highlighting inside the parameters. Anyways, I think, this should be mentioned in the docs.
| Cry "Havoc" and let slip the dogs of war.
| [[William Shakespeare]]
| character = Mark Antony
| title = ''[[Julius Caesar (play)|Julius Caesar]]''
| source = act III, scene I
}}- The code style with tabs seems unusual to me. First of all, you can't type it in the text editing area – tabs are unsupported there. Then, the conventional code style seems to be this:
{{Blockquote | Cry "Havoc" and let slip the dogs of war. | [[William Shakespeare]] | character = Mark Antony | title = ''[[Julius Caesar (play)|Julius Caesar]]'' | source = act III, scene I }}
- Another thing I'm skeptical about is the conflict with the notation where variable content is italicized (including using
<var>...</var>
), and actual content is roman, for example:{{blockquote|text|author}}
vs{{blockquote|Cry "Havoc" and let slip the dogs of war.|William Shakespeare}}
.
Jack who built the house (talk) 23:36, 6 August 2023 (UTC)
- @Jack who built the house: I rather like this concept and though there are some minor similarities with things like
<syntaxhighlight lang="wikitext">
, I feel they are quite different concepts. I suppose one could use a construction like{{#tag:syntaxhighlight|content|lang=wikitext}}
where content was created on the fly, removing the need for the separate<templatestyles src="Template:Template journal/styles.css" />
, however, as far I know there is no way to use any sort of wikitext markup within a parser extension tag/strip marker. They render their provided content however they see fit so using<var>
or other means of italicizing, etc. is likely not possible within such a context. That said, it seems like a good idea to rewrite the entire thing along with{{Template journal inline}}
and {{Template journal parameter}} directly in Scribunto Lua. It seems sort of pointless to do this in wikitext when it heavily depends on: {{#invoke:params|sequential}} and {{#invoke:error|error}} and in the subtemplates {{Template journal/arg}} and {{Template journal inline/arg}}: {{#invoke:string|find}}, {{#invoke:string|sublength}}, {{#invoke:string|str_find}} and {{#invoke:string|replace}}. In summary, I disagree with your first point and definitely agree with the subsequent two points. I am not a fan of the proscribed spacing and as much as the arguments can be italicized, I do not think it should be automatically italicized but rather such should be provided by the wikitext author employing the likes of {{var}}, {{var serif}}, etc. —Uzume (talk) 10:44, 2 June 2024 (UTC)
Proposal for format parameter based on TemplateData
[edit]I propose that we add a new |format=
parameter to this template using the format provided by mw:Help:TemplateData § Custom formats, eg. {{_|_=_}}
. I am aware that one of the goals of this template is to standardize display across the documentation of many templates. While I value this goal, I think a more important goal is to standardize documentation and display within a documentation page for a particular template. I'd like to see examples and TemplateData synchronized in their whitespace handling.
There's a technical challenge of how to handle the brackets and vertical bar in the custom format string. Options:
- Create substitutions, so
{{_|_=_}}
becomes((_/_=_))
. This makes some sense given that{{tj}}
performs the same kind of substitutions on its other parameters. However, it would make it harder to cut and paste between this template and the TemplateData. - Insist that every value of this parameter be wrapped in
<nowiki>...</nowiki>
. I favor this option.
An additional related feature would be to have transclusions of {{tj}}
on a template documentation page pull the format automatically from the TemplateData, in the same way that {{CS1 config}} and {{Use mdy dates}} automatically set parameters throughout the page. (This would probably require Template:Format TemplateData to be used.) This would only be done where the first parameter matches the Template journal. Perhaps we would have a special value of |format=template default
or maybe an abbreviated |format=tdef
to activate this behavior. In theory, such a parameter could pull the format from the TemplateData of the referenced template even on other documentation pages besides its own documentation page using the TemplateData API. However, my guess is that may challenge template limits by making a lot of API requests.
Thoughts? Daask (talk) 01:36, 2 December 2024 (UTC)