Template talk:Hyphenated word start

Latest comment: 5 years ago by in topic hyph-parameter

A cool idea, but it's probably too late to change now edit

It's probably too late to change now, but it would have been really cool if this could have been implemented to take inputs as

{{hyphenated word start|obser|vations}}


{{hyphenated word end|obser|vations}}

Hesperian 12:11, 19 February 2009 (UTC)Reply

That is a good idea. It isnt used much yet. It could be done with some AWB work; it wouldnt take long, so the texts would only look wrong for an hour or two. John Vandenberg (chat) 13:04, 19 February 2009 (UTC)Reply
I don't think AWB could do it. How do you deduce that "observations" - "obser" = "vations"? Hesperian 01:13, 20 February 2009 (UTC)Reply
The idea is a cleaner invocation syntax, right? I agree that it would be tidier. First-off, I'm not really here for a while, but here's my 2¢. The new invocations would have to glue the bits together to produce the whole word. This is for the 'title' attribute on both halves and the actually transcluded text from the 'end' template into mainspace. I've also just noticed that the 'start' template includes alt="{{{2|}}}" diff which should be removed; alt does nothing on a span element and MediaWiki seems to be stripping it out of the generated code. Removing it will simplify the migration a bit. There is also the whole bit about the required space in the implementation, which would indicate that this would be best done quite cautiously. I'd suggest a few tests with other template names and to then move them around. Cheers, Jack Merridew 07:52, 20 February 2009 (UTC)Reply
Good to see that this discussion got your attention Jack ;-)
In addition to the cleaner syntax, it would also be easier to use the proposed syntax, as it would allow the end invocation to the copy and pasted to the start of the next page, and only 'end'->'start' needs to be changed.
I've removed the "alt".
Using two new templates during the conversion will ensure the texts stay accurate, and will also ensure that if the conversion process halts, we can easily continue it.
Re AWB, you're right Hesperian .. I was thinking that the reluctant qualifier would do the trick (i.e. /(start|hws)(\|[A-Za-z]+?){2}/), but that will match |fragment|f rather than |fragment|fragment, and even that doesnt solve the problem of matching the end fragment.
It will be a one line python bot. John Vandenberg (chat) 11:00, 20 February 2009 (UTC)Reply
"reluctant qualifier"... it's all Greek to me. I do complex find and replaces with AWB, but I prefer to do it with a trivial substitution of a very clever filter template. Thus I had completely forgotten about AWB's find and replace capabilities, and was thinking in terms of parser functions. Anyhoo, I don't have a bot account so it's your job or bust. Hesperian 12:19, 20 February 2009 (UTC)Reply
Go for it. I've found the old syntax annoying. This, I think, was on of the bits I had to tweak to get the italic formatting to look right in mainspace. It would be a good test of a new implementation; i.e. verify that Franklandia still renders correctly when glued-up into:
Cheers, Jack Merridew (from a lame internet cafe) 10:43, 21 February 2009 (UTC)Reply

I'm joining this discussion a couple of years too late, but it's worth pointing out that the template, as it currently exists, easily allows you to have "hard" hyphens, for compound words where the hyphen is not dropped when joining together the two halves. For example, {{hyphenated word start|attorney|attorney-general}}. Any template in the new format would have to use some kind of optional flag to handle this, eg {{new template|attorney|general|keep_the_hyphen=1}} -- P.T. Aufrette (talk) 17:17, 7 April 2011 (UTC)Reply

There might also be some exotic situation where the unsplit word displays differently than a mere merger of the two halves, for instance using a ligature. Perhaps we might want shuf- and fle to become "shuffle" (with an ffl ligature) rather than "shuffle" (with individual letters f-f-l)? This is an admittedly strained example, but maybe it's an issue for non-English languages where letterforms change shape, sometimes drastically, depending on the surrounding letters (eg, Arabic, Hindi... but I don't know if those language use hyphenation). Again, the existing template could handle this trivially, while the proposed new form could not, at all. -- P.T. Aufrette (talk) 17:49, 7 April 2011 (UTC)Reply
The classic example here is the old (i.e. pre-German orthography reform of 1996) German hyphenation rule in which ck was hyphenated as k-k; e.g. bäcker (baker) was hyphenated to bäk-ker. Under the reformed orthography that has now changed to bä-cker, but of course many people still prefer to use the older orthography. Hesperian 00:04, 8 April 2011 (UTC)Reply
Ah, interesting, I wasn't aware of that. In any case, I have now added an alternate version of the template calls, using named parameters:
  • {{hws |s= antici |e= pation }}
  • {{hwe |s= antici |e= pation }}
The regular version, using unnamed parameters, still works exactly as before:
  • {{hws |antici|anticipation}}
  • {{hwe |pation|anticipation}}
The regular version must be used for the relatively rare cases (as discussed above) where the unsplit word is not merely a simple unmodified fusion of the split halves. The documentation page has been updated. -- P.T. Aufrette (talk) 03:33, 8 April 2011 (UTC)Reply
PS, For specialized situations where an HTML link is split over two pages (with or without an embedded hyphenated word within the link text), see the new templates {{linkable phrase start}} and {{linkable phrase end}}. -- P.T. Aufrette (talk) 03:38, 8 April 2011 (UTC)Reply

Extraneous whitespace in main namespace from this template edit

This section is a placeholder for the status of extraneous whitespace especially blanks lines, added by this template.

As of 2009/11/13, the following pages exemplify this: the word "approach-ing" is split with the template at Page namespace Page:Wind in the Willows (1913).djvu/306 and Page:Wind in the Willows (1913).djvu/307; observe also the results with extraneous whitespace in the main namespace at The Wind in the Willows/Chapter 10. -- SoftlySaid (talk) 00:29, 14 November 2009 (UTC)Reply

Fixed [1], I think. Cygnis insignis (talk) 01:54, 14 November 2009 (UTC)Reply

it:Template:Pt edit

It.source template Pt (P for Page:, T for Text:) works a little differently. It simply shows {{{1}}} in nsPage: and {{{2}}} in ns0. It doesn't add hyphen. You can use it into a number of cases, not only in the case of hypenated words, and it can be used bot into the previous or the next page (I use it into the next page usually, because I usually know the previous half of the word... and there's too a subtle issue about blank spaces at the beginning of a row). A plain noinclude is used to avoid transcusion at all of the other half of the broken word.

So, if I've to render Ales- sandro, I write <noinclude>Ales-</noinclude> into the previous page, and {{Pt|sandro|Alessandro}} into the next one. Or I could write {{Pt|Ales-|Alessandro}}, then <noinclude>sandro </noinclude>, but it's important, in such case, that blank space too after "sandro" is included into noinclude... so easy to forget it! :-( --Alex brollo (talk) 15:26, 3 September 2010 (UTC)Reply

Causing an unwanted line break edit

See Kentucky_Resolutions_of_1798#544, and the pages Page:Debates in the Several State Conventions, v4.djvu/559 and Page:Debates in the Several State Conventions, v4.djvu/560. I just noticed this, so I don't know if this has been a problem for a long time or not. I'm wondering if it might have anything to do with the recent usability improvement for sections, but even when I turn that feature off I have the same problem. Suggestions? —Spangineer (háblame) 18:45, 23 November 2010 (UTC)Reply

Problem is unrelated to this template. The break is there even if you replace both templates with 'limited'. Hesperian 23:28, 23 November 2010 (UTC)Reply

hyph-parameter edit

Example 2a gives "hyph= ", but it says that it is transcluded in the page-namespace as "mother-". Is that correct? --Dick Bos (talk) 19:52, 26 April 2018 (UTC)Reply

@Dick Bos: I suspect you missed the other parameter in both the 2a examples is "s=mother-" (note the trailing hyphen.) Maybe the example is a bit overly-contrived but it does accurately convey the operation of the template. 01:02, 27 April 2018 (UTC)Reply