*! version 1.5.0 31dec2025

Title

findsj -- Search and cite Stata Journal articles with interactive buttons

Syntax

Search for articles

findsj
[keywords]
[, options]

Show citation formats for specific article

findsj
article_id
, ref

Download BibTeX or RIS file

findsj
article_id
, type(bib|ris)

Update local database

findsj
, update [source(github|gitee|both)]

Configure download path

findsj
, setpath(path) | querypath | resetpath

Search scope
author search by author name

title search by article title

keyword search by keyword (default)

Display control
n(#) number of results to display; default is n(10)

allresults display all search results

nobrowser suppress clickable buttons and links

nopdf hide PDF download buttons

nopkg hide package installation buttons

Citation and export
ref enable citation buttons (.md, .latex, .txt) for each article

md export all results in Markdown format

markdown same as md

latex export all results in LaTeX format

tex same as latex

plain export all results in plain text format

noclip disable automatic clipboard copying

getdoi fetch DOI information (auto-enabled with ref)

Database management
update update local database from specified source

source(string) download source: github, gitee, or both

Path management
setpath(path) set custom download path for BibTeX/RIS files

querypath display current download path

resetpath reset to default path (current directory)

Other
clear clear previous search results

debug enable debug mode with trace output

Description

findsj searches articles published in the Stata Journal (2001-present)
and Stata Technical Bulletin (1991-2000). It provides an integrated workflow
for finding, reading, citing, and installing Stata packages from journal articles.

Key features:

1. Interactive Search - Search by keyword, author, or title with real-time results from
the official Stata Journal website.

2. Clickable Buttons - Each search result displays interactive buttons that execute
actions with a single click:

• Article - Opens article page in your browser

• PDF - Opens full-text PDF in browser (requires DOI)

• Google - Searches article on Google Scholar

• Install - Searches for installable Stata packages

• Ref - Displays citation format buttons

• BibTeX - Downloads BibTeX reference file

• RIS - Downloads RIS reference file

3. Citation Generation - Generate properly formatted citations in three formats:

• Markdown (.md) - For R Markdown, Quarto, and Markdown documents

• LaTeX (.tex) - For LaTeX papers and Overleaf

• Plain text (.txt) - For Word and plain text documents

Citation format follows getiref style:

Cox, N. J. (2007). Speaking Stata: Identifying Spells. The Stata Journal, 7(2), 249-265.

4. File Export with Quick Access - Export citations are saved to current directory
with four access buttons:

• View - Open in Stata's viewer

• Open_Mac - Open with default Mac app

• Open_Win - Open with default Windows app

• dir - Browse to file location

5. Automatic Clipboard - Citations are automatically copied to clipboard (disable with noclip).

6. Smart Database - Local database (findsj.dta) enables offline DOI lookup and faster
citation generation. Updates available from GitHub or Gitee (China mirror).

Options

Search scope

author searches for articles by author name. Example: findsj cox, author

title searches for articles by words in the title.

keyword searches across titles, abstracts, and keywords. This is the default
if no scope is specified.

Display control

n(#) specifies maximum number of results to display. Default is 10.
Use allresults to show all matches.

allresults displays all search results without limit. Useful for comprehensive
reviews or when exporting complete citation lists.

nobrowser suppresses all clickable buttons and links. Use when working in
batch mode or when buttons are not needed. By default, seven buttons appear
for each result: Article, PDF, Google, Install, Ref,
BibTeX, and RIS.

nopdf hides PDF download buttons. PDF links require DOI information from
the local database or online fetch.

nopkg hides the Install button. By default, this button executes
search article_id to find installable packages associated with the article.

Citation and export

ref enables citation mode. When specified, each search result displays three
clickable format buttons below the article information:

• .md - Click to generate Markdown citation via getiref

• .latex - Click to generate LaTeX citation via getiref

• .txt - Click to generate plain text citation via getiref

This option automatically enables getdoi to fetch DOI information required
for citation generation.

md or markdown exports all search results as formatted citations in
Markdown format. The output includes:

• Citations displayed in Results window

• File saved as _findsj_temp_out_.md in current directory

• Citations copied to clipboard (unless noclip specified)

• Four access buttons: View, Open_Mac, Open_Win, dir

Citation format example:

Cox, N. J. (2007). Speaking Stata: Identifying Spells. The Stata Journal, 7(2).
[Link](https://...), [PDF](https://...), [Google](<https://...>)

latex or tex exports citations in LaTeX format with \href commands.
File saved as _findsj_temp_out_.txt.

Format example:

Cox, N. J. (2007). Speaking Stata: Identifying Spells. The Stata Journal, 7(2).
\href//..., \href//..., \href//...

plain exports citations in plain text format. File saved as _findsj_temp_out_.txt.

Format example:

Cox, N. J. (2007). Speaking Stata: Identifying Spells. The Stata Journal, 7(2).
Link: https://..., PDF: https://..., Google: https://...

noclip disables automatic clipboard copying. By default, export formats
(md, latex, plain) automatically copy citations to system clipboard
using PowerShell (Windows) or pbcopy (Mac).

getdoi fetches DOI and page information for all articles. This option:

• First searches local database (findsj.dta) if available

• Falls back to real-time web fetch if not in database

• Enables complete citations with page numbers

• Enables PDF download links

• Is automatically activated when ref is specified

Database management

update initiates database update process. Without source(), displays
clickable buttons for available sources. With source(), downloads database
from specified location.

source(string) specifies download source:

• github - Download from GitHub

• gitee - Download from Gitee mirror (fallback when GitHub is unavailable)

• both - Try GitHub first, fallback to Gitee if failed (recommended for reliability)

The database file (findsj.dta) is updated in place where findsj.ado is installed.
Contains DOI and page information for all Stata Journal articles. The database is
automatically updated by GitHub Actions that monitor the Stata Journal website for
new publications. findsj checks once daily and reminds if database is >120 days old.

Path management

setpath(path) sets persistent download directory for BibTeX and RIS files.
Directory must exist. Setting is saved to findsj_config.txt in personal ado
directory and persists across Stata sessions.

Example: findsj, setpath(d:/references)

querypath displays current download path. Shows custom path if set, otherwise
shows default (current working directory).

resetpath resets download path to default by removing configuration file.

Other

clear clears previous search results before new search. Helps avoid confusion
with multiple searches.

debug enables trace mode for troubleshooting. Use when reporting issues.

Examples

Important: All examples produce clickable buttons in the output. Simply click
any blue underlined text or button with your mouse to execute the action.

Basic Search

. findsj panel data

→ Searches for "panel data", displays 10 results with 7 buttons each

. findsj cox, author

→ Finds all articles by Nicholas J. Cox

. findsj propensity score matching, title

→ Searches article titles only

. findsj instrumental variable, n(20)

→ Shows first 20 results

. findsj difference-in-differences, allresults

→ Shows all matching articles

Using Interactive Buttons

. findsj fixed effects

For each result, click:

• Article to read abstract online

• PDF to view full text in browser

• Google to search on Google Scholar

• Install to find and install Stata package

• Ref to see citation format options

• BibTeX to download BibTeX file

• RIS to download RIS file for Zotero/EndNote

Citation Generation - Individual Articles

. findsj matching, ref

→ Shows three format buttons (.md, .latex, .txt) below each result

→ Click any button to generate and copy that citation format

. findsj st0001, ref

→ Shows citation buttons for specific article ID

→ Useful when you already know the article ID

Citation Export - Batch Mode

. findsj causal inference, md

→ Exports first 10 citations in Markdown format

→ Saves to _findsj_temp_out_.md

→ Copies to clipboard automatically

→ Shows View/Open_Mac/Open_Win/dir buttons

. findsj meta-analysis, latex allresults

→ Exports ALL results in LaTeX format

→ Perfect for comprehensive literature reviews

. findsj quantile regression, plain noclip

→ Exports in plain text without clipboard

→ Use when you don't want clipboard overwritten

Reference File Download

. findsj st0377, type(bib)

→ Downloads BibTeX file for article st0377

→ File saved to configured path and auto-opened

. findsj dm0065, type(ris)

→ Downloads RIS file for EndNote/Zotero/Mendeley

Tip: You can also click BibTeX or RIS buttons in search results

Database Management

. findsj, update

→ Shows clickable buttons for GitHub, Gitee, and both

→ Click your preferred source to start download

. findsj, update source(both)

→ Downloads from GitHub, falls back to Gitee if failed

→ Recommended for reliability

. findsj, update source(github)

→ Downloads from GitHub only

. findsj, update source(gitee)

→ Downloads from Gitee (faster for China users)

Download Path Configuration

. findsj, setpath(d:/MyPapers/References)

→ Sets custom download location

→ Applies to all BibTeX and RIS downloads

→ Setting persists across sessions

. findsj, querypath

→ Shows current download path

. findsj, resetpath

→ Resets to default (current directory)

Advanced Usage

. findsj simulation monte carlo, nopdf nopkg

→ Minimal output: hides PDF and Install buttons

. findsj bootstrap, nobrowser

→ No clickable buttons (for batch scripts)

. findsj survival analysis, md allresults getdoi

→ Export all results with complete DOI information

Stored results

findsj stores the following in r():

Scalars

r(n_results) number of articles found

Macros

r(keywords) search keywords used

r(scope) search scope: author, title, or keyword

r(url) URL of search results page

r(art_id_1) article ID of first result

r(title_1) title of first result

r(author_1) author of first result

r(doi_1) DOI of first result (if available)

r(url_1) URL of first result article page

Remarks

Complete documentation and examples available at:

GitHub repository

Gitee mirror (China)

Authors

Yujun Lian

Lingnan College, Sun Yat-sen University

Email: arlionn@163.com

Web: www.lianxh.cn

Chucheng Wan

Email: chucheng.wan@outlook.com

Also See

Help: search, net, ssc

Web: GitHub,
Gitee,
Stata Journal,
Lianxh