Template for contribution to Computo

Example dedicated to Python users

Creative Commons BY License ISSN 2824-7795

Authors
Affiliations
Published

August 2, 2026

Modified

August 2, 2026

Keywords

key1, key2, key3

Links

  • Build Status
Abstract

Template for preparing a submission to Computo, using the quarto journal extension, the Jupyter kernel (Python user) and the environment files to set-up the dependencies. For a detailed, step-by-step guide on preparing your article, setting up the continuous integration and submitting it to Computo, please consult the guidelines for authors.

1 Introduction

1.1 About this document

This document, accompanied by the customized GitHub repository, provides a template for writing contributions to Computo (Computo Team 2020).

TipNote

This document provides only the key formatting principles. For a detailed, step-by-step guide on preparing your article and submitting it to Computo, please consult the guidelines for authors.

1.2 Quarto

Quarto is a versatile formatting system for authoring documents integrating markdown, LaTeX and code blocks interpreted either via Jupyter or Knitr (thus supporting Python, R and Julia). It relies on the Pandoc document converter.

1.3 Requirements

You need quarto installed on your system and the Computo extension to prepare your document. For the latter, once quarto is installed, run the following to install the extension in the current directory (it creates a _extension directory which is ignored by git thanks to .gitignore by default):

quarto add computorg/computo-quarto-extension

Python and Jupyter must be installed on your computer.

2 Formatting

This section covers basic formatting guidelines for quarto documents.

To render a document, run quarto render. By default, both PDF and HTML documents are generated:

quarto render # renders both HTML and PDF
TipNote

To check the syntax of the formatting below, you can use the </> source button at the top right of this document.

2.1 Basic markdown formatting

Bold text or italic

  • This is a list
  • With more elements
  • It isn’t numbered.

But we can also do a numbered list

  1. This is my first item
  2. This is my second item
  3. This is my third item

2.2 Mathematics

2.2.1 Mathematical formulae

LaTeX code is natively supported1, which makes it possible to use mathematical formulae:

\[ f(x_1, \dots, x_n; \mu, \sigma^2) = \frac{1}{\sigma \sqrt{2\pi}} \exp{\left(- \frac{1}{2\sigma^2}\sum_{i=1}^n(x_i - \mu)^2\right)} \]

It is also possible to cross-reference an equation, see Equation 1:

\[ \begin{aligned} D_{x_N} & = \frac12 \left[\begin{array}{cc} x_L^\top & x_N^\top \end{array}\right] \, \left[\begin{array}{cc} L_L & B \\ B^\top & L_N \end{array}\right] \, \left[\begin{array}{c} x_L \\ x_N \end{array}\right] \\ & = \frac12 (x_L^\top L_L x_L + 2 x_N^\top B^\top x_L + x_N^\top L_N x_N), \end{aligned} \tag{1}\]

2.2.2 Theorems and other amsthem-like environments

Quarto includes a nice support for theorems, with predefined prefix labels for theorems, lemmas, proposition, etc. see this page. Here is a simple example:

Theorem 1 (Strong law of large numbers) The sample average converges almost surely to the expected value:

\[\overline{X}_n\ \xrightarrow{\text{a.s.}}\ \mu \qquad\textrm{when}\ n \to \infty.\]

See Theorem 1.

2.3 Python Code

Quarto uses either Jupyter or knitr to render code chunks. This can be triggered in the yaml header. In this tutorial, we use Jupyter (Python and Jupyter must be installed on your computer).

---
title: "My Document"
author: "Jane Doe"
jupyter: python3
---

python code chunks may be embedded as follows:

Hide/Show the code
import numpy as np
x = np.random.normal(0, 1, 10)
x
array([-0.86705152, -0.52845241, -0.9562521 ,  0.58610836, -1.87132179,
        0.81412207,  0.93814982, -1.14123728,  1.09981145,  0.03483234])

2.4 Figures

Plots can be generated as follows:

Hide/Show the code
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0.1, 2 * np.pi, 41)
y = np.exp(np.sin(x))

plt.stem(x, y)
plt.show()
Figure 1: A basic Stem plot

It is also possible to create figures from static images:

2.5 Tables

Tables (with label: @tbl-mylabel renders Table 1) can be generated with markdown as follows

Table 1: my table caption
Tables Are Cool
col 1 is left-aligned $1600
col 2 is centered $12
col 3 is right-aligned $1

2.6 Handling references

2.6.1 Bibliographic references

References are displayed as footnotes using BibTeX, e.g. [@computo] will be displayed as (Computo Team 2020), where computo is the bibtex key for this specific entry. The bibliographic information is automatically retrieved from the .bib file specified in the header of this document (here: references.bib).

2.6.2 Other cross-references

As already (partially) seen, Quarto includes a mechanism similar to the bibliographic references for sections, equations, theorems, figures, lists, etc. Have a look at this page.

2.7 Advanced formatting

Advanced formatting features are possible and documented (including interactive plots, pseudo-code, (Tikz) diagrams, Lua filters, mixing R + Python in the same document), but are beyond the scope of this simple introduction. We point to several entries in this direction.

WarningMore information

References

Computo Team. 2020. Computo: Reproducible Computational/Algorithmic Contributions in Statistics and Machine Learning.

Footnotes

  1. We use lualatex for this purpose.↩︎

Reuse

CC-BY-4.0

Citation

BibTeX citation:
@article{doe2026,
  author = {Doe, Jane and Doe, John},
  title = {Template for Contribution to {Computo}},
  journal = {Computo},
  date = {2026-08-02},
  doi = {10.5072/computo.0000},
  issn = {2824-7795},
  langid = {en},
  abstract = {Template for preparing a submission to Computo, using the
    {[}quarto journal
    extension{]}(https://github.com/computorg/computo-quarto-extension),
    the Jupyter kernel (Python user) and the environment files to set-up
    the dependencies. For a detailed, step-by-step guide on preparing
    your article, setting up the continuous integration and submitting
    it to Computo, please consult the {[}guidelines for
    authors{]}(https://computo-journal.org/site/guidelines-authors.html).}
}
For attribution, please cite this work as:
Doe, Jane, and John Doe. 2026. “Template for Contribution to Computo.” Computo, accepted, August 2. https://doi.org/10.5072/computo.0000.