Project

General

Profile

Actions

csInfo #4051 | FMT-0020

open
RA

csInfo #FMT-0002: Kroki examples

PickChr

csInfo #4051 | FMT-0020: PickChr

Added by Redmine Admin 8 days ago. Updated 7 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

element object-definition  LABEL  ":" position  VARIABLE  assignment-operator expr "print" print-args

The diagram above is shown by just simply put sample diagram code copied from kroki.io inside a macro.
The macro language is described in redmine-kroki plugin page.

This is the exact code:


{{kroki(pikchr, max_width=600)
​$r = 0.2in
linerad = 0.75*$r
linewid = 0.25

# Start and end blocks
#
box "element" bold fit
line down 50% from last box.sw
dot rad 250% color black
X0: last.e + (0.3,0)
arrow from last dot to X0
move right 3.9in
box wid 5% ht 25% fill black
X9: last.w - (0.3,0)
arrow from X9 to last box.w


# The main rule that goes straight through from start to finish
#
box "object-definition" italic fit at 11/16 way between X0 and X9
arrow to X9
arrow from X0 to last box.w

# The LABEL: rule
#
arrow right $r from X0 then down 1.25*$r then right $r
oval " LABEL " fit
arrow 50%
oval "\":\"" fit
arrow 200%
box "position" italic fit
arrow
line right until even with X9 - ($r,0) \
  then up until even with X9 then to X9
arrow from last oval.e right $r*0.5 then up $r*0.8 right $r*0.8
line up $r*0.45 right $r*0.45 then right

# The VARIABLE = rule
#
arrow right $r from X0 then down 2.5*$r then right $r
oval " VARIABLE " fit
arrow 70%
box "assignment-operator" italic fit
arrow 70%
box "expr" italic fit
line right until even with X9 - ($r,0) \
  then up until even with X9 then to X9

# The PRINT rule
#
arrow right $r from X0 then down 3.75*$r then right $r
oval "\"print\"" fit
arrow
box "print-args" italic fit
line right until even with X9 - ($r,0) \
  then up until even with X9 then to X9
}}

Document references

No data to display

RA Updated by Redmine Admin 7 days ago Actions #1

  • Description updated (diff)

RA Updated by Redmine Admin 7 days ago Actions #2

  • Description updated (diff)
Actions

Also available in: PDF Atom