: write-link ( string object -- ) link-style get [ write-object ] with-style ; : link-icon ( topic -- ) dup string? [ >link ] when definition-icon 1array $image " " print-element ; : link-text ( topic -- ) [ article-name ] keep write-link ; : link-effect ( topic -- ) dup word? [ stack-effect [ effect>string ] [ effect-style ] bi [ bl write ] with-style ] [ drop ] if ; : (($link)) ( topic words -- ) [ cleave ] ($span) ; : ($link) ( topic -- ) { link-text } (($link)) ; : $link ( element -- ) first ($link) ; : ($long-link) ( topic -- ) { link-text link-effect } (($link)) ; : $long-link ( element -- ) first ($long-link) ; : ($pretty-link) ( topic -- ) { link-icon link-text } (($link)) ; : $pretty-link ( element -- ) first ($pretty-link) ; : ($long-pretty-link) ( topic -- ) { link-icon link-text link-effect } (($link)) ; : $long-pretty-link ( element -- ) first ($long-pretty-link) ;