Skip to content

Documentation tools and conventions

Jonas Bernoulli edited this page Jun 7, 2024 · 5 revisions

The source file for the Magit manual is magit.org (located in docs/). In a first step that file is converted to magit.texi, and in a second step that in turn is converted to magit.info, magit.pdf, magit.html and magit/*.html.

Between those files you should only ever edit magit.org by hand.

Note that these instructions also apply to the manuals of some of my other packages.

Org’s texinfo exporter

magit.org is exported to magit.texi using Org mode’s export feature (specifically the texinfo exporter). At least Org 9.6 is required.

Generating magit.texi

To generate just magit.texi use:

make texi

Or to generate all output formats:

make docs

Tracking magit.texi

Even though magit.texi is a generated file we have to track it in the repository. Neither Melpa nor package.el support using Org export to convert *.org files to *.texi. Because of that the generated file currently has to be checked into Git. I am trying to change that but it is an uphill battle.

If you are stuck on an older Org release, just edit magit.org and mention in the pull-request, that you were unable to generate magit.texi.