# Examples of scientific reports in different formats

Hans Petter Langtangen [1, 2]

[1] Simula
[2] Univ. of Oslo

#### Jul 2, 2016

The purpose of this page is to exemplify how to write scientific reports in various formats: LaTeX PDF, HTML, Sphinx, IPython notebook, HTML blog post, etc.

# Reports generated from plain text in DocOnce format

The DocOnce source code for all the examples resides in a file report.do.txt. In the doconce format commands below, for translating the text to LaTeX, HTML, etc., one can use the full filename report.do.txt or just report. If you want to play around with report.do.txt and modify it, you need the DocOnce source, figure files, computer code, etc. All the files are contained in a directory at GitHub.

## PDF via LaTeX

### Default LaTeX format

The classical LaTeX-style report format is widely used throughout mathematical sciences. This PDF version was made from the hand-written DocOnce source report.do.txt, first translated to LaTeX source code and then compiled to PDF.

### Modern LaTeX format

Here is another version of the same report, this time in a fresher, more modern PDF format for electronic view where URLs and references are hyperlinks. This PDF file is made from LaTeX source generated from DocOnce source.

### PDF aimed at printing

We can also make a PDF file for printing, where linked URLs appear as footnotes (the DocOnce source is of course the same).

### PDF for viewing on a phone

DocOnce can generate LaTeX for A4 or A6 paper size, if desired. The A6 size is good for smart phones, see the PDF file (made from DocOnce source). In this versiond we also change the LaTeX font to Palatino (--latex_font=helvetica is another possibility).

### Fancy typesetting of code blocks

PDF with yellow background in code blocks (made from LaTeX source generated from DocOnce source).

## Sphinx documents

The Sphinx documentation system is very popular for creating online documents with fancy and attractive layouts. Check out the author's favorite themes: alabaster, bizstyle, bootstrap, bloodish (or cbc), fenics_minimal1, pyramid, redcloud, and scipy_lectures.

## HTML documents

### Simple styles

HTML with the blueish style made from DocOnce source (see HTML code)

HTML with the blueish2 style (same as blueish style unless pygments is turned off, then the code style is different, and admonitions has apricot default background color) made from DocOnce source

### Solarized styles

The solarized color style for online documents has received much attention. Below are some examples on DocOnce support for this color style.

HTML with with the solarized_box html template made from DocOnce source with a template file (slight edit of a DocOnce template)

### Bootstrap styles

DocOnce supports a range of HTML styles based on the Bootstrap framework. Such styles are seen all over the Internet and have a lot of functionality, e.g., responsive pages for smart phones and large screens. Here are some Bootstrap-based HTML styles: plain bootstrap made from DocOnce source, bloodish, FlatUI, bluegray. And here are some Bootswatch styles: cosmo, journal, readable, cyborg.

HTML Vagrant style made from DocOnce source with a template file

### Other styles

HTML (modified) GitHub minimal style made from DocOnce source with the GitHub minimal theme template (this template is best suited for a contents pages and not a full report)

HTML plain Markdown style made from Markdown generated from DocOnce source

## Other formats

### IPython notebook

IPython notebook made from IPython notebook .ipynb file generated from DocOnce source

### Wiki

MediaWiki made from MediaWiki format generated from DocOnce source

For reports without mathematics, DocOnce can also generate Googlecode wiki format (used at code.google.com) and the Creole wiki format (used at bitbucket.org).

### Blog posts

Google blog post at doconce.blogspot.com based on on HTML code generated from DocOnce source

Wordpress blog post at doconcereportdemo.wordpress.com based on HTML code generated from DocOnce source