Template talk:Libheader

From Rosetta Code
Revision as of 11:23, 22 April 2010 by rosettacode>Dgamey (template formmatting question 2nd parameter?)

What if we changed this template so it made a subheading for the library? That way people browsing Solutions by Library could see their library in the TOC. --Mwn3d 19:19, 15 September 2008 (UTC)

I put a little demo of what I want it to do in the Sandbox. --Mwn3d 16:17, 16 September 2008 (UTC)

I understand the motivation for this idea, but I don't think it makes much sense in general, because the template isn't always used to begin an alternative implementation. Often it begins the only implementation, in which case the language's section would have all its content in a single subsection, which would be silly. And when it does begin an alternative, one of the other alternatives is likely to not use any library, so we'd end up with something like this:
  • Foo Programming Language
    • Implementation without any libraries.
    • Bar Library
      • Implementation with the library.
Since the implementation without any libraries and the one with a library are logically on the same footing, it's counterintuitive for them to be in different levels of the section hierarchy. I suppose we could do something like this:
  • Foo Programming Language
    • Core language
      • Implementation without any libraries.
    • Bar Library
      • Implementation with the library.
but that's pretty ugly, I think. —Underscore 11:17, 22 September 2008 (UTC)
You know what? You're right. And when you're right you're right. And you? You're right. I'm glad I waited for someone to say something before I went and did it. With those cases you talked about I don't there's any good way to do it. Even if we added #link code to the template, some libraries are used in a couple of languages so we'd have to code in unique labels.--Mwn3d 16:56, 22 September 2008 (UTC)

Question on formatting produced by the template:

  • I've seen examples of this tag that assume you can write with 2 parameters. Parameter 1 being the wiki reference and parameter 2 being the content that gets written into the page. How hard is it to make this happen? And who do I bounce it off first? Currently if the Library page has underscores in the name they format and it looks like hell. --Dgamey 11:23, 22 April 2010 (UTC)