Skip to content

Open the online HTML or PDF manual help document for specific Stata command using the default browser with -wwwhelp- and -ihelp- commands.

License

Notifications You must be signed in to change notification settings

arlionn/wwwhelp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ihelp and wwwhelp commands

Chen Yongli, Lian Yujun. Browse and cite Stata manuals easily: the wwwhelp command. Stata Journal, 2024, 24 (1): 161–168. -PDF-, Link, Google, -Appendix-

Note: This document is transfered from ihelp.sthlp using ChatGPT 4o. Click here to view the Prompts.

Description

What is ihelp/wwwhelp?

ihelp is a sister of Stata's help command, providing a fast and easy way to access the online HTML or PDF versions of Stata's official help files. ihelp is a shorter and easier-to-remember version of wwwhelp, with the same functionality.

  • Simply type ihelp xtreg, and Stata will open xtreg.pdf.
  • Type ihelp xtreg, md, and it will generate and copy the Markdown text [**[XT]** xtreg](https://www.stata.com/manuals/xtxtreg.pdf) to your clipboard. You can then paste it into your Markdown editor with Ctrl+V.

Why ihelp?

The default help command in Stata only displays help files within the Stata interface, which is not ideal for sharing. ihelp allows these files to be accessed and used outside of Stata.

ihelp also offers various formatting options, including markdown, txt, ms, latex, texfull, and format(#). These formats provide web links to the online help files and automatically copy the desired format to the clipboard. Additionally, ihelp can handle command abbreviations and list similar commands when an abbreviation is ambiguous.

In short, just add i or www before help, and you can enjoy Stata's extensive help resources online.

Install

The ihelp command can be installed from SSC, while wwwhelp is hosted on the Stata Journal server.

To install ihelp from SSC:

ssc install ihelp

To install wwwhelp from the Stata Journal server:

net install pr0079.pkg, replace all

which will download the following files:

. net des pr0079.pkg

package pr0079 from http://www.stata-journal.com/software/sj24-1

TITLE
    SJ24-1 pr0079. Open the online help file or PDF ...
    DOI:  10.1177/1536867X241233676

INSTALLATION FILES              (type net install pr0079)
    pr0079/hhelp.ado
    pr0079/hhelp.sthlp
    pr0079/wwwhelp.ado
    pr0079/wwwhelp_cn.sthlp
    pr0079/wwwhelp.sthlp

ANCILLARY FILES                 (type net get pr0079)
    pr0079/online_appendix.pdf
    pr0079/wwwhelp.do

Syntax

ihelp command_name [, 
      web markdown txt ms 
      texfull latex 
      format(#) clipoff]
  • web: Quickly open a simple HTML version, which by default opens a detailed PDF document.
  • markdown: Provide the web link to the online help document in Markdown format.
  • txt: Provide the web link in plain text format, which can be pasted into the dialog box of Facebook or WeChat for Chinese users.
  • ms: Copy rich text punctuated with links to the clipboard, which can be pasted into Microsoft documents.
  • texfull: Provide the web link in LaTeX full syntax format.
  • latex: Provide the web link in LaTeX compact format.
  • format(#): Provide the web link in preset formats, including three modes.
  • clipoff: Do not copy the link to the clipboard.

Options

Main Options

  • web: Quickly open a simple HTML version, which by default opens a detailed PDF document.

Formatting Options

Provide web links to online help documents, which can be put into specific formats and automatically copied to the clipboard.

  • markdown: Display the web link in Markdown format. For example, ihelp regress, markdown displays the text in the following format:

    [**[R]** regress](https://www.stata.com/manuals/rregress.pdf)

    It can be copied to a Markdown file and displayed as a clickable link as:

    [R] regress

  • txt: Display the web link in text (command:URL) format. For example, ihelp regress, txt displays the text in the following format:

    [R] regress: https://www.stata.com/manuals/rregress.pdf

    It can be copied to the dialog box of Facebook or WeChat for Chinese users as:

    [R] regress: https://www.stata.com/manuals/rregress.pdf

  • ms: Send a rich text punctuated with links to the clipboard, which can be pasted easily into Microsoft Word. For example, ihelp regress, ms will appear as a clickable link when pasted into Microsoft Word.

    [R] regress: https://www.stata.com/manuals/rregress.pdf
    

    Note: This option requires Stata 16 or newer and Python installed, and is currently only available for Windows systems.

  • texfull: Display the web link in full TeX text format. For example, ihelp regress, texfull displays the text in the following format:

    \href{https://www.stata.com/manuals/rregress.pdf}{\bfseries{[\MakeUppercase{r}] regress}}
    

    It can be inserted into a .tex document and displayed as a clickable link in the PDF file when compiled using a TeX editor as:

    [R] regress

  • latex: Display the web link in LaTeX format. For example, ihelp regress, latex displays the text in the following format:

    \stihelp[r]{regress}
    

    It can be inserted into a .tex document and displayed as a clickable link in the PDF file when compiled using a TeX editor. Note: \stihelp is a user-defined command that needs to be defined in the introductory section of the .tex document:

    \newcommand{\stihelp}[2][r]{\href{https://www.stata.com/manuals/#1#2.pdf}{\bfseries{[\MakeUppercase{#1}] #2}}}
    
  • format(#): Display web links in three supporting Markdown preset formats.

    • format(1) renders as [**[R]** regress](https://www.stata.com/manuals/rregress.pdf)
    • format(2) renders as [regress](https://www.stata.com/manuals/rregress.pdf)
    • format(3) renders as [help regress](https://www.stata.com/manuals/rregress.pdf)
  • clipoff: Deselect copying to the clipboard.


Examples

Basic use: Open help document

. ihelp pwcorr
. ihelp clip(), web
. ihelp mata function
. ihelp twoway scatter, web
. ihelp sum

Auxiliary use: Provide web link

. ihelp twoway scatter, m
. ihelp import excel, w web
. ihelp xtreg, latex
. ihelp xtreg, tex
. ihelp xtreg, f(2)
. ihelp xtreg, f(3) clipoff

Stored Results

You can view the stored results through return list (see help return) after using ihelp:

  • r(link): Web links (URLs) to PDF help documents
  • r(link_web): Web links (URLs) to web versions of help documents
  • r(link_m): Markdown formatted web link text
  • r(link_txt): Command:URL formatted web link text
  • r(link_l1): LaTeX raw formatted web link text
  • r(link_l2): LaTeX custom-formatted web link text
  • r(link_f1): First pre-formatted web link text
  • r(link_f2): Second pre-formatted web link text
  • r(link_f3): Third pre-formatted web link text

Author

  • Yujun Lian (连玉君)

  • Yongli Chen (陈勇吏)

    • Antai College of Economics and Management, Shanghai Jiao Tong University, China.
    • E-mail: yongli_chan@163.com

Citation

  • Chen Yongli, Lian Yujun. Browse and cite Stata manuals easily: the wwwhelp command. Stata Journal, 2024, 24 (1): 161–168. -PDF-, Link, Google, -Appendix-

Also See

  • Online: help, findit, search

About

Open the online HTML or PDF manual help document for specific Stata command using the default browser with -wwwhelp- and -ihelp- commands.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages