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.
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.
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.
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.
We can also make a PDF file for printing, where linked URLs appear as footnotes (the DocOnce source is of course the same).
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).
PDF with yellow background in code blocks (made from LaTeX source generated from DocOnce source).
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.
Sphinx default layout made from Sphinx-extended reStructuredText source generated from DocOnce. Other Sphinx layouts are ADCtheme, agni, agogo, alabaster, basic, basicstrap, bizstyle, bloodish, boilerplate, bootstrap, cbc, classic, cloud, dark, default, epub, fenics, fenics_classic, fenics_minimal1, fenics_minimal2, flat, haiku, jal, minimal5, modern5, nature, pylons, pyramid, redcloud, responsive, scipy_lectures, scrolls, slim-agogo, sphinxdoc, sphinx_rtd_theme, traditional, uio, uio2, vlinux-theme
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
HTML with the bloodish style made from DocOnce source
HTML with tactile-black style made from DocOnce source
HTML with tactile-red style made from DocOnce source
HTML with rossant style made from DocOnce source
HTML with Architects+Daughter Google font and the bloodish style made from DocOnce source
HTML with Clicker+Script Google font and the bloodish style made from DocOnce source
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 style made from DocOnce source
HTML with with the solarized_dark style made from DocOnce source
HTML with with the solarized2_light style made from DocOnce source
HTML with with the solarized2_dark style made from DocOnce source
HTML with with the solarized3_light style made from DocOnce source
HTML with with the solarized3_dark style made from DocOnce source
HTML with with the solarized_box html template made from DocOnce source with a template file (slight edit of a DocOnce template)
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
HTML Bootstrap style with fixed toc made from DocOnce source with a template file
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
IPython notebook made from IPython notebook .ipynb file generated from DocOnce source
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
).
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