App-pandoc-preprocess

 view release on metacpan or  search on metacpan

etc/input.pandoc  view on Meta::CPAN

  LR_7 -> LR_5 [ label = "S(a)" ];
  LR_8 -> LR_6 [ label = "S(b)" ];
  LR_8 -> LR_5 [ label = "S(a)" ];
}
~~~~~



------------------------------------------------------------------------------


\newpage

# neato Diagrams

`neato` diagrams behave very similarly to [dot Diagrams][]. Please cf [dot Diagrams] for more information

## neato Options

* same as [dot Options][]

## neato Examples

The following example produces Figure \ref{fig:neato-diagram}.

\scriptsize

    ~~~~~ {.neato .scale=50% .title=neato diagram .label=fig:neato-diagram}
    graph G {
      n0 -- n1 -- n2 -- n3 -- n0;
    }
    ~~~~~

\normalsize

~~~~~ {.neato .scale=50% .title=neato diagram .label=fig:neato-diagram}
graph G {
  n0 -- n1 -- n2 -- n3 -- n0;
}
~~~~~



------------------------------------------------------------------------------


\newpage


# yUML

yUML needs a network connection and uses <http://yuml.me> as the rendering service.

## yUML Options
Options specific to yUML can be:

* `.type=`: any of `[` `class`, `activity`, `usecase` `]`
* `.style=`: any of `[` `scruffy`, `boring`, `plain` `]`
* `.direction=`: any of `[` `LR`, `RL`, `TD`, `]`

<!-- * `.format=`: `png`, `pdf`, `jpg`, `svg` -->
<!-- * `.scale=`: `10%`-`200%` -->

## yUML Examples

### yUML Class diagrams

With *yUML* as the renderer, setting `.type=class` and using the style `.style=boring`, the following markup produces Figure \ref{fig:yuml-class-diagram}.

\scriptsize

    ~~~~ {.yuml .style=boring .type=class .direction=TD .title=yUML class diagram .label=fig:yuml-class-diagram}

    [Customer] +1 ->        *[Order]
    [Order]   ++1 -items>   *[LineItem]
    [Order]       -0..1>     [PaymentMethod]
    ~~~~

\normalsize

~~~~ {.yuml .style=boring .type=class .direction=TD .title=yUML class diagram .label=fig:yuml-class-diagram}
[Customer] +1 ->        *[Order]
[Order]   ++1 -items>   *[LineItem]
[Order]  -0..1>     [PaymentMethod]
~~~~

\newpage

### yuml Usecase diagrams

With `scruffy` style and `.type=usecase`, the following example produces Figure \ref{fig:yuml-usecase-diagram}.

\scriptsize

    ~~~~ {.yuml .style=scruffy .type=usecase .title=yUML usecase diagram .label=fig:yuml-usecase-diagram}
    // Cool Use Case Diagram
    [Customer]-(Make Cup of Tea)
    (Make Cup of Tea)<(Add Milk)
    (Make Cup of Tea)>(Add Tea Bag)
    ~~~~

\normalsize

~~~~ {.yuml .style=scruffy .type=usecase .title=yUML usecase diagram .label=fig:yuml-usecase-diagram}
// Cool Use Case Diagram
[Customer]-(Make Cup of Tea)
(Make Cup of Tea)<(Add Milk)
(Make Cup of Tea)>(Add Tea Bag)
~~~~

\newpage


### yuml Activity diagrams

Lastly, using `.type=activity` and `.style=plain` the following example produces Figure \ref{fig:yuml-activity-diagram}.

\scriptsize

    ~~~~ {.yuml .style=plain .type=activity .title=yUML activity Diagram .label=fig:yuml-activity-diagram}
    (start)->|a|,|a|->(Make Coffee)->|b|,|a|->(Make Breakfast)->|b|,|b|-><c>[want more coffee]->(Make Coffee),<c>[satisfied]->(end)

etc/input.pandoc  view on Meta::CPAN

----------  -----------------------------------------------------------------
ppp         (this document)
            
            <https://metacpan.org/release/App-pandoc-preprocess>
            
            <https://github.com/xdbr/p5-App-pandoc-preprocess>
            
ditaa       <http://ditaa.sourceforge.net/>
            
dot         <http://www.graphviz.org/>
            
neato       <http://www.graphviz.org/>
            
yUML        <http://yuml.me/>
            
            <https://github.com/wandernauta/yuml>
            
rdfdot      <https://metacpan.org/pod/RDF::Trine::Exporter::GraphViz>

-----------------------------------------------------------------------------

Table: List of options



# Credits and further references

* <http://www.asciiflow.com/#Draw>: an excellent helper for all things diagram
* <http://randomdeterminism.wordpress.com/2012/06/01/how-i-stopped-worring-and-started-using-markdown-like-tex/>: general introduction to another approach to typesetting and using `gpp`
* <https://github.com/nichtich/ditaa-markdown>: This is where the original idea came from
* gpp: <http://files.nothingisreal.com/software/gpp/gpp.html>

\listoffigures


------------------------------------------------------------------------------


<!--
 # Test 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure d...

* Code

* in lists should not be set:
    ~~~~~ {.dot .Grankdir:LR}

    digraph {
      A -> B -> C;
      A -> C;
    }

    ~~~~~
-->

<!--
op = OptionParser(usage="%prog [-i FILE] -o FILE", version="%prog 0.1")
op.add_option("-i", "--in", dest="infile", help="read yuml from FILE instead of stdin", metavar="FILE", default="-")
op.add_option("-o", "--out", dest="outfile", help="store output in FILE", metavar="FILE")
op.add_option("-f", "--format", dest="fmt", help="use format FMT", metavar="FMT", default="png", choices=['png', 'pdf', 'jpg', 'svg'])
op.add_option("-t", "--type", dest="type", help="draw a TYPE diagram", metavar="TYPE", default="class", choices=['class', 'activity', 'usecase'])
op.add_option("-s", "--style", dest="style", help="use style STY", metavar="STY", default="scruffy", choices=['scruffy', 'boring', 'plain'])
op.add_option("--scale", dest="scale", help="scale output to percentage", metavar="PERCENT", type="int")
op.add_option("--dir", dest="dir", help="direction of the diagram LR RL TD", metavar="DIRECTION")
op.add_option("-v", "--verbose", dest="v", help="print some debug info", action="store_true", default=False)
 -->



( run in 1.583 second using v1.01-cache-2.11-cpan-788537b7465 )