For those who are not yet familiar with asdoc, asdoc can be downloaded from SSC and can be used with almost all Stata commands. Here is a short blog post that shows how asdoc can be used with any Stata command. You can also watch several YouTube videos that show the use of asdoc
ssc install asdoc
Customizing the table title
The focus of this blog entry is to highlight some of the tricks that can be used in asdoc to customize the table titles. asdoc produces some generic table titles with many Stata commands. However, the default table titles can be replaced by using the option title(). In the following text, I discuss this and several other features of asdoc to modify the table titles:
1. Custom titles
If custom titles are needed, just use option title( title text). See the following example.
sysuse auto asdoc tab rep78 , title(My cutom table title) replace
2. Title not required
We can use an empty title if the table title is not required. In the following example, I am using the backslash (\) inside the title option. This will produce empty title in the document.
asdoc tab rep78 , title(\) replace
3. Title is needed in italics
We can use many RTF directives inside the title option. So to get the title in italics font, the code would be:
asdoc tab rep78 , title(\i My custom table title) replace
4. Title with bigger font size
The default in asdoc is to report table titles in boldface and font size of 10pt. If bigger or smaller font size is needed, again we can pass the RTF directive \fs# to the document. So to produce a title with 14 pt, we shall type:
asdoc tab rep78 , title(\fs28 My custom table title) replace