diff --git a/about.html.pm b/about.html.pm index 99823a6..4672e31 100644 --- a/about.html.pm +++ b/about.html.pm @@ -15,7 +15,7 @@ I live in Los Angeles with my wife Jessica and Roxy the boxer. You can reach me at ◊link["mailto:mb@typographyforlawyers.com"]{mb@typographyforlawyers.com}. I welcome comments and corrections. I do not, however, dispense individualized critiques or recommendations. Nor do I have Word templates to give away. After all, the point of the book is for you to learn how to do these things yourself. -◊em{Typography for Lawyers} is © 2008–16 Matthew Butterick. All rights reserved. +◊em{Typography for Lawyers} is © 2008–17 Matthew Butterick. All rights reserved. ◊gap[5] diff --git a/caption-pages.html.pm b/caption-pages.html.pm index 2002fa0..79ecc94 100644 --- a/caption-pages.html.pm +++ b/caption-pages.html.pm @@ -7,7 +7,7 @@ If this book were a law-school class, reformatting a ◊em{caption page} could b ◊(omission) -Recall the second ◊xref{maxim of page layout} — ◊em{divide the page into foreground and background}. The vertical rules on a caption page should seem like part of the background — they should not be darker or more prominent than the body text in the foreground. Removing unnecessary rules will make the body text area feel less cramped. Use as few as possible. In this revised version, I removed the vertical rule on the right and one on the left. I made the remaining rule thinner and moved it away from the text. +Recall the second ◊xref["maxims-of-page-layout.html"]{maxim of page layout} — ◊em{divide the page into foreground and background}. The vertical rules on a caption page should seem like part of the background — they should not be darker or more prominent than the body text in the foreground. Removing unnecessary rules will make the body text area feel less cramped. Use as few as possible. In this revised version, I removed the vertical rule on the right and one on the left. I made the remaining rule thinner and moved it away from the text. Court filings have ugly typography as a matter of habit, not requirement. Court rules can be strict, but there’s still plenty of room for good typography (see ◊xref{how to interpret court rules}). diff --git a/scribblings/pollen-rkt.scrbl b/scribblings/pollen-rkt.scrbl index 7f3eafa..d2758cd 100644 --- a/scribblings/pollen-rkt.scrbl +++ b/scribblings/pollen-rkt.scrbl @@ -537,18 +537,19 @@ Well, almost. One wrinkle that arises is connecting singular and plural versions @chunk[url> - (define (format-as-filename target) - (define nonbreaking-space (string #\u00A0)) - (let* ([x target] - [x (string-trim x "?")] ; delete a question mark at the end - [x (string-downcase x)] ; put string in all lowercase - [x (regexp-replace* #rx"é" x "e")] ; remove accented é - [x (if (regexp-match "times new roman" x) "a-brief-history-of-times-new-roman" x)] ; special rule for TNR - [x (if (regexp-match "foreword" x) "foreword" x)] ; special rule for foreword - [x (if (regexp-match "table of contents" x) "toc" x)] ; special rule for toc - [x (string-replace x nonbreaking-space "-")] ; replace nbsp with hyphen - [x (string-replace x " " "-")]) ; replace word space with hyphen - (format "~a.html" x))) + (define (format-as-filename target) + (define nonbreaking-space (string #\u00A0)) + (let* ([x target] + [x (string-trim x "?")] ; delete a question mark at the end + [x (string-downcase x)] ; put string in all lowercase + [x (regexp-replace* #rx"é" x "e")] ; remove accented é + [x (if (regexp-match "times new roman" x) "a-brief-history-of-times-new-roman" x)] ; special rule for TNR + [x (if (regexp-match "about the author" x) "about" x)] ; special rule for about + [x (if (regexp-match "foreword" x) "foreword" x)] ; special rule for foreword + [x (if (regexp-match "table of contents" x) "toc" x)] ; special rule for toc + [x (string-replace x nonbreaking-space "-")] ; replace nbsp with hyphen + [x (string-replace x " " "-")]) ; replace word space with hyphen + (format "~a.html" x))) (define (target->url target) (define actual-filenames @@ -557,10 +558,11 @@ Well, almost. One wrinkle that arises is connecting singular and plural versions [singular-target (regexp-replace plural-regex target "")] [plural-target (string-append singular-target "s")]) (list singular-target plural-target))) - (for*/first ([tfn (in-list (map format-as-filename target-variants))] - [afn (in-list actual-filenames)] - #:when (equal? tfn afn)) - tfn))] + (or (for*/first ([tfn (in-list (map format-as-filename target-variants))] + [afn (in-list actual-filenames)] + #:when (equal? tfn afn)) + tfn) + (error (format "no URL found for ~a" target))))] @defproc[