Jump to content

Template talk:USPL

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:USPL/doc)

Pub.L.

[edit]

Linking the text "Pub.L." to Public law for Congresses before 100 seems spurious. -- davidz (talk) 08:28, 3 September 2008 (UTC)[reply]

Moved from User talk:markles

The link on "Pub.L." should explain the abbreviation. The absence of a link seems preferable to Public law. Public_law#Alternate_usage gets close, but linking to a subsection seems fragile. An article like United States Statutes at Large seems needed.

Until an article on US Public Law citation exists to link to, I contemplate adding {{Anchor|PubL}} <!-- [[Template:USPL]] links here. --> to Public_law#Alternate_usage and linking "Pub.L." in Template:USPL to it.

As this will have consequences for many pages, I though I'd ask first.

Some of the articles that link to Public law seem to expect Public_law#Alternate_usage.

-- davidz (talk) 20:29, 3 September 2008 (UTC)[reply]

Did it. Still ugly, but an improvement. -- davidz (talk) 20:18, 4 September 2008 (UTC)[reply]

Thanks Markles, much better than my kludge. You made it much more logical by creating Public law (United States) and redirecting it to Act of Congress, with the text on public law from Public law#Alternate usage added to Act of Congress#Public Law, and "Pub.L." linking to Public law (United States). Arriving at Act of Congress from the link on "Pub.L." still risks confusing a reader. Any objection to linking "Pub.L." to Public law (United States)#Public Law? -- davidz (talk) 18:20, 5 September 2008 (UTC)[reply]

"Public law (United States)#Public Law" seems redundant. The statement at the top of the article (namely, "Public law (United States) redirects here") makes it clear why the reader landed there. That's what the statement is for. —Markles 19:13, 5 September 2008 (UTC)[reply]

In the meantime, Public Law (United States)" redirects to Act of Congress. Also, can someone explain in a different way why mentioning Congresses below 100 doesn't link to anything? E.g. {{USPL|89|236}}, which results in Pub. L. 86–236 (Immigration and Nationality Act of 1965)? -- Dandv(talk|contribs) 09:47, 27 August 2012 (UTC)[reply]

Messed up display

[edit]

How did the edit to this template fix the messed up display?—Markles 11:34, 15 December 2008 (UTC)[reply]

The problem noted in the documentation was that on the template page itself the template displayed an error message. error: unrecognised punctuation character "{"
This edit made the first expression evaluate to if 0<100 ... , but because of the noinclude codes, this only affects the template page itself (not transclusions).
So now on the template page it displays Pub.L. {{{1}}}-{{{2}}}. I tested various uses of the template, and the change did not appear to affect them.
I wasn't quite clear if the question was about the mechanics of how the fix worked, or what the effect of the fix was. Hope this helps address the question. Zodon (talk) 23:17, 15 December 2008 (UTC)[reply]
I changed the code to fix it another way. Added a check to see if parameter 1 is empty, if so it displays an error message. (That way it gives more useful feedback on pages where this is used, also helps fix the problem with templates that call this one.) Zodon (talk) 08:16, 17 December 2008 (UTC)[reply]
[edit]

I suggest changing the template so it links to the .pdf version, not the plain text version. My reasons are: (1) .pdf is more readable; and (2) .pdf is more authoritative. For example, the plain text version contains marginal comment codes embedded in the text, whereas the .pdf version contains those comments in the margin. Compare .pdf version of ARRA with the plain text version of ARRA. (The downside to my suggestion: .pdf may take longer to load, especially for large laws such as ARRA.) --Matjamoe (talk) 18:32, 21 April 2009 (UTC)[reply]

  • I'm inclined to oppose. I, for one, prefer the text versions over pdfs. PDFs are more cumbersome and not always as searchable. I didn't know that the pdf was more authoritative. The text version is easier to copy-and-paste. However, the pdfs have proper indenting. If there's a consensus here to change it, then I'll change the code myself.—Markles 22:57, 21 April 2009 (UTC)[reply]
  • Here's why I say .pdf is more authoritative and accurate:
1. The .pdf files (since May, 2007) are issued with a GPO certificate and stamped as "AUTHENTICATED U.S. GOVERNMENT INFORMATION." The plain-text files are not authenticated in this manner.
2. The .pdf files are correctly paginated with their legal statutory citations within the United States Statutes at Large (e.g., "123 Stat. 115"). The plain-text files simply have the bracketed page numbers embedded in the text, but without the proper page breaks.
  • Perhaps I wasn't clear. What I mean to say is, plain text, by its nature, doesn't have page breaks. The pages will break differently depending on the user's hardware setup. The Statutes at Large page breaks will be noted on the plain-text document, but that doesn't mean the pages will break there. -Matjamoe (talk) 18:42, 23 April 2009 (UTC)[reply]
3. The .pdf files have a variety of marginal notes and citations for each law, as added by the Office of the Federal Register, published either in the header or in side notes. This information includes the public law number, date of enactment, bill number, popular name of the law, Statutes at Large citation, U.S. Code citation, and legislative history. The plain-text files have the same information, but instead of being marginal, it is embedded in the text itself, and therefore very difficult to understand.
For example, here's a quote from 123 Stat. 120 in plain text:
            (2) Timing for fiscal year 2009.--
        Not <<NOTE: Deadline.>> later than 60 days after the date of 
        enactment of this Act, the Secretary shall make available to 
        States amounts for fiscal year 2009 under paragraph (1). 
I suggest that this is actually an inaccuracy. A researcher searching for "Not later than 60 days" in the plain-text version would not find it here, because those words do not appear in that sequence in the file. Yet, those words are in that sequence in the law. That sequence is reflected in the .pdf file, and a search for "Not later than 60 days" in the .pdf file will find this quote (with the word "Deadline" neatly noted in the margin).
4. Fonts are accurate only in the .pdf file. This is particularly noticable in the headings, where the plain text file displays small caps in lower case. Similarly, italicizations are ignored in the plain-text files. In the example above, "Timing for fiscal year 2009.--" is actually "TIMING FOR FISCAL YEAR 2009.—"
  • True, although some of the lower-level headings are actually all small letters (even beginnings of sentences and proper nouns) in plain text. It's distracting. Also, italics (for, e.g., provisos) don't show up, which is really useful in reading. -Matjamoe (talk) 18:42, 23 April 2009 (UTC)[reply]
5. Finally, I would simply note that the .pdf files are a whole lot more readable, and, as far as I know, just as searchable as plain text. (In some sense, more so—given point no. 3 above.) The .pdf file is what a typical Wikipedia user would hope to see when trying to access a Federal law; moreover, it is exactly what the user would see if the user had accessed the same law in a book. -Matjamoe (talk) 14:33, 23 April 2009 (UTC)[reply]
  • See my point immediately above.
  • Ok, those are all good points and pdf is the better option. The real reason, I'll admit, for my preference of text over pdf is that:
    1. My slow computer can better handle text over pdfs;
    2. I've been doing a lot of importing into Wikisource and I use the same code for {{USPL}} there (but it doesn't have to be the same); and
    3. I created this template (and many of its brethren), and I'm a little protective of them, especially this one.
  • All of your arguments are right on point and this is a collaborative project. Therefore, I'll make the change.Markles 16:22, 23 April 2009 (UTC)[reply]
  • But first: is there there a way to link to a site that gives the user the choice? THOMAS, for example, gives the reader the option here: http://thomas.loc.gov/cgi-bin/bdquery/L?d111:./list/bd/d111pl.lst:1[1-13](Public_Laws)|TOM:/bss/d111query.html|. —Markles 16:22, 23 April 2009 (UTC)[reply]
  • I'm all for giving the user the choice. If you can make it so that the Pub.L. link sends the user to a TXT/PDF option page, that's clearly the best solution. (In fact, the reason I started this discussion was because of a user edit in the ARRA page, in which an editor had added a second citation in the text to give the reader a .pdf choice. I removed the edit because it unnecessarily bogged down the opening line of a major article, and the .pdf option was available in the infobox, but I think the editor's identification of a need for a .pdf option was legitimate.) -Matjamoe (talk) 18:42, 23 April 2009 (UTC)[reply]
  • My solution is based on your example above, but I can't make the code work. (I can't make the code work because I can't figure out how to get Wikipedia to pass square brackets to a URL.) Here's my solution:


http://thomas.loc.gov/cgi-bin/bdquery/L?d111:./list/bd/d111pl.lst:5[5-5](Public_Law_111-5)
where "111" is {{{1}}} throughout, and "5" is {{{2}}} throughout (no leading zeroes). If you can figure out how to get Wikipedia to pass the square brackets to the URL, it would be a good solution. (Note: With a leading zero for 93-99, you can actually get this solution to return a result all the way back to the 93rd Congress!) -Matjamoe (talk) 22:01, 23 April 2009 (UTC)[reply]
  • Here's an interim solution that doesn't involve brackets.

{{#if:{{{1|}}}|{{#ifexpr: {{{1}}}<93|[[Public law (United States)|Pub.L.]] {{{1}}}-{{{2}}}|{{#ifexpr: {{{1}}}<100|[http://thomas.loc.gov/cgi-bin/bdquery/L?d0{{{1}}}:./list/bd/d0{{{1}}}pl.lst:{{{2}}}(Public_Laws_beginning_with_Public_Law_{{{1}}}-{{{2}}}) Pub.L. {{{1}}}-{{{2}}}]|[http://thomas.loc.gov/cgi-bin/bdquery/L?d{{{1}}}:./list/bd/d{{{1}}}pl.lst:{{{2}}}(Public_Laws_beginning_with_Public_Law_{{{1}}}-{{{2}}}) Pub.L. {{{1}}}-{{{2}}}]}}}}|<strong class="error"><nowiki>{{USPL|Congress|Ordinal}} missing Congress</nowiki></strong>}}<noinclude> {{Documentation}} </noinclude>

Unfortunately, this produces a long list of public laws, only the first of which is relevant to the reader. Still, it's easy to locate the law of interest, as it's at the top of the list—and the fact that it is at the top of the list is disclosed to the reader in the heading. What do you think? -Matjamoe (talk) 12:52, 6 May 2009 (UTC)[reply]
If you'd like to try this out, I put this template draft at User:Matjamoe/Sandbox/20090511. Here are some examples:
Matjamoe (talk) 07:57, 11 May 2009 (UTC)[reply]
  • I just changed the code based on a suggestion from s:Template:USPL. Please test it. Is it OK?15:01, 11 May 2009 (UTC)
  • Very nice. It is clearly the best solution for the 104th Congress forward, and it seems to be the best solution for the 100th through the 103rd Congresses as well. But I think we could do better for the 93rd through 99th Congresses. How about this template? Here it is in action:
Matjamoe (talk) 14:25, 12 May 2009 (UTC)[reply]

assembler.law.cornell.edu is down

[edit]

As of right now, templates like {{USPL|103|50}} expand to Pub. L. 103–50 (http://assembler.law.cornell.edu/usc-cgi/get_external.cgi?type=pubL&target=103-50), and http://assembler.law.cornell.edu itself times out. Dandv(talk|contribs) 08:45, 27 August 2012 (UTC)[reply]

Removing "assembler" works, though the result looks somewhat unstyled? -- Dandv(talk|contribs) 02:36, 28 August 2012 (UTC)[reply]

New URL proposal

[edit]

I propose we use LegisWorks.org.[1][2] LegisWorks.org can be used used for all public laws using their public law numbers (60th-current congress) or using their congress, chapter and session numbers (all other congresses), not just the GPO's 104th-current congresses (1995-) using the current LII link. {{USPL/sandbox}} and {{USPL/testcases}} have been updated. The Statutes at Large repeat public law numbers between sessions of the same congress for the 57th-59th congresses, which LegisWorks.org's URL scheme supports, so if we accept the session number as an optional third parameter we can also directly support these and all other public laws; else LegisWorks.org provides a disambiguation page. I also think the Wikisource effort could eventually be used along with this material to link directly to GPO or to Wikisource using this template. Int21h (talk) 21:41, 29 July 2014 (UTC) Int21h (talk) 00:29, 30 July 2014 (UTC)[reply]

  • I think the chapters and Public Laws that require the session information just need their own template (maybe {{USCh}} or something else - and if people find it and use it, that's great for the citation's usability, but the real reason to go with Legisworks/LegisLink for all of the Public Laws from 1907-1951 and through to the present is that the 1907-1951 files are nowhere else coupled with using a simple URL approach to call up everything from 1907 to the present. Joecarmel (talk) 22:11, 30 July 2014 (UTC) P.S. Thanks for proposing this! Joecarmel (talk) 22:12, 30 July 2014 (UTC)[reply]
  • I support making this change to use LegisWorks.org. It looks awesome! As far as creating a separate template for items that require session information... I have mixed feelings. It'd be nice to have one template with multiple functions so that people don't have to go find the other one, but I suppose anyone trying to use the public law template is probably going to be willing to look for the more exact version. I don't have any of the knowledge necessary to make such a change myself, so I'll go along with whatever the group chooses. I definitely support starting to use legisworks.org for the general links though. Thanks! HistoricMN44 (talk) 13:33, 31 July 2014 (UTC)[reply]

THOMAS / GPO / FDSys -> Congress.gov

[edit]
  • thomas.loc.gov is dead and redirects to congress.gov. Old links work for backwards compatibility and text only systems. Please update the template to use the congress.gov PDF links. They are formatted as such: https://www.congress.gov/114/plaws/publ17/PLAW-114publ17.pdf. I may endeavor to do this work myself but I've never done a template and it's never too late to learn :). — Preceding unsigned comment added by Asherkobin (talkcontribs) 13:51, 8 May 2018 (UTC)[reply]
    • This template does not use THOMAS.loc.gov. It uses legislink which goes to GPO.gov. Were you meaning to tag a different template?—GoldRingChip 14:48, 8 May 2018 (UTC)[reply]
      • Oh, you're right, but these documents are duplicated among several government websites. GPO.gov/fdsys is being deprecated as well ("In December 2018, FDsys will be replaced by govinfo"). The public law on govinfo (https://www.govinfo.gov/content/pkg/PLAW-114publ17/pdf/PLAW-114publ17.pdf) is the same as the one on congress.gov. I would suggest using congress.gov for the public law template since congress.gov also houses the extensive legislative history which the USBill template uses. And the USBill/congress.gov page has direct links to both text and aforementioned PDF of the public law. An updated USPL template could link to both text and PDF from congress.gov but I would prefer just the PDF since that appears to be "authoritative" -- as well discussed in the "Link to .pdf rather than plain text?" section above. See https://www.congress.gov/bill/114th-congress/house-bill/1191 under the "Latest Action" caption.
[edit]

At some point, in the process of adding and removing cases, the wikilinking for Pub.L. was removed. It was not mentioned in edit summaries or talk, so I'm assuming it wasn't intentional. Still, I thought I'd mention it here before putting it back.

Also, I want to change the spaces to &nbsp; to prevent line breaks in the middle of the cite.

Both are consistent with {{USStat}}, {{USFR}}, {{Ussc}}, etc.

Any issues before I proceed? — Preceding unsigned comment added by AlanM1 (talkcontribs) 01:52, 29 January 2019 (UTC)[reply]

 Done. I added trapping for missing Ordinal param, too. —[AlanM1(talk)]— 05:45, 29 January 2019 (UTC)[reply]

LegisWorks going away

[edit]

At the end of this month, LegisWorks.org and LegisLink.org will be discontinued. I think using http://uscode.house.gov is the better way to go. Joecarmel (talk) 20:44, 6 June 2019 (UTC)[reply]

Joecarmel has actually handed the reins of LegisLink.org over to me to incorporate the functionality into https://uslaw.link. My intention is to keep the permalinks used in this template working indefinitely. TwigsCogito (talk) 11:17, 18 August 2019 (UTC)[reply]

Does the USPL template provide a good user experience? Also documentation is wrong.

[edit]

I updated a recent freeform Pub. L reference to use this template this morning (United States Foreign Intelligence Surveillance Court here), and I am entirely unsure that it was the right call. The original author had

and it became

Pub.L. 110–261, the Foreign Intelligence Surveillance Act of 1978 Amendments Act of 2008

Just from the looking at the rendered wiki page:

  1. the name of the law is no longer part of the link (so from a Fitts's law perspective, it's objectively worse)
  2. Not everyone knows the "Pub.L." abbreviation; yeah, they can probably figure it out, but it doesn't seem better
  3. There's a link to Act of Congress and if you click on that expecting to get to the law, you go to the wrong place

Then looking at the result of the link, it lands on https://uslaw.link/citation/us-law/public/110/261 which is a landing page with 8 links, the first of which is a PDF (not a great experience), several of which are metadata links, and 5 of which are tangential ("parallel citations"). Whereas the original took you directly to HTML text of the law, albeit formatted in <pre> so it renders in Courier.

I think it's generally accepted that many people don't follow links, and every time you interpose a link you lose a lot of readers. And here it's worse because it's not apparent which of the links to click to see the law fastest and easiest. It seems like not the first one (since it downloads a PDF), and not the second (metadata), although the 3rd is ok (govtrack.us), except it's not an official US Government link. This seems like an awful lot of cognitive load.

On the other hand, I realize maybe not everyone agrees with me, particularly on the desirability of having a PDF link (maybe some people would prefer it in the first instance)!

I'm not sure that I have a concrete suggestion here, other than it seems like the template should have an optional 3rd parameter to add anchor text. But I'm concerned that this is not linking to the best place, that the link target is not canonical (not a US Government resource), the link target imposes too high a cognitive load and loses clicks, and the formatting of the link is not user-oriented. It makes me think I may be better off not using the template (result: inconsistent style throughout Wikipedia; hardly the worst thing), but that doesn't seem great either.

As a minor note, the template documentation (transcluded from {{United States legal citation templates}}) says it links to "Public Law via GPO FDsys" which is kind of what I expected it to do, not link to a volunteer website (legislink.org? uslaw.link? Are they the same? Is one deprecated?). I was going to update the table to reflect what this template actually does, but I decided to hold off in case that was about to change (perhaps that's silly).

I am happy to do the technical/mechanical work of updating the template, but of course I wouldn't want to do anything without concensus of some sort.

What say you all? Thanks! jhawkinson (talk) 13:35, 19 October 2020 (UTC)[reply]

@Davidzundel, GoldRingChip, Matjamoe, Int21h, HistoricMN44, Asherkobin, AlanM1, Joecarmel, and TwigsCogito: You all have been involved in discussions of related issues on this talk previously, do you have anything to offer on my comments above? (Maybe I should summarize the past positions taken and offer my take on them in light of the above, but that's going to be awful long and I want to give other people a chance to react first) Thanks. jhawkinson (talk) 02:51, 20 October 2020 (UTC)[reply]
@Jhawkinson: Legislink.org was, I think, the previous site we used as an intermediary for lots of legal refs, since it did some of the translations necessary for some types of links. The maintainer of that site chose to discontinue it which is where uslaw.link came in I imagine. (Now confirmed by reading the section above. Doh!)
One issue that wasn't mentioned above is that the link above doesn't work if you have a script blocker, which is also undesirable. I would prefer the link to https://www.govinfo.gov/app/details/PLAW-110publ261 , though this is a metadata page that Jhawkinson doesn't like. The alternative (the PDF) is at https://www.govinfo.gov/link/plaw/110/public/261?link-type=pdf . Some research would be required to find out if there are any special cases where translation is required for the congress and law numbers or if they can just be plugged into the link as-is.
As far as what is linked, I think it's probably consistent with other types of legal links, where the type is first and linked to the article that describes the type (which should probably be to the section Act of Congress#Public law, private law, designation instead) and then the numeric part of the law provides the external link. This avoids excessively long links (which some find objectionable) for the often long-winded titles. —[AlanM1 (talk)]— 03:36, 20 October 2020 (UTC)[reply]
I do think govinfo is a reasonable place to link. I would suggest that because we can't resolve the format issue, we should link to both, and give one primacy, and make it clear. And, if there's really truly a market for the metadata page (why???), we can link to that as well. So something like:
And then perhaps mouseover on "Pub.L" could offer "110th Congress Public Law 261" so there is still a link to Public Law for people who want it, but it's not getting in the way of other people. jhawkinson (talk) 03:45, 20 October 2020 (UTC)[reply]
There are special cases for public law numbers. Before some date, forget when they are ambiguous due to .. I want to say they were duplicated across sessions or something. int21h (talk · contribs · email) 14:54, 20 October 2020 (UTC)[reply]
Hi all. I'm the owner of uslaw.link. Of course the trade-offs between PDF vs metadata vs text are all there and I don't have much to add to that, except that you need to keep in mind that GovInfo.gov can only resolve these links for recent time periods. That's why legislink and uslaw.link were started in the first place. I would also caution against preferring a primary source material just for its own sake. Those materials exist _because_ projects like legislink, uslaw.link, and others have pushed Congress to make this information available. If you link directly to GovInfo.gov, you better consider whether you'll also be taking over the advocacy, networking, and manual labor that Joe and I and our other colleagues have done for the last several decades (and yes, please take that over!) or else you may find in a few years that Wikipedia is without anywhere to link for these resources at all! TwigsCogito (talk) 19:13, 21 October 2020 (UTC)[reply]

This is a public law number template, which is merely an identifier, it is only one of many identifiers. Other identifiers include, i.e. the "short title" of the act, and maybe an alt text parameter should be added. On another note, something we didn't have before is the GPO govinfo Link Service e.g. https://www.govinfo.gov/link/plaw/110/public/261?link-type=html for the example at hand, so we should consider that. But again public law number is different from the short name. int21h (talk · contribs · email) 14:27, 20 October 2020 (UTC)[reply]

Summarizing and responding

[edit]

Sorry for the delay responding. Thank you all for your thoughts! The above comments were helpful, although the way they got formatted, it's a bit tough to review. Here's my attempt to summarize them, and then respond (I hope this does not cause more confusion than help):

AlanM1:
> Legislink.org was, I think, the previous site we used as an intermediary for lots of legal refs, since it did some of the translations necessary for some types of links. The maintainer of that site chose to discontinue it which is where uslaw.link came in I imagine.

If so, at a minimum the template should move from legislink.org to uslaw.link, right? There's no reason every click on a link should run through a redirect of a now-defunct site?

> As far as what is linked, I think it's probably consistent with other types of legal links, where the type is first and linked to the article that describes the type (which should probably be to the section Act of Congress#Public law, private law, designation instead) and then the numeric part of the law provides the external link. This avoids excessively long links (which some find objectionable) for the often long-winded titles.

This does not seem compelling to me. Longer link anchors are easier for people to click (that's what I meant when referring to Fitt's Law), and the current links are particularly short, which is compounded by the presence of the far-less-useful "Pub. L." link that takes up half the width of the clickable link. Look at the example that I started with at the beginning of this topic ("I am entirely unsure that it was the right call"). Furthermore, there's limited precedent both ways. {{cite court}} takes a case caption, but it links to a wikipedia page for the case, not to the case's reporter; of course, there are unlikely to be wikipedia pages for most Public Laws (but there are for some!). {{UnitedStatesCode2}} includes a description parameter, but it does not include it as part of the link's anchor. I feel pretty strongly that this is important to making these links accessible and useful to readers of Wikipedia, but if there's a strong objection about template consistency, I'm happy to have that discussion. Would it be better done at Category talk:United States law templates or Category talk:Law citation templates or Wikipedia talk:WikiProject Law or somewhere else?

int21h:
> There are special cases for public law numbers. Before some date, forget when they are ambiguous due to .. I want to say they were duplicated across sessions or something

Yes. You can get a feel for this from the LHS of this diff. But I think basically, legislink/uslaw are very helpful prior to the 104th Congress, but perhaps not as much after, where govinfo seems to work consistently.

TwigsCogito:
> Hi all. I'm the owner of uslaw.link.

I assume you agree that Wikipedia should use uslaw in favor of legislink? Is there anything we should know or API documentation for legislink?

> I would also caution against preferring a primary source material just for its own sake. Those materials exist _because_ projects like legislink, uslaw.link, and others have pushed Congress to make this information available. If you link directly to GovInfo.gov, you better consider whether you'll also be taking over the advocacy, networking, and manual labor that Joe and I and our other colleagues have done for the last several decades (and yes, please take that over!) or else you may find in a few years that Wikipedia is without anywhere to link for these resources at all!

I don't really buy this. Advocacy is important, but it's independent of where Wikipedia links. And if the ultimate end result is govinfo and Wikipedia's template can easily take us there where appropriate, there is no good reason to add a 3rd party website dependency where we don't need it. And this is a situation where we take users to the primary source material, so it's not as if there is an argument that a "secondary source" (if that's really what it is) is superior, except for the very important case of pre-104th Congress.


(aside: I am confused why these templates seem to be under Wikiproject US rather than Wikiproject Law.)

In any event, there are multiple independent aspects of this. I propose:

1. Adding a title parameter and bringing that into the link anchor:

(I omit the metadata link suggested above, because I didn't hear anyone advocating for it or explaining why it was necessary. But easy to add in, too.)

2. Changing the links to go to govinfo's link service (mentioned by int21h) for the 104th-and-up Congress, while using uslaw for the older Congresse.

3. Change "Pub L." so on a mouseover if offers a dropdrown that links to Act of Congress#Public law, so there is less chance of accidently clicking on the definition of Public Law when you actually want to click on the law itself (usability improvement).

Thoughts or objections? Thank you! jhawkinson (talk) 22:44, 1 November 2020 (UTC)[reply]

 Done, although for (3), the effect I had intended seems to require javascript and I did not want to dive deeply into how the code behind mw:Reference Tooltips, so I instead used {{abbrlink}} which is quite similar to what we had before, except the mouse cursor is distinguishable over the "Pub.L." so one is less likely to inadvertently click it while seeking the actual law. jhawkinson (talk) 12:44, 7 November 2020 (UTC)[reply]

govtrack.us for recent Public Laws?

[edit]

Just want to note, govtrack.us is generally faster to update than govinfo.gov, so pointing directly to the govinfo.gov often results in a broken link for very new legislation. I'm not sure if that's a huge deal, since the site gets updated after a week or two, but for example, right now the links generated for newest 11 laws (which were passed October 30th) are deadlinks. Just FYI. 〈 Forbes72 | Talk 〉 06:40, 9 November 2020 (UTC)[reply]

Thanks Forbes72, for highlighting this. Just to be clear what we're talking about, S.4762 passed the House on Oct. 1 and was signed by the President on Oct. 30. Then OFR PENS assigned it Public Law #116-193 on Nov. 2. Today it's nine days later, and the state of play is:
  • govinfo.gov's text link and metadata link are bad -- they return HTTP 400 (aka "Bad Request") and say "Problem detected."
  • legislink, which the template used to use until recently, redirects to uslaw.link (as it has for years)
  • uslaw.link offers 2 links to GPO govinfo.gov which, as above, are bad; as well as 2 links to govtrack's HTML and metadata pages for the bill (but not the law).
I think, technically, this is correct. The law is signed and assigned a P.L. number, but GPO has not actually published the law yet. In a perfect world we should distinguish the bill and the law, since although it isn't supposed to happen, sometimes the text of the published Law differs from the text of the bills that pass both houses, whether from technical corrections or formatting or horrible errors or what. But obviously giving users a bad link (what happens now) is not a good experience, and giving them a menu of 4 links where the first 2 are dead (what we used to do) is…not great but at least more usable. And there's a recency bias that makes it important to handle new laws well -- somebody hears about a newly passed law and people go to Wikipedia to read about it and edit pages about it, and they need to be able to cite things as well as they can.
So, we could:
(1) Leave it like it is, and accept this ugliness and bad usability
(2) Go back to using uslaw.link's database-based approach. Does this preclude linking to text and PDF as we currently do? I need to look more closely at uslaw.link's code to see?
(3) Go back to uslaw.link, but only for the current Congress (easy maintenance burden), or only for recent bills (extremely high maintenance burden).
(4) Supplement the current GPO links with uslaw.link's menu link (for the current Congress only?)
I don't find any of this particularly satisfactory, but (4) seems like the minimal change for right now that is at least better than (1), but part of that is me trying to avoid eating my own hat, so my judgement is definitely a bit clouded. Also, given that List of acts of the 116th United States Congress exists, I'm not sure the maintenance burden arguments are terribly good, since somebody (you, apparently, most recently!) keeps that up-to-date on a regular basis (tangential query: since the PENS email came out on Nov. 2 for 183 through 193, how come the updates came in 3 batches from Nov. 4–5? were you using another, slower, source?).
I'll do (4) with "(metadata)" right now, with the expectation that it is just an interim step. jhawkinson (talk) 10:41, 9 November 2020 (UTC)[reply]
> I need to look more closely at uslaw.link's code to see?
OK, it appears that uslaw.link scrapes govtrack.us, but does not scrape GPO govinfo. So there is no way for uslaw to tell us whether GPO's links are valid. It also does not have a mechanism for direct linking to the relevant govtrack URL (although such could be easily added). Also govtrack.us does not appear to have a direct linking endpoint resolves a P.L. number and takes us to the associated bill…I have not found its API documentation (which seems to still exist despite notices of deprecation) and haven't slogged through the source, but there does appear to be a search endpoint that works pretty reliably for the metadata page, i.e. https://www.govtrack.us/search?q=P.L. $CONGRESS-$BILL e.g. https://www.govtrack.us/search?q=P.L.+116-190. Unfortunately, I don't see a way to get it to return the text of the bill without a further click. So that means doing (2) does indeed appear to preclude linking to text or PDF in a way that works for the new bills without some amount of external development (but not necessarily a non-trivial amount). But I might have overlooked something! jhawkinson (talk) 00:01, 10 November 2020 (UTC)[reply]
My personal inclination is toward (3a), uslaw for current congress, direct link to govinfo.gov otherwise, but (2) and (4) also sound ok. (1) seems less than great because of the deadlinks. I agree 3b is too high a maintenance burden. You seem to understand the back-end stuff better than I do, so I trust your judgement here. As for the updates to the legislation list, I usually just check govtrack.us - the delay is just because I don't check for updates every day and I have to spend a little time to format/wikilink everything correctly. 〈 Forbes72 | Talk 〉 16:42, 10 November 2020 (UTC)[reply]
So, I only thought (3b) was too high a maintenance burden before I realized someone was editing the list of laws page every time there was a new law. With that in mind, it doesn't seem so bad at all. We could even create a hidden section of that page with a number for the latest law which could be updated whenever someone adds a law, or something else. Or a standalone template with one number in it that can be easily edited by non-experts without screwing up the whole template. It's probably a bad idea, but if we were to adopt the heuristic that most of the time GPO has everything except the last ten laws, then the template could substract ten from the last law and show the govtrack links for those last ten. As a goofy and terribly fragile proof of concept, here's a template that finds the highest P.L. number from the current list and subtracts ten: User:Jhawkinson/USPL (we definitely would not do it this way!). Maybe a better solution would be to write some automation that daily (or hourly or whatever) checks for new laws at GPO and then emails someone and tells them to update the template (or just updates it automatically). That's not unreasonable.
FYI, if you are interested in this stuff, OFR has a mailing list that gets an email whenever there is a new PL number assigned: https://www.archives.gov/federal-register/laws/updates.html. That is probably more efficient for you than checking govtrack periodically.
Of course, the ten law heuristic isn't great, since usually OFR releases batches of a handful of laws, if not individually. Ten seems to be somewhat of a high-water mark lately. But ideally we could dispense with the heuristic and just use what is actually on GPO's website. jhawkinson (talk) 21:38, 10 November 2020 (UTC)[reply]
Hey, thanks. I see they've got an RSS feed, which is a distinct improvement over checking indirectly. I'm willing to update the template manually at the end of the congress if that's the best way to keep the links tidy, but if we have to manually update a number more often than that, please find some other person/bot to take on that responsibility. Maybe there's a way to automatically find which laws are already published with GPO's API and point any newer citations towards uslaw.link? My knowledge of APIs is pretty rudimentary. 〈 Forbes72 | Talk 〉 05:40, 11 November 2020 (UTC)[reply]

Changing "(pdf)" to "(PDF)"

[edit]

(was: "Regarding the reversion of my edit of 22 June 2021")

Greetings and felicitations. On 22 June 2021‎ I made an edit, which was reverted by Jhawkinson. I made the edit because "PDF" is an initialism for "Portable Document File", and labeled it "minor" because it seemed to me to be a simple correction to the official rendering (note the title of its Wiki article), and did not require discussion here. This change was also in line with MOS:CAPSACRS. In view of these items, may I please have permission to change it back to "PDF" (in upper case)? —DocWatson42 (talk) 00:27, 1 July 2021 (UTC)[reply]

I re-titled this section so it's more clear to other editors. At present, this template produces output like:
Pub.L. 116–999 (menu; GPO has not yet published law)
Pub.L. 116–192: Reinvigorating Lending for the Future Act (text) (pdf)
and DocWatson42 proposes to change it to
Pub.L. 116–192: Reinvigorating Lending for the Future Act (text) (PDF)
a change which he made, and I subsequently reverted, for lack of discussion and lack of parity with the peer parenthesis (text; menu; etc.). Sure, PDF is an initialism, but at this point it's well-known term. In filenames, we frequently see filename.pdf in our daily lives, esp. in URLs (even if Windows users might see FILENAME.PDF on their local filesystems, but not really anymore). I think the usage here is more akin to the filename usage, and typographically is a much better fit in lowercase rather than the uppercase, which draws attention in a way that the content does not warrant. (Another option would be to use SMALL CAPS or something, but that feels excessively fancy and probably introduces some MOS issues, although I don't know for sure). I don't think that MOS:CAPSACRS is particularly relevant here, this is not the word PDF used in running text, but rather used in a targeted link. I think it is almost totally an aesthetic styling question that the MOS doesn't address, leaving us free to do as we wish, but perhaps there is prior art in other templates we should look to? But again, I don't like the idea of the PDF link dominating the rest which is he effect that all caps has. Thanks. (p.s.: WP:FIXIT suggests a less aggressive stance for templates. ymmv, of course.) jhawkinson (talk) 00:46, 1 July 2021 (UTC)[reply]
I would add that the file extension (".pdf") is not the same as the name of the format ("PDF"). Compare GIF and .gif, and PNG and .png. —DocWatson42 (talk) 00:58, 1 July 2021 (UTC)[reply]
So it's not just a discussion between two editors, I see pdf and PDF as both acceptable. I grew up seeing both used. At the end of the day, the direct hyperlink to the law is the most important item here. – The Grid (talk) 13:41, 24 November 2021 (UTC)[reply]

USLM

[edit]

I have edited the {{USPL/sandbox}} to use the USLM version for the 113th Congress onward. The United States Legislative Markup is based upon Akoma Ntoso and renders to HTML on all web browsers by default. This HTML version is superior to both the TXT and PDF version and should be used by default. int21h (talk · contribs · email) 17:06, 24 December 2021 (UTC)[reply]

Proposed sandbox changes?

[edit]

@Int21h: Today, you made two edits to the sandbox that appear to remove the "(menu; GPO has not yet published law)" as well as the "(HTML)" and "(text)" markers. Also some changes to the PDF punctuation. Although I don't like the "GPO has not yet published law" parenthesis, I think it's important and haven't come up with a better way to express the same concept. Can you please discuss the intent of your changes here?

I am also a little confused about the state of the sandbox, which appears to have diverged from the actual template by 8 revisions in December, although I didn't look at them in detail. I think that Template:USPL/testcases is giving us a fair representation of where we are today in comparison with the sandbox. Thanks for clarifying. jhawkinson (talk)

I removed the above USLM code (above stale discussion) so I could bring a proposal for a change to the parentheses and suffixes. The edits previous to that were to use the switch statement without really changing the output, to ease the readability of the code; I think it should be imported into the template for the same reasons.
The suffixes are awfully verbose, and the lack of a clear non-hypertext region makes it look like one giant link. I think it's reasonable to assume that the default link will be HTML or even plain text, without exclaiming as much. The "PDF" symbol warning is from a day long past when Internet Explorer and Acrobat ruled the waves, and are an anachronism that should be left to MediaWiki and the web browser (to visually cue link types for the user) inasmuch as possible. And hey it's a sandbox, reset it and edit away! int21h (talk · contribs · email) 23:57, 17 May 2022 (UTC)[reply]
Int21h, thanks for clarifying. I agree the "not yet published law" text is verbose, but I think we are significantly better off with it than nothing. Do you have a proposal other than eliminating it?
It is indeed one giant link. I think that's the right thing for long text, but again, I'd love to see other proposals.
I disagree as to anachronisms. It makes a big difference to me as a user/reader whether clicking a link will download a PDF and render it (whether in the browser or not) versus an HTML page. It has implications about the length of document (i.e. it is not definitive but triggers heuristics), download time, file and document management (people save PDFs in ways that they do not save HTML), ability to cite/deep link/reference a page number, etc. I'll grant that there are plenty of people who do not distinguish and "a link is a link," but I don't think we need to penalize those who would prefer to know what they are getting.
I agree it would be nicer to leave it to MediaWiki to cue the link type, but I don't think we have a mechanism to do that here. And because the HTML can lead to either a menu (when GPO hasn't published it) or the text of the statute (after GPOs has done so), it is helpful to distinguish where we are taking people.
I'm not going to undo your work in the sandbox while you're working on it! I took your edits as a suggestion that you were likely to make those changes or similar ones, so I wanted to initiate a discussion because I feel strongly about some of these issues.
Thanks! jhawkinson (talk) 00:11, 18 May 2022 (UTC)[reply]

Space in "Pub. L."?

[edit]

@Human.: I don't think we are better off with the space. Especially because this is a link, and also because it's kind of a single semantic unit. Absent compelling objection, I'll revert your recent edit soon, but I wanted to offer you the chance to make a case for it. Thanks. jhawkinson (talk) 04:04, 3 January 2023 (UTC)[reply]

I disagree. This template is used mainly in infoboxes to cite public laws and per WP:MOSLEGAL, the generally accepted legal citation style should be used, which for the United States is Bluebook and ALWD. According to Bluebook, ALWD and The Indigo Book, "Pub. L." (with a space) should be used. Official sources, like GPO's govinfo.gov, United States Code and Library of Congress use "Pub. L." (with a space) as well. And also in the Act of Congress article, "Pub. L." is used. Human. (talk) 20:35, 3 January 2023 (UTC)[reply]
[edit]

It appears that the domain linked to in this template, uslaw.link, which hosts an instance of the open source legal link resolution/permalinking service on GitHub, here, is down. The server is returning error 502 (Bad Gateway). I have notified the maintainer of that GitHub repo, who presumably maintains the server and domain at uslaw.link via GitHub issues, but in the mean time it seems that all citations using this template will have unresolved/bad links, unless someone else is willing to clone the repo and mirror the service on another server and edit this template.

Hermes Thrice Great (talk) 19:43, 22 January 2024 (UTC)[reply]

@Hermes Thrice Great: Thanks for pointing this out. I just brought this up on Template_talk:USStat#LegisLink_is_down, but seems you already started the discussion here. The template had been set up with legislink as a backup since GPO's website is slow to update, but since Legislink has priority in the template, we now have for example List of acts of the 118th United States Congress incorrectly saying certain laws haven't been published, when the GPO links are actually working fine. 〈 Forbes72 | Talk 〉 03:29, 31 January 2024 (UTC)[reply]
I've updated the template to accept entries up to USPL 118-35 now, per govinfo.gov. 〈 Forbes72 | Talk 〉 03:42, 31 January 2024 (UTC)[reply]
The site is back up now, so no immediate issue anymore. 〈 Forbes72 | Talk 〉 01:36, 17 February 2024 (UTC)[reply]