Title

Weaver Markup -- Annotates string in HTML log in weaver package

Description

Weaver Markup is not a Stata command. It is a JavaScript-based markup language
written for Weaver package to style text and annotate the dynamic document.
These markup codes can be
used anywhere in the dynamic document. These markup codes can be used with txt
command or options that specify a title or a description in the HTML log.
The Weaver markup codes are particularly important
for styling dynamic text. visit
Weaver Markup
for more information.

Syntax

Markup Description

Headings
*- txt -* prints a heading 1 in <h1>txt</h1> html tag

*-- txt --* prints a heading 2 in <h2>txt</h2> html tag

*--- txt ---* prints a heading 3 in <h3>txt</h3> html tag

*---- txt ----* prints a heading 4 in <h4>txt</h4> html tag

Text decoration
#* txt *# undescores the text by adding <u>txt</u> html tag

#_ txt _# makes the text italic by adding <em>txt</em> html tag

#__ txt __# makes the text bold by adding <strong>txt</strong> html tag

#___ txt ___# makes the text italic and bold by adding <strong><em>txt</em><strong> html tag

Page & paragraph break
line-break breaks the text paragraphs and begins a new paragraph

page-break breaks the page and begins a new page

Text alignment
[center] txt [#] aligns the txt to the center of the page

[right] txt [#] aligns the txt to the right side of the page

[mono] txt [#] prints the text in mono-space font.

[box] txt [#] places the text in a colored box to make it more destinctive from the rest of the document. It can be used for emphesizing a text paragraph or a quotation.

Text color
[blue] txt [#] changes the txt color to blue

[green] txt [#] changes the txt color to green

[red] txt [#] changes the txt color to red

[purple] txt [#] changes the txt color to purple

[pink] txt [#] changes the txt color to pink

[orange] txt [#] changes the txt color to orange

Text Highlighter
[-yellow] txt [#] changes the txt background color to yellow

[-blue] txt [#] changes the txt background color to blue

[-green] txt [#] changes the txt background color to green

[-pink] txt [#] changes the txt background color to pink

[-purple] txt [#] changes the txt background color to purple

[-gray] txt [#] changes the txt background color to gray

Link
[-- "link" --][- txt -] assigns a link to the corresponding txt

Example of interactive use

You want to display a Heading, Subheading, subsubheading, and
subsubsubheading in the HTML log. Use the heading syntax.

. txt *- This Is Heading -*

. txt *-- This Is Subheading --*

. txt *--- This Is Subsubheading ---*

. txt *---- This Is Subsubsubheading ----*

You have a local macro representing a P-Value and you want to display it as
Bold and highlight it with yellow marker if it is less or equal to 0.05.

. if `p' <= 0.05 txt [-yellow] #__`p'__# [#]

Related Packages

Weaver : Creating HTML and PDF dynamic documents

Markdoc: Converting SMCL to any format using Pandoc