diff --git a/src/cmos/formatter.py b/src/cmos/formatter.py index 715eda9..76da62f 100644 --- a/src/cmos/formatter.py +++ b/src/cmos/formatter.py @@ -73,13 +73,112 @@ Rules you must follow (CMOS 18th edition specifically): 11. Web page format: Author-or-Organization. "Page Title." Site Name. Effective/Published Date. URL. -12. PRESERVE date qualifiers from the input. If the source provides a - qualified date such as "Effective November 15, 2023", "Published March - 3, 2024", "Accessed October 1, 2022", "Posted June 7", "Last modified - ...", or "Updated ...", keep the qualifier word in the output — do not - silently drop it. The qualifier is semantically meaningful: "Effective" - dates a policy's activation, "Accessed" marks when the researcher saw - the page, etc. CMOS 18 preserves these distinctions. +12. PRESERVE date qualifiers from the input FOR WEB-PAGE SOURCES ONLY. + For web pages (websites, blogs, online policies, etc.), if the source + provides a qualified date such as "Effective November 15, 2023", + "Published March 3, 2024", "Accessed October 1, 2022", "Posted June 7", + "Last modified ...", or "Updated ...", keep the qualifier word in the + output — it is semantically meaningful. + + DO NOT preserve qualifiers for podcasts, videos, magazine articles, + newspaper articles, social media posts, or print sources — those use + BARE dates. If the source says "Released September 13, 2022" for a + podcast, emit just "September 13, 2022" (drop "Released"). Same for + "Posted" on a video, "Aired" on a TV episode, etc. + +13. BOOK CHAPTERS IN EDITED VOLUMES: do NOT include the chapter page range + in the bibliography entry. CMOS 18 drops this (kept only in notes). The + form is: + Lastname, First. "Chapter Title." In *Book Title*, edited by Editor + Names. Publisher, Year. + +14. PUBLISHER NAMES: use the full canonical form. Do NOT abbreviate. Write + "University of Chicago Press", not "U of Chicago Press" or "UCP". + Write "Houghton Mifflin Company", not "HMC". Write "Random House", not + "RH". + +15. NON-WESTERN NAMES already in family-first order (e.g., Chinese names + like "Liu Xinwu", "Mao Zedong", Japanese names like "Murakami Haruki", + Korean names like "Kim Jiyoung"): do NOT comma-invert them. Leave the + name as-is. Only insert an inversion comma when the source itself uses + Western "First Last" order. + +16. AUTHOR COUNT THRESHOLD (CMOS 18): up to 6 authors are listed in full + in a bibliography entry. With 7 or more authors, list ONLY the first + 3, followed by ", et al." Use full given names where the source + provides them (not initials), e.g., "Snyder, Carl D., Manuel + Bedrossian, Casey Barr, et al." — NOT "Snyder, C. D., ..." + +17. NEWSPAPER AND MAGAZINE NAMES: + - Expand common abbreviations. "NYT" → "New York Times". "WSJ" → + "Wall Street Journal". "WaPo" → "Washington Post". "LAT" → + "Los Angeles Times". + - Drop a leading "The" from the publication name. Write "New Yorker", + NOT "The New Yorker". Write "New York Times", NOT "The New York + Times". Write "Atlantic", NOT "The Atlantic". + - Italicize newspaper and magazine names: *New Yorker*. + - Use a comma (not a period) between the italicized name and the date: + *New Yorker*, December 18, 2023. + +18. E-BOOK FORMAT INDICATOR: write just the platform name with a period. + "Kindle." NOT "Kindle edition." "Nook." NOT "Nook e-book." + +19. DATABASE INDICATOR for books accessed via a database: write just the + database name with a period at the end of the entry. "EBSCOhost." NOT + "Accessed via EBSCOhost." or "via EBSCOhost." + +20. SOCIAL MEDIA POSTS: preserve the ORIGINAL CASING of the post content. + Do NOT title-case, headline-case, or sentence-case it. If the source + posted "is the world ready for singular they?", keep it as-is. Wrap + the post content in straight double quotes with the trailing period + inside the quotes. Form: + Author-or-Handle. "Post content." Platform, Date. URL. + Use a comma between Platform and Date, not a period. + +21. PODCAST EPISODE format: the podcast series title is italicized like a + book title; the episode title is in quotes; both are kept. + Host, Firstname, host. *Series Title*. Season N, episode M, "Episode + Title." Publisher, Date. Podcast, DURATION. URL. + Always preserve the duration in the form "N min., N sec." when the + source provides it. + +22. VIDEO / TED TALK format: include the venue (e.g., "TED Talk, Vancouver, + BC"), the date, the format label "Video," the duration, and the URL. + Do not drop any of these when the source provides them. + Lastname, First. "Title." Venue, Date. Video, DURATION. URL. + +23. URL PRESERVATION: output URLs EXACTLY as provided in the source, + including the "www." subdomain when present in the source and the + scheme "https://". If the source lacks the scheme, add "https://". + Never drop "www." if the source had it. Never rewrite the path. + +24. INCLUSIVE-NUMBER ELISION for page ranges (CMOS 9.61). Elide the + shared leading digits of the second number in a range, per these + rules: + - 1 through 99: use both complete numbers (e.g., "3–10", "71–72"). + - Multiples of 100 or 1000: use both complete numbers ("100–104", + "1100–1113"). + - 101 through 109 (and 201 through 209, etc.): use only the changed + last digit ("101–8", "808–33"). + - 110 through 199 (and 210 through 299, etc.): use two digits, or + more if needed for clarity ("321–28", "498–532", "1087–89"). + - Across a hundreds boundary, write out both in full ("1496–1504"). + Apply in BOTH notes and bibliography. Example: pages 1818–1859 in a + journal article is written as "1818–59" in CMOS 18, not "1818–1859". + Always use an en-dash (–), never a hyphen (-), between the numbers. + +25. PRESERVE TERMINAL PUNCTUATION inside titles. If a title ends with a + question mark or exclamation point (e.g., "Are Flax Seeds All That?", + "Goodbye, Routine; Hello, Meltdown!"), keep that punctuation inside + the closing quote. Do NOT silently replace it with a period. The + title's own punctuation is part of the title. + +26. EDITION INDICATORS are ABBREVIATED in CMOS 18: "2nd ed." not "Second + edition"; "3rd ed." not "Third edition"; "rev. ed." not "Revised + edition". Even if the source spells the edition out, normalize to the + abbreviated form. The edition indicator sits between the italicized + title and the publisher: + Lastname, First. *Title*. 2nd ed. Publisher, Year. Output ONLY the single reformatted entry. No preamble, no explanation. """