racket / racket/scribble

command-extras and command-optional should work with nested flows as well as elements.

Open
#101 0 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

At the moment, the command-extras and command-optional style properties (for latex) only work for elements. This is a little problematic for flows that take multiple arguments. (Such as say, minipage, which has a begin/end form.

At the moment, you can sort of fake it with elements, but its really clunky. Say:

@elem[#:style (style "begin" (list (command-extras '("0.5\\textwidth"))))]{
 minipage}
Left Side
@elem[#:style (style "end" '())]{minipage}
@elem[#:style (style "begin" (list (command-extras '("0.5\\textwidth"))))]{
 minipage}
Right Side
@elem[#:style (style "end" '())]{minipage}

But it would be much cleaner to just do:

@nested[#:style (style "minipage" (list (command-extras '("0.5\\textwidth"))))]{
  Left Side}
@nested[#:style (style "minipage" (list (command-extras '("0.5\\textwidth"))))]{
  Right Side}

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 by tracing how the command-extras and command-optional style properties are handled for elements, then compare that path with the @nested flow shown in the issue. The work is done when nested flows can pass these properties for multi-argument begin/end constructs such as minipage, without the element-based workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.