How to create a checklist in reStructuredText (reST)?

Viewed 6739

I am working on a simple checklist using reStructuredText. To this end I use a bullet list, but I would like to replace the standard bullet points with custom signs, such as empty checkboxes. Optimally, the checkboxes would be clickable in the HTML and/or PDF document.

If it is not possible/trivial in reST, could you recommend other text-based format where it is possible?

Bartosz

6 Answers

Static

try to use Unicode char.

It is beautiful than typing [] direct but hassle.

ā˜‘ U+2611

☐ U+2610

Dynamic

.. |check| raw:: html

    <input checked=""  type="checkbox">

.. |check_| raw:: html

    <input checked=""  disabled="" type="checkbox">

.. |uncheck| raw:: html

    <input type="checkbox">

.. |uncheck_| raw:: html

    <input disabled="" type="checkbox">

checkbox
=============

check to enable: |check|

check disable: |check_| 

uncheck enable: |uncheck|

uncheck disable: |uncheck_|

you can run above code on this website: https://livesphinx.herokuapp.com/

and you will see as below picture:

enter image description here

Related