The following control words are used to set text formatting properties.
1. \b : If a sentence contains
\b, it will be shown in bold. However, this option is not sticky. So, new lines will be shown in regular font face.
2. \i : To show text in italic. This option is not sticky. So, new lines will be shown in regular font face.
3. \par : To start a new paragraph
4. \super : Show text in super-script, e.g
asdocx, text(The R\super2 is 0.25)
will be shown as The R2 is 0.25
5. \sub : Show text in sub-script, e.g
asdocx, text(The B\sub1 is 0.98)
will be shown as The B1 is 0.98
Options are written outside the brackets of the text(). The following options can be used to format the given text.
1. h1 or heading1: Either
heading1 is used to make the current line as heading 1. Similarly,
heading9 can be used.
2. title : option title is used to make the current line as document title.
asdocx, text(This is my new text line) fs(14)
asdocx, text(Yet another line) font(Arial)
5. Page breaks
Page breaks can be added with the option
pagebreak(before) inserts a page break before a given table.
pagebreak(after) inserts a page break after the table.
6. linebreak : adds a typical line break. New text restarts on the next line.
Consider the following examples:
asdocx, text("Panel Data Analysis") title replace
asdocx, text("Results and Summary Statistics.") fs(18)
asdocx, text("\b I a am bold item. ") fs(12)
asdocx, text("This section of the report will present the results and analysis.") fs(14)
asdocx, text(\i Notes to the tables are reported in table notes.)
asdocx, text(" Significance level is reported with *, **, ***. ")
asdocx, text("The R\super2 of the model is 0.0764.")
asdocx, text("The coefficient B\sub1 indicates a positive ...")
The output from the above codes is given below.
The convenience trick
It may be inconvenient to type asdocx, text() each time a text line is written. One can write the asdocx, text( to a local or global macro and then add that macro to the beginning of the text line. However, this still does not eliminate the discomfort of closing the brackets at the end of each text line. But we do not have to worry as asdocx insects each text command for the closing bracket. When not available, it then adds the closing bracket to the end of the line. One caveat is that we cannot add any option when using this trick. This is because the bracket is added to the end of the line, which makes everything part of the text, including any option that we may add with the text command. Therefore, when options must be added, we have to write the full text command in conventional way. See example 2 below:
Example Reports : Text, results and graphs
Example 1 : Download the Do File | Download the output file
Example 2 : Using convenience trick | Download the output file