Skip to content

How to show code and output side-by-side? #572

@damithc

Description

@damithc

Take the following text.

The code below has two `if` statements; one evaluates to `true` while the other doesn't.
price = 55
print(price)
if price > 50:
    print('Expensive')

weight = 45
print(weight)
if weight > 100:
    print('Heavy')
    
print('Done')

50
Expensive
45
Done

How can I use MarkBind to show the text in a horizontal layout, as given below? I know it can be done using a borderless table, is there a more elegant way?

code → output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions