From 24cdc589510465f5211d37f15cca939cec99cbe5 Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Fri, 28 Feb 2020 08:42:59 -0500 Subject: [PATCH] style: consistent figure style (#3060) Use a consistent style for the "good / bad" examples: - start the code at the far left of each box - keep a little space between the top of the box & the label --- .../scribblings/style/textual.scrbl | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/racket-doc/scribblings/style/textual.scrbl b/pkgs/racket-doc/scribblings/style/textual.scrbl index b621860ca9..7fb272c415 100644 --- a/pkgs/racket-doc/scribblings/style/textual.scrbl +++ b/pkgs/racket-doc/scribblings/style/textual.scrbl @@ -30,21 +30,24 @@ your code. (define (conversion f) (* 5/9 (- f 32))) ] - @filebox[@tt{really bad} - @codeblock{#lang racket + @racketmod[#:file + @tt{really bad} + racket + (define (conversion f) (* 5/9 (- f 32) ) ) - }] + ] ] You are allowed to place all closing parenthesis on a line by itself at the end of long sequences, be those definitions or pieces of data. @compare[ - @filebox[@tt{acceptable} - @codeblock{#lang racket + @racketmod[#:file + @tt{acceptable} + racket (define modes '(edit help @@ -53,9 +56,10 @@ end of long sequences, be those definitions or pieces of data. trace step )) - }] - @filebox[@tt{also acceptable} - @codeblock{#lang racket + ] + @racketmod[#:file + @tt{also acceptable} + racket (define turn% (class object% (init-field state) @@ -68,7 +72,7 @@ end of long sequences, be those definitions or pieces of data. (define/public (is-placable? place) (send state legal? place)) )) - }] + ] ] Doing so is most useful when you expect to add, delete, or swap items in such sequences. @@ -383,12 +387,13 @@ space between the two, even if they’re separated by parentheses. (define (f x g) [(< x 3) (g (g 3))]) ] - @filebox[@tt{bad} - @codeblock{#lang racket + @racketmod[#:file + @tt{bad} + racket (define(f x g) [(< x 3)(g(g 3))]) - }] + ] ]