xidoc is a consistent and powerful text language for creating documents.

It compiles to HTML, LaTeX and Gemtext, allowing you to create a webpage, a professional-looking PDF and a Gemini page from a single source file.

.xd xidoc -t:latex .tex pdflatex xelatex .pdf -t:html .html -t:gemtext .gmi

A Quick Look

For a more interactive experience, try the online playground.

xidoc code

[def greet; target; Hello from xidoc compiled to [arg target]!]
  [if-html [greet HTML]]
  [if-latex [greet [LaTeX]]]
  [if-gemtext [greet Gemtext]]
  We have [code python; print("code")],
  [$ m \mathbf A^\mathrm{T} \vec h],
  [pikchr 4rem; ellipse "pictures" fit color lime],
  [js-eval "ytilibammargorp".split("").reverse().join("")]
  and more!


Hello from xidoc compiled to HTML! We have print("code"), mAThm \mathbf A^\mathrm{T} \vec h, pictures , programmability and more!


What can I do with xidoc?


The logo of xidoc is the letter ξ (xi) rendered in the color #d0c.

Source Code

xidoc is available on SourceHut SourceHut and SourceHut GitHub under the GNU General Public Licence 3. (SourceHut is strongly preferred because it is important for free software to use free software infrastructure.)