Syntax - YujiSODE/gCS GitHub Wiki

Source code of geological columnar section consits of three blocks: @VAR, @FIG and @TXT.
All descriptions should be put between relating blocks. These blocks must be escaped with #
as follows:

#@VAR 
...
#@VAR
#@FIG
#...
#@FIG
#TXT
#...
#TXT

1. Block @VAR

Tcl variables in namespace ::gCS are declared in this block.
Variables to be used are declared in a format of variable variableName {value0 value1 ...}.

  • variable _SIZE {width height};
    size of a canvas element in generated HTML file.

    • width: width of canvas element in pixels
    • height: height of canvas element in pixels
  • variable _FONT {CSS_font_value};
    font value described in CSS font value.

  • variable _TITLE {title_text};
    a title name of using data.

  • variable _SCALE {scaleLabel width height};
    scale bar values.

    • scaleLabel: a label of scale bar
    • width: width of scale bar in pixels
    • height: height of scale bar in pixels
  • variable stratumName {standardWidth color|filePath};
    a information of a stratum.

    • stratumName: name of a stratum
    • standardWidth: standard width of this stratum in columnar section in pixels
    • color|filePath: CSS <color> value or image file for texture of this stratum in columnar section

2. Block @FIG

All descriptions in this block must be escaped with #.
A columnar section is described using declared names of strata between @VAR.

Every stratum in this columnar section is described with following syntax
#stratumName:dy ?dx1 dx2?:text??;
and it indicates no data over given thickness dy when stratumName is not a declared value in block @VAR
such as ---.

Syntax for a stratum consits of three elements: name, values and text.
They must be separated with : and end with ;.

  • element name: stratumName in the above syntax; it may be a declared stratum name in block @VAR.
  • element values: dy, dx1 and dx2 in the above syntax;
    they are positive numbers separated with white space. dx1 and dx2 can be 0.
  • element text: text in the above syntax; it is an optional description.

dy, dx1 and dx2 in a stratum is shown using x0 and y0 for initial values as follows:

(x0,y0)
+-------+ (x0+stdX+dx2,y0)
|        \
+---------+ (x0+stdX+dx1,y0+dy)
(x0,y0+dy)

while stdX is a value declared as standardWidth in a declared stratum name.

3. Block @TXT

All descriptions in this block must be escaped with #.
All descriptions in this block are regarded as additional information.

⚠️ **GitHub.com Fallback** ⚠️