App-Basis-ConvertText2

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

The content for this code-block is EXACTLY the same that you would use as input to [msc]

There are only optional 2 arguments

* title
    * used as the generated images 'alt' argument
* size
    * size of image, widthxheight

**Example**

    ~~~~{.mscgen  title="mscgen1" size="600x400}
    # MSC for some fictional process
    msc {
      a,b,c;

      a->b [ label = "ab()" ] ;
      b->c [ label = "bc(TRUE)"];
      c=>c [ label = "process(1)" ];
      c=>c [ label = "process(2)" ];
      ...;
      c=>c [ label = "process(n)" ];
      c=>c [ label = "process(END)" ];
      a<<=c [ label = "callback()"];
      ---  [ label = "If more to run", ID="*" ];
      a->a [ label = "next()"];
      a->c [ label = "ac1()\nac2()"];
      b<-c [ label = "cb(TRUE)"];
      b->b [ label = "stalled(...)"];
      a<-b [ label = "ab() = FALSE"];
    }
    ~~~~

**Output**

~~~~{.mscgen  title="mscgen1" size="600x400}
# MSC for some fictional process
msc {
  a,b,c;

  a->b [ label = "ab()" ] ;
  b->c [ label = "bc(TRUE)"];
  c=>c [ label = "process(1)" ];
  c=>c [ label = "process(2)" ];
  ...;
  c=>c [ label = "process(n)" ];
  c=>c [ label = "process(END)" ];
  a<<=c [ label = "callback()"];
  ---  [ label = "If more to run", ID="*" ];
  a->a [ label = "next()"];
  a->c [ label = "ac1()\nac2()"];
  b<-c [ label = "cb(TRUE)"];
  b->b [ label = "stalled(...)"];
  a<-b [ label = "ab() = FALSE"];
}
~~~~

## DIagrams Through Ascii Art - ditaa

This is a special system to turn ASCII art into pretty pictures, nice to render diagrams.
You do need to make sure that you are using a proper monospaced font with your editor otherwise things will go awry with spaces. See [ditaa] for reference.

The content for this code-block must be the same that you would use to with the [ditaa] software

* title
    * used as the generated images 'alt' argument
* size
    * size of image, default 80x20, widthxheight

**Example**

    ~~~~{.ditaa }
    Full example
    +--------+   +-------+    +-------+
    |        | --+ ditaa +--> |       |
    |  Text  |   +-------+    |diagram|
    |Document|   |!magic!|    |       |
    |     {d}|   |       |    |       |
    +---+----+   +-------+    +-------+
        :                         ^
        |       Lots of work      |
        \-------------------------+
    ~~~~

**Output**

~~~~{.ditaa }
Full example
+--------+   +-------+    +-------+
|        | --+ ditaa +--> |       |
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    \-------------------------+
~~~~

## UML Diagrams

Software engineers love to draw diagrams, [PlantUML] is a java component to make this simple.

You will need to have a script on your system called 'uml' that calls java with the component.

Here is mine, it is also available in the scripts directory in the

~~~~{ .shell}
#!/bin/bash
# run plantuml
# moodfarm@cpan.org

# we assume that the plantuml.jar file is in the same directory as this executable
EXEC_DIR=`dirname $0`
PLANTUML="$EXEC_DIR/plantuml.jar"

INPUT=$1
OUPUT=$2
function show_usage  {
    arg=$1
    err=$2

README.md  view on Meta::CPAN

Alternate date formats is DD-MM-YYYY and '/' may also be used as a field separator.

* class
    * HTML/CSS class name
* id
    * HTML/CSS class
* width
    * width of the table
* style
    * style the table if not doing anything else

**Example**

    ~~~~{.version class='versiontable' width='100%'}
    0.1 2014-04-12
      * removed ConvertFile.pm
      * using Path::Tiny rather than other things
      * changed to use pandoc fences
        ~~~~{.tag} rather than xml format <tag>
    0.006 2014-04-10
      * first release to github
    ~~~~

**Output**

~~~~{.version class='versiontable' width='100%'}
0.1 2014-04-12
  * removed ConvertFile.pm
  * using Path::Tiny rather than other things
  * changed to use pandoc fences ~~~~{.tag} rather than xml format <tag>
0.006 2014-04-10
  * first release to github
~~~~

## Start a new page - page

Nice and simple, starts a new page

**Example**

    ~~~~{.page}
    ~~~~

## Gle / glx

This is a complex graph/chart drawing package available from http://glx.sourceforge.net/

The full set of optional arguments is

* title
    * used as the generated images 'alt' argument
* size
    * size of image, default 720x540, widthxheight, size is approximate
* transparent
    * flag to use a transparent background

**Example**

    ~~~~{.gle}

    set font texcmr hei 0.5 just tc

    begin letz
       data "saddle.z"
       z = 3/2*(cos(3/5*(y-1))+5/4)/(1+(((x-4)/3)^2))
       x from 0 to 20 step 0.5
       y from 0 to 20 step 0.5
    end letz

    amove pagewidth()/2 pageheight()-0.1
    write "Saddle Plot (3D)"

    begin object saddle
       begin surface
          size 10 9
          data "saddle.z"
          xtitle "X-axis" hei 0.35 dist 0.7
          ytitle "Y-axis" hei 0.35 dist 0.7
          ztitle "Z-axis" hei 0.35 dist 0.9
          top color blue
          zaxis ticklen 0.1 min 0 hei 0.25
          xaxis hei 0.25 dticks 4 nolast nofirst
          yaxis hei 0.25 dticks 4
       end surface
    end object

    amove pagewidth()/2 0.2
    draw "saddle.bc"
    ~~~~

**Output**

~~~~{.gle}
size 10 9

set font texcmr hei 0.5 just tc

begin letz
   data "saddle.z"
   z = 3/2*(cos(3/5*(y-1))+5/4)/(1+(((x-4)/3)^2))
   x from 0 to 20 step 0.5
   y from 0 to 20 step 0.5
end letz

amove pagewidth()/2 pageheight()-0.1
write "Saddle Plot (3D)"

begin object saddle
   begin surface
      size 10 9
      data "saddle.z"
      xtitle "X-axis" hei 0.35 dist 0.7
      ytitle "Y-axis" hei 0.35 dist 0.7
      ztitle "Z-axis" hei 0.35 dist 0.9
      top color blue
      zaxis ticklen 0.1 min 0 hei 0.25
      xaxis hei 0.25 dticks 4 nolast nofirst
      yaxis hei 0.25 dticks 4
   end surface
end object

amove pagewidth()/2 0.2
draw "saddle.bc"
~~~~

## Gnuplot

This is the granddaddy of charting/plotting programs, available from http://gnuplot.sourceforge.net/.

The full set of optional arguments is

* title
    * used as the generated images 'alt' argument
* size
    * size of image, default 720x540, widthxheight

**Example**

    ~~~~{.gnuplot}
    # $Id: surface1.dem,v 1.11 2004/09/17 05:01:12 sfeam Exp $
    #
    set samples 21
    set isosample 11
    set xlabel "X axis" offset -3,-2
    set ylabel "Y axis" offset 3,-2
    set zlabel "Z axis" offset -5
    set title "3D gnuplot demo"
    set label 1 "This is the surface boundary" at -10,-5,150 center
    set arrow 1 from -10,-5,120 to -10,0,0 nohead
    set arrow 2 from -10,-5,120 to 10,0,0 nohead
    set arrow 3 from -10,-5,120 to 0,10,0 nohead
    set arrow 4 from -10,-5,120 to 0,-10,0 nohead
    set xrange [-10:10]
    set yrange [-10:10]
    splot x*y
    ~~~~



( run in 0.477 second using v1.01-cache-2.11-cpan-5735350b133 )