Aside: I do not much like the CSS styling of the diagrams, so I've started
dabbling with some easy customisation (colour and font weight):
[image: Screenshot 2023-06-18 6.52.35 PM.png]
On Sunday, June 18, 2023 at 6:36:02 PM UTC-3 Charlie Veniot wrote:
> I'm documenting two BASIC Anywhere Machine functions: MIN and MAX .
>
> I'm using the railroad plugin to describe syntax.
>
> MIN and MAX having identical syntax (and I've got many other cases like
> this), I wanted to define the railroad diagram once for both the MIN and
> MAX tiddlers.
>
> I created a template tiddler called "Syntax MIN MAX" that has the
> following text:
>
> ```
> !! Syntax
>
> <$railroad text={{{
> [<currentTiddler>addprefix["]addsuffix["]]
> [["("<"numValue1">]]
> [[","]]
> [[<"numValue2">]]
> [[")"]]
> +[join[]]
> }}}>
> ```
>
> Both my MIN and my MAX tiddlers have the following in their text:
>
> ```
> {{||Syntax MIN MAX}}
> ```
>
> I could have kept things simple by defining the one railroad diagram with
> it displaying required choice of MIN or MAX, but I did not like the look of
> that at all.
>
> If you have an approach you think is simpler than the one described above,
> please let everybody know about it.
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ac7c2277-e809-4708-8730-4b581d4dc783n%40googlegroups.com.