WFDB-x

A fast, lightweight implementation of the WFDB library and command-line tools, with identical behavior across seven programming languages

View the Project on GitHub alphanumericslab/wfdb-x

WFDB-x user’s manual

The user’s manual of WFDB-x, in LaTeX: the concepts shared by the seven implementations, one chapter for the users of each language (Python, C++, Rust, Julia, R, MATLAB/Octave and Kotlin), and a reference of the WFDB library functions, the command-line tools, the storage formats and the annotation codes.

Building the PDF

With a TeX distribution that includes the fonts XCharter, Source Sans Pro and Inconsolata (TeX Live with texlive-fonts-extra, MiKTeX, or Overleaf):

cd docs/user-manual
latexmk -pdf wfdb-x-user-manual.tex

or pdflatex wfdb-x-user-manual.tex, run three times (for the table of contents and the cross-references). On Overleaf, upload this directory and set the main document to wfdb-x-user-manual.tex and the compiler to pdfLaTeX.

Keeping the manual in step with the code

Every change to WFDB-x is reflected in the manual, in the same change (see docs/porting-guide.md), and the PDF is rebuilt. check_manual.py compares the manual with the code:

python3 docs/user-manual/check_manual.py          # from the repository root

It checks that every public function of the high-level API of each language has an entry in that language’s chapter, with every parameter of the code and no other (and, for Python, the exact signature, defaults included), that every WFDB library function and every command-line tool has an entry in the reference, that every option of a tool’s entry is an option of that tool, and it runs the Python examples. It reports each difference, and exits with a nonzero status if there is one.

Writing conventions

So that the chapters read as one manual, and so that check_manual.py can read them: