From 41af75965d5890f0c91b47de49f9bb8752951297 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 29 Aug 2013 10:40:43 -0600 Subject: [PATCH] scriblib/figure: add `suppress-floats` original commit: ac21f854a2096e96ea6940f0b0672163eadd86a4 --- .../scribble-doc/scriblib/scribblings/figure.scrbl | 7 +++++++ pkgs/scribble-pkgs/scribble-lib/scriblib/figure.rkt | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/pkgs/scribble-pkgs/scribble-doc/scriblib/scribblings/figure.scrbl b/pkgs/scribble-pkgs/scribble-doc/scriblib/scribblings/figure.scrbl index 3ca7346f..dc7a84be 100644 --- a/pkgs/scribble-pkgs/scribble-doc/scriblib/scribblings/figure.scrbl +++ b/pkgs/scribble-pkgs/scribble-doc/scriblib/scribblings/figure.scrbl @@ -85,6 +85,13 @@ Generates a new figure label. This function is normally not used directly, since it is used by @racket[figure].} +@defproc[(suppress-floats) element?]{ + +Produces an empty element that renders in Latex as +@tt{\suppressfloats}, which discourages the placement of figures in +the column or page of the surrounding text.} + + @section{Configuring Output} Output uses the following style names, which can be adjusted in an diff --git a/pkgs/scribble-pkgs/scribble-lib/scriblib/figure.rkt b/pkgs/scribble-pkgs/scribble-lib/scriblib/figure.rkt index 07028aa7..5332df55 100644 --- a/pkgs/scribble-pkgs/scribble-lib/scriblib/figure.rkt +++ b/pkgs/scribble-pkgs/scribble-lib/scriblib/figure.rkt @@ -18,6 +18,7 @@ left-figure-style center-figure-style right-figure-style + suppress-floats (rename-out [left-figure-style left])) (define figure-style-extras @@ -123,3 +124,6 @@ (define Figure-ref (ref-proc "F")) (define figure-ref (ref-proc "f")) + +(define (suppress-floats) + (make-element "suppressfloats" null))