{"size": 1465, "ext": "scrbl", "max_stars_repo_path": "slideshow-doc/scribblings/slideshow/text.scrbl", "max_stars_repo_name": "lexi-lambda/slideshow", "max_stars_repo_stars_event_min_datetime": "2015-08-07T20:04:42.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-12T05:25:05.000Z", "max_issues_repo_path": "slideshow-doc/scribblings/slideshow/text.scrbl", "max_issues_repo_name": "lexi-lambda/slideshow", "max_issues_repo_issues_event_min_datetime": "2015-08-05T04:26:57.000Z", "max_issues_repo_issues_event_max_datetime": "2020-10-21T15:43:33.000Z", "max_forks_repo_path": "share/pkgs/slideshow-doc/scribblings/slideshow/text.scrbl", "max_forks_repo_name": "takikawa/racket-ppa", "max_forks_repo_forks_event_min_datetime": "2016-06-20T12:20:42.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-30T15:59:45.000Z"}
{"max_stars_count": 29, "max_issues_count": 19, "max_forks_count": 15, "avg_line_length": 20.6338028169, "max_line_length": 79, "alphanum_fraction": 0.7044368601}
#lang scribble/manual

@(require (for-label racket/list slideshow/base pict slideshow/text))

@title{Text Formatting Helpers}

@defmodule[slideshow/text]

This module provides conveniences functions for formatting text.

@defform[(with-size size expr)]{

Sets @racket[current-font-size] to @racket[size] while running @racket[expr].

@history[#:added "1.2"]{}
}

@defform[(with-scale scale expr)]{

Multiplies @racket[current-font-size] by @racket[scale] while running
@racket[expr].

@history[#:added "1.2"]{}
}

@deftogether[(
@defform[(big text)]
@defform[(small text)]
)]{

Scale @racket[current-font-size] by @racket[3/2] or @racket[2/3], respectively,
while running @racket[text].

@history[#:added "1.2"]{}
}

@defform[(with-font font expr)]{

Sets @racket[current-main-font] to @racket[font] while running @racket[expr].

@history[#:added "1.2"]{}
}

@defform[(with-style style expr)]{

Adds @racket[style] to @racket[current-main-font] (via @racket[cons]) while
running @racket[expr].

@history[#:added "1.2"]{}
}

@deftogether[(
@defform[(bold text)]
@defform[(italic text)]
@defform[(subscript text)]
@defform[(superscript text)]
@defform[(caps text)]
)]{

Adds the attributes for bold, italic, superscript, subscript, or small caps
text, respectively, to @racket[current-main-font] while running @racket[text].

@history[#:added "1.2"]{}
}

@defproc[(blank-line) pict?]{
Adds a blank line of the current font size's height.

@history[#:added "1.2"]{}
}
