Notes on Child Documents

There are a variety of reasons you might want to keep parts of your document in several separate files. Perhaps you have some HTML or CSS that you want to include with every file on your website (to provide style or navigation). Perhaps you have the same Stata code that you use to set up the same examples for several separate documents.

In the context of Stata’s dynamic documents, the first place you might look is at the dynamic tag <<dd_include: filename >>. There are a few details you should be aware of.

There are a variety of web methods for including one HTML page within another. You could include the code for one of these within your document in the right place. Advising you which method to use is a bit beyond my scope.

Bottom line: <<dd_include>> is intended for pure text/Markdown or pure HTML inclusions. Be aware that text mixed with HTML will be interpreted as Markdown. For Stata code or results inclusions, think instead of <<dd_do>>.