##################
Format cheat sheet
##################

Title: # above and below (as lines 1 and 3 above)

*********
Heading 1
*********

=========
Heading 2
=========

Heading 3
*********

Heading 4
=========

Heading 5
^^^^^^^^^

************
Image Format
************

Image format, uses images as a reference from the soure/image file

       .. image:: images/image029.png
       : width: 800

       .. image:: images/image009.png
       :width: 800  

****************
Code Formatting
****************

To set text in a "Code format"
        ::
-or-

.. code-block:: xml

(text in code-block:: xml is in different colors)

****************
Table Formatting
****************

With a header row

.. list-table::
   :widths: 15 15 70
   :header-rows: 1
 
   * - First Name
     - Last Name
     - Residence
   * - Elizabeth
     - Bennett
     - Longbourne
   * - Fitzwilliam
     - Darcy
     - Pemberley

-- or --

With a bolded first column

.. list-table::
   :widths: 15 15 70
   :stub-columns: 1
 
   * - First Name
     - Elizabeth
     - Fitzwilliam
   * - Last Name
     - Bennett
     - Darcy
   * - Residence
     - Longboure
     - Pemberley

*******************
Cross-References
*******************

For references to edX101 pages:

        `Writing Exercises <https://edge.edx.org/courses/edX/edX101/How_to_Create_an_edX_Course/courseware/a45de3baa8a9468cbfb1a301fdcd7e86/d15cfeaff0af4dd7be4765cd0988d172/1>`_ has more in-depth discussion about problem types, and some general pedagogical considerations for adapting to the online format and a `Gallery of Response Types <https://edge.edx.org/accounts/login?next=/courses/edX/edX101/How_to_Create_an_edX_Course/courseware/a45de3baa8a9468cbfb1a301fdcd7e86/3ba055e760d04f389150a75edfecb844/1>`_

To cross reference between sections of a document

At the paragraph you are cross referencing:

        . _Set-Grade-Brackets:

To make the cross reference in text:

        see :ref:`Set Grade Brackets<Set-Grade-Brackets>`

To cross-reference a topic, but use your own text instead of the topic title, use the :ref: directive, but enter your own text followed by the topic anchor in angle brackets:

        If you want to add a graded tool or exercise, add the tool as a :ref:`custom JavaScript problem<Custom JavaScript>` or an :ref:`LTI component<LTI Component>`.

        (In this sentence, the text appears as "custom JavaScript problem" and "LTI component", and the linked-to topic titles are "Custom JavaScript Problem" and "LTI Component".)

External page reference

        see `Create a Problem <http://site.Create_Problem.html>`_ 

      
*******
Tables
*******

Example of a table with a cell that includes a bulleted list. The balnk lines before and after are critical.

.. list-table::
   :widths: 15 15 60
   :header-rows: 1

   * - Field
     - Type
     - Details
   * - ``correct_map``
     - dict
     - For each problem ID value listed by ``answers``, provides:
       
       * ``correctness``: string; 'correct', 'incorrect'
       * ``hint``: string; Gives optional hint. Nulls allowed. 
       * ``hintmode``: string; None, 'on_request', 'always'. Nulls allowed. 
       * ``msg``: string; Gives extra message response.
       * ``npoints``: integer; Points awarded for this ``answer_id``. Nulls allowed.
       * ``queuestate``: dict; None when not queued, else ``{key:'', time:''}``
         where ``key`` is a secret string dump of a DateTime object in the form
         '%Y%m%d%H%M%S'. Nulls allowed. 

   * - ``grade``
     - integer
     - Current grade value. 
   * - ``max_grade``
     - integer
     - Maximum possible grade value.