Themes

Doconce supports the following themes from the Bootstrap family:

You write Boostrap HTML files as normal Doconce documents, but there are some additional features:

Quick generation of websites

To make a typical website with Bootstrap layout and different type of pages for different things, just

  • write a main document in Doconce, insert a !split before the first section
  • write other documents and store their HTML versions in subdirectory static_*
  • link the documents (locally) to each other (link directly to the HTML version in static_*)

1: "Admon" is a short form of admonition: a box that highlights some text, either as extra material or as particularly important material. Doconce supports different types of admonitions: notice, question, summary, and warning. These can have an optional title, and some admonition styles will also include an icon image. In addition, there is a block admonition without a title and icon.

Demonstrations of admons

The Bootstrap/Bootswatch styles support two kinds of admons:

Typical commands for producing Boostrap or Bootswatch layouts are

Terminal> doconce format html mydoc --html_style=boostrap
Terminal> doconce format html mydoc --html_style=booswatch
Terminal> doconce format html mydoc --html_style=boostrap --admon_style=bootstrap_panel
Terminal> doconce format html mydoc --html_style=booswatch_superhero --admon_style=bootstrap_panel

Below are some examples on admons.

Warning: recall to prefix module functions

In [1]: import numpy as np

In [2]: x = np.linspace(0, 4*np.pi, 11)

In [3]: y = exp(-0.1*x)*sin(x)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-c1040545fa6c> in <module>()
----> 1 y = exp(-0.1*x)*sin(x)

NameError: name 'exp' is not defined

In [4]: y = np.exp(-0.1*x)*np.sin(x)

In [5]: y
Out[5]:
array([  0.00000000e+00,   8.38747563e-01,   4.57160372e-01,
        -4.03174933e-01,  -5.75315545e-01,  -1.30666897e-16,
         4.47461836e-01,   2.43889614e-01,  -2.15089026e-01,
        -3.06923992e-01,  -1.39418467e-16])

This is the admon for warnings or paying attention.

Question

How many admon styles are supported by the Doconce Boostrap and Bootswatch styles?

Summary

Doconce supports the following elements of Bootstrap elements:

  • Admons
  • Panels (via admons)
  • Jumbotron for title and intro
  • Columns of content (grid structure via the slidecell environment)
  • Tooltips via footnotes