Popular Posts

santamonicahighschoolbaseball

Asciidoctor Diagram :: Asciidoctor Doctors

Post a Comment

In your application, you can either load and register the entire set of diagram extensionsrequire 'asciidoctor-diagram'

or load and sign in each extension in my opinion.require 'asciidoctor-diagram/'

can be one among a2s, blockdiag, bytefield, diagrams, ditaa, dpic, erd, gnuplot, graphviz, meme, mermaid, msc, pikchr, plantuml, shaape, smcat, svgbob, syntrax, umlet, vega or wavedrom.

Requiring one or more of these documents will mechanically register the extensions for all processed documents.

If you want greater satisfactory grained manage over whilst the extensions are enabled, asciidoctor-diagram//extension can be used alternatively.This loads the extensions however does not register it within the Asciidoctor extension registry.You can then manually sign in the extensions at the suitable instances using the Asciidoctor::Extensions API.

This record explains the various capabilities of asciidoctor-diagram blocks the use of ditaa diagrams for instance.Diagram Macros

The diagram extensions also can be used in inline, or block macro form.

Anatomy of a diagram block macrodiagram-type::supply-document-call[layout=output-layout] (1) (2) (three)1The macro name specifies the diagram syntax that is getting used.2The source file name specifies the external report that includes the diagram supply code.3The layout attribute determines the output picture format to use. If a layout isn't always specified, the default output format for the chosen diagram type will be used.

When the supply report name is a relative route it's far resolved with respect to the region of the report being processed.Image Output Location

When Asciidoctor Diagram writes pics to disk it'll pass over the following alternatives with a purpose to determine wherein to put in writing the documents.

imagesoutdir if the imagesoutdir attribute has been specified

outdir/imagesdir if the outdir attribute has been specified

to_dir/imagesdir if the to_dir attribute has been distinctive

base_dir/imagesdirImage Cache Location

The picture generation also outputs metadata files that by means of default are placed in .asciidoctor/diagram.To region them in distinctive place, Asciidoctor Diagram tests for (in this order).

cachedir attribute is specifiedin the block header (ie. [plantuml, png, cachedir=my-cache])

diagram-cachedir if the diagram-cachedir characteristic has been designated

outdir/imagesdirSpecifying Diagram Generator Paths

Asciidoctor Diagram relies upon on external gear to generates photos.In most cases it's going to discover those equipment mechanically for you by seeking out specific executables in each listing inside the PATH environment variable.In case you’ve mounted a device in a manner where the executable isn't always in the PATH, you may override its location manually the usage of document attributes.The following table lists the tools which might be required for each diagram type, the vicinity wherein they may be downloaded and the file attribute you can use to override their locations.

If as an instance you hooked up actdiag in /home/me/actdiag/bin and this course isn't always included within the PATH you may specify its region at the command line$ asciidoctor -a actdiag=/home/me/actdiag/bin/actdiag -r asciidoctor-diagram sample.adocThe Meme Extension

The meme extension provides a simple ‘Advice Animal’ fashion picture generator.It’s utilization is easiest to give an explanation for with an instance.meme::yunoguy.jpg[Doc writers,Y U NO // AsciiDoc]

The target of the block macro tells the extension which picture to use as historical past.The firstpositional attributes are top and backside and are used for the top and bottom label.Occurrences of // surrounded through whitespace are interpreted as line breaks.The Barcode Extension

The barcode extension gives barcode rendering.Barcode macros can be distinctive the usage of blocks, inline macros or block macros using one of the following templates.// Barcode block[, ] (1) (2)---- (3)----// Barcode block macro::[]// Barcode inline macro::[]1Type barcode type. One of bookland, codabar, code25, code25iata, code25interleaved, code39, code93, code128, code128a, code128b, code128c, ean8, ean13, gs1_128, qrcode, or upca.2Barcode attributes (see the Barcode attributes segment)threeThe content to encode inside the barcode

By default the content material field of the barcode macros can be interpreted as the barcode content material.This works fine for simple barcodes, but for complex statistics (e.g., a vCard encoded as a QR code) this is not realistic.If the external attribute is about on a barcode macro, the goal is interpreted as a file route.The barcode content material will then be received with the aid of analyzing the contents of the referenced record.Diagram Attributes

Certain diagram sorts allow image era to be custom designed using attributes.Each characteristic may be specified in keeping with individual diagram block or for all blocks of a given diagram type in a file stage.This is illustrated for the blockdiag fontpath characteristic in the example below.= Asciidoctor Diagram:blockdiag-fontpath: /path/to/font.ttf (1)[blockdiag] (2)........[blockdiag, fontpath="/route/to/otherfont.ttf"] (three)........1Attributes may be exact for all diagram of a positive type on the document level via prefixing them with -.In this situation, the fontpath characteristic is specified for all diagrams of kind blockdiag.2The first diagram does now not specify an specific price for fontpath so the global blockdiag-fontpath value could be used3The 2nd diagram does specify a fontpath value.This overrides the worldwide blockdiag-fontpath price.

Each attribute can both be special at the block stage or on the document degree.The characteristic call at the document stage must be prefixed with the diagram type name and a dash.

The set of shared attributes applies to all diagram kinds.The cost for those attributes may be described at the record level for a single diagram type the usage of the diagram type as prefix or for all diagram kinds the usage of diagram as prefix.NameDefault valueDescription

One of static, inline or interactive.This determines the style of SVG embedding that’s utilized in sure backends.The asciidoc spec describes this in more element.

External provider to render diagram.Usage removes the want to rely on external equipment to be mounted domestically.

The maximum size of the URI direction for HTTP GET requests.If the maximum length is handed, POST requests are used insteadAsciiToSVGNameDefault valueDescription

The font family to apply in the generated SVG photo

Disable drop-shadow blurringBarcodeNameDefault valueDescription

The top of the bars. (1D best, 2D uses ydim)

The width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim.

This is similar to xdim, however for the height of the blocks in a 2D barcode.

The width of the quiet region around the barcode.

The coloration of the bars targeted as a 3 or 6 digit hex RGB fee or HTML colour name.

The coloration of the heritage distinctive as a three or 6 digit hex RGB price or HTML color call.BlockdiagNameDefault valueDescription

The direction to the font that must be used by blockdiagBPMNNameDefault valueDescription

The target height of the diagram. Does not follow for output kind svg.

The target width of the diagram. Does now not observe for output kind svg.Diagrams

No particular attributes.DitaaNameDefault valueDescription

A scale thing this is applied to the photograph.

An integer value that specifies the tab length as some of areas.

The background colour of the photograph. The layout need to be a six-digit hexadecimal range (as in HTML, FF0000 for crimson). Pass an eight-digit hex to outline transparency.

Enables or disables anti-aliasing.

Prevents the separation of common edges of shapes.

Causes all corners to be rendered as round corners.

Enables or disable drop shadows.

Renders the debug grid over the ensuing photo.

Makes facets of parallelograms and trapezoids constant slope instead of fixed width.

Related Posts

Post a Comment