racket / racket/scribble

Use of macros can ruin typesetting in racketblock and similar

Open
#183 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

Consider this simple scribble document

#lang scribble/manual

@(define-syntax-rule (show-rb x)
   (racketblock
    (if (= 1 x)
        'yes
        'no)))

@(show-rb 2)
@(show-rb 3)
@(show-rb 4)

You can see that the "external" pieces of syntax cause extra whitespace in the rendered HTML.

I haven't found a built-in way to avoid this problem. Have I overlooked something, or is this a known issue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal Scribble document in the issue and render it as HTML to reproduce the extra whitespace from the macro-expanded racketblock forms. Trace how the external syntax is incorporated into the rendered output; done means the repeated show-rb calls no longer introduce unwanted whitespace.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.