-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathecho.ado
More file actions
63 lines (46 loc) · 1.67 KB
/
echo.ado
File metadata and controls
63 lines (46 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// documentation written for markdoc software; visit github.com/haghish/markdoc
/***
_version 1.0_
echo
====
a program that displays the given string in Stata
Syntax
------
> __echo__ _"character string"_ [, _red_ _bf_ _it_ ]
### Options
| _option_ | _Description_ |
|:----------|:----------------------------|
| __red__ | print the text in red color |
| __bf__ | bold face text |
| __it__ | italic face text |
Description
-----------
__echo__ is a simple Stata program that is documented using Markdown format, in order to
facilitate software documentation, particularly on social coding sites such as GitHub.
the documentation can be extracted as _Markdown_ file for GitHub wiki or as _STHLP_ file
using [__markdoc__](https://github.com/haghish/markdoc) software.
Example
-------
Display "Hello World" in red color
. echo "Hello World", red
Author
------
E. F. Haghish
_haghish@med.uni-goesttingen.de_
[https://github.com/haghish/echo](https://github.com/haghish/echo)
License
-------
MIT License
***/
cap prog drop echo
program echo
macro drop CurrentMarkDocDofile
macro list CurrentMarkDocDofile
version 14 //minimum required Stata version
syntax anything [, red bf it] //program syntax
if missing("`red'") local red txt //make 'txt' the default format
else local red err //define 'err' format for 'red' color
if !missing("`bf'") local bf "{bf}" //define bold-face directive
if !missing("`it'") local it "{it}" //define italic-face directive
display as `red' "`bf'" "`it'" `anything' //executing the command
end