*! version 1.0.1 16jan2026

Title

logoute -- Automated table conversion to HTML, Markdown, and LaTeX

Syntax

logoute, [options : command]

Options

Main
save(filename) name of output file (without extension)

replace overwrite existing file

html output in HTML format

md output in Markdown format

tex output in LaTeX format

excel output in Excel (XML) format

word output in Word (RTF) format

dec(#) force distinct decimal places

fix(#) adjust parsing sensitivity (default 5)

clear replace data in memory with captured table

ishere display an iframe snippet for direct ishere embedding

isheretext(text) display custom text after the iframe snippet

Description

logoute is built on top of logout (logout.ado). It keeps the original table-capture workflow from logout and adds direct HTML/Markdown table export, so users can generate publish-ready HTML tables from the same syntax.

It is particularly useful for generating descriptive statistics tables or simple frequency lists that need to be embedded in web reports or LaTeX documents. Compared with the original logout, logoute extends functionality by exporting HTML/Markdown tables directly and is optimized for the tohtml workflow, producing cleaner HTML with proper class attributes for styling.

The HTML/Markdown output from logoute is compatible with ishere for embedding in markdown documents. After generating a table with logoute, use ishere tab using "filename.html" to embed the table in your markdown report.

Detailed Options

save(filename) specifies the name of the output file. Extensions like .html or .tex are automatically appended based on the chosen format options.

replace permits overwriting existing files.

html generates a standard HTML table. This is ideal for inclusion in Markdown reports or websites.

md generates a Markdown table. This is suitable for direct use in markdown editors, GitHub, or further conversion using tools like pandoc.

tex generates a LaTeX tabular environment.

fix(#) specifies the sensitivity for the parser when converting plain text output to columns. Lower numbers (e.g., 1) are stricter, while higher numbers are looser. The default usually works well for standard Stata output.

ishere prints an iframe HTML snippet to the Results window after exporting the table. This is convenient when you want to paste/embed the table immediately with the ishere workflow.

isheretext(text) prints custom text after the iframe snippet. It is typically used together with ishere to add notes or markdown-friendly guidance in the log.

Examples

1. Basic Descriptive Statistics to Markdown

Calculate summary statistics for auto data and save as Markdown table:

. sysuse auto, clear

. logoute, save("mytable") replace md : tabstat price mpg weight, s(mean sd min max)

2. Basic Descriptive Statistics to HTML

Calculate summary statistics for auto data and save as HTML table:

. sysuse auto, clear

. logoute, save("mytable") replace html : tabstat price mpg weight, s(mean sd min max)

3. Frequency Table to LaTeX

Export a frequency tabulation of foreign cars to LaTeX:

. logoute, save("freq_table") replace tex : tabulate foreign

4. Workflow Integration

Using logoute as part of a Markdown report generation:

. log using report.md, replace text

. logoute, save("descriptives") replace html : tabstat price mpg, s(n mean)

. ishere tab using "descriptives.html"

. tohtml report.md, saving(final_report.md) html(final_report.html)

Author

Kerry Du

School of Management

Xiamen University

kerrydu@xmu.edu.cn

Huanyu Jia

School of Business

Zhengzhou University

jiahuanyu@zzu.edu.cn

Based on logout by Roy Wada (roywada@hotmail.com).

Enhanced for markdown workflows, and supports HTML/Markdown file export.