On this page:
rhombus
rhombuslink
rhombusblock
rhombusblock_  etc
rhombus_  typeset
rhombusmodname
rhombuslangname
racketmodname
8.16.0.4

3.1 Typesetting Code🔗ℹ

expression

rhombus(group)

 

expression

rhombus(group, builtin_space)

 

expression

rhombus(group, ~at space_name)

 

builtin_space

 = 

~var

 | 

~datum

 | 

~value

 | 

~result

 | 

~expr

 | 

~defn

 | 

~decl

 | 

~bind

 | 

~impo

 | 

~expo

 | 

~modpath

 | 

~annot

 | 

~repet

 | 

~stxclass

 | 

~reducer

 | 

~class

 | 

~space

 | 

~for_clause

 | 

~class_clause

 | 

~interface_clause

 | 

~veneer_clause

 | 

~entry_point

 | 

~unquote_bind

 | 

~syntax_class_clause

 | 

~pattern_clause

 | 

~space_clause

 | 

~space_meta_clause

 | 

~key_comp

 | 

~immediate_callee

 | 

~operator_order

 | 

~doc

Typesets group literally, except as adjusted by spacers and typesetting transformers. The result is an Element to appear inline in a paragraph. Spacing in group is normalized, instead of preserved exactly as in the source.

Use #,(expr) within group to escape from literal mode and substitute the element produced by expr.

A builtin_space or space name after ~at supplies the initial space to use for creating hyperlinks in group based on meta_label imports.

Typesetting and hyperlinking can be adjusted via spacers, which can select an alternative space for components of group for hyperlinking. That is, a supplied builtin_space or ~at space_name specifies the initial space of group, but a spacer binding can determine the space of subsequent elements of group.

Even before applying spacers, identifiers in group bound as typesetting transformers are replaced with their transformations. That’s how metavariables get typeset as italic, for example: each metavariable is bound as a transformer that adds the ~var space to the identifier.

expression

rhombuslink(name, content, ... ~nonempty)

 

expression

rhombuslink(name, builtin_space, content, ... ~nonempty)

 

expression

rhombuslink(name, ~at space_name, content, ... ~nonempty)

Link rhombus, but uses the text of elem([content, ...]) preserving the hyperlink (if any) of name.

expression

rhombusblock(group, ...)

Similar to rhombus, but producing a FlowBlock for multiple groups and with whitespace preserved exactly as in the source.

Note that when you use @ notation to call rhombusblock, then no comma is required between groups that are on separate lines. So, for example,

@rhombusblock(

  fun add(x, y):

    x + y

  add(1, 2)

)

renders as

fun add(x, y):

  x + y

add(1, 2)

without adding a comma after the add definition. If the source does contain a comma, then is preserved in the output.

expression

rhombusblock_etc:

  group

  ...

 

expression

rhombusblock_etc (option, ...):

  group

  ...

 

option

 = 

~escape: op

 | 

~inset: body; ...

 | 

~indent: body: ...

 | 

~prompt: body: ....

 | 

~indent_from_block: body; ...

 | 

~spacer_info_box: body; ...

 | 

~number_from: body; ...

Like rhombusblock, but supports options:

definition

rhombus_typeset 'id':

  body

  ...

Binds id so that when it is used in rhombus or rhombusblock, the use of id is replaced with the result of the body sequence.

expression

rhombusmodname (module_path)

 

expression

rhombuslangname (module_path)

 

expression

racketmodname (module_path)

Form for referencing Rhombus modules, languages, and Racket modules.