/latex-nomnoml

LaTeX package to interface with nomnoml (npm)

Primary LanguageTeX

latex-nomnoml

LaTeX package to interface with nomnoml (npm)

Source : https://github.com/Kochise/latex-nomnoml

nomnoml-no

installation

Get nvm for Windows : https://github.com/coreybutler/nvm-windows/releases
Uncompress/install it where you need.

\>cd nvm
\nvm>nvm install 12.17.0
\nvm>nvm use 12.17.0
\nvm>node -v
v12.17.0
\nvm>npm install --global nomnoml
\nvm>npm install --global nomnoml-cli

xcopy /c /h /e /r /q /y latex-nomnoml <miktex>\texmfs\install\tex\latex\nomnoml
start "" "<miktex>\miktex-portable.cmd"

Refresh the filename database.
Update the package database.
You should be ready to go.

Alternatively, you can use https://github.com/Kochise/win_portable

usage

See https://github.com/skanaar/nomnoml
See https://github.com/prantlf/nomnoml-cli

In your preamble :

\def\imagepath{./images}
\graphicspath{{\imagepath/}}
\usepackage[imagepath=\imagepath]{nomnoml}

In your document :

%\begin{nomnoml}[width]{caption}{refname}
\begin{nomnoml}[8cm]{nomnoml caption example}{nomnomlexample}
[Pirate|eyeCount: Int|raid();pillage()|
  [beard]--[parrot]
  [beard]-:>[foul mouth]
]

[<table>mischief | bawl | sing || yell | drink]

[<abstract>Marauder]<:--[Pirate]
[Pirate]- 0..7[mischief]
[jollyness]->[Pirate]
[jollyness]->[rum]
[jollyness]->[singing]
[Pirate]-> *[rum|tastiness: Int|swig()]
[Pirate]->[singing]
[singing]<->[rum]

[<start>st]->[<state>plunder]
[plunder]->[<choice>more loot]
[more loot]->[st]
[more loot] no ->[<end>e]

[<actor>Sailor] - [<usecase>shiver me;timbers]
\end{nomnoml}

smcat

options

What is available through nomnoml-cli (not nomnoml) :

# Output usage information
-h, --help

# Output the version number
-V, --version

# File with nomnoml source to read from
-i, --input <path>

# File for the image output to write to
-o, --output <path>

# Output format (png or svg) /!\ OUTPUT ONLY PNG DATA
-f, --format <format>

# Width of the canvas to draw on
-w, --width <pixels>

# Height of the canvas to draw on
-h, --height <pixels>

Yeah, there are two -h...

Cannot be specified on a group basis, only in the preamble.
Just add the requested parameters without the leading/separator dash(es).

\usepackage[V]{nomnoml}

or :

\usepackage[height={pixels}]{nomnoml}

Avoid :

h, help		: because useless
V, version	: because useless, unless debug log
i, input	: because used by the provided text
o, output	: because using the refname

limitations

Your imagination.

greetings

Based on https://github.com/dakusui/latex-ditaa
Also interested into https://github.com/sile-typesetter/sile