|
| 1 | +Inline documentation |
| 2 | +-------------------- |
| 3 | + |
| 4 | +The standard library |
| 5 | +==================== |
| 6 | + |
| 7 | +The ``xeus-cpp`` kernel allows users to access help on functions and classes |
| 8 | +of the standard library. |
| 9 | + |
| 10 | +In a code cell, typing ``?std::vector`` will simply display the help page on |
| 11 | +vector from the cppreference_ website. |
| 12 | + |
| 13 | +.. image:: vector_help.png |
| 14 | + |
| 15 | +Enabling the quick-help feature for third-party libraries |
| 16 | +========================================================= |
| 17 | + |
| 18 | +The quick help feature can be enabled for other libraries. To do so, a doxygen |
| 19 | +tag file for your library must be placed under the ``xeus-cpp`` "data" |
| 20 | +directory of the installation prefix, namely |
| 21 | + |
| 22 | +.. code:: |
| 23 | +
|
| 24 | + PREFIX/share/xeus-cpp/tagfiles |
| 25 | +
|
| 26 | +For ``xeus-cpp`` to be able to make use of that information, a JSON |
| 27 | +configuration file must be placed under the ``xeus-cpp`` `configuration` |
| 28 | +directory of the installation prefix, namely |
| 29 | + |
| 30 | +.. code:: |
| 31 | +
|
| 32 | + PREFIX/etc/xeus-cpp/tags.d |
| 33 | +
|
| 34 | +.. note:: |
| 35 | + |
| 36 | + For more information on how to generate tag files for a doxygen |
| 37 | + documentation, check the `relevant section`_ of the doxygen documentation. |
| 38 | + |
| 39 | +The format for the JSON configuration file is the following |
| 40 | + |
| 41 | +.. code:: json |
| 42 | +
|
| 43 | + { |
| 44 | + "url": "Base URL for the documentation", |
| 45 | + "tagfile": "Name of the doxygen tagfile" |
| 46 | + } |
| 47 | +
|
| 48 | +For example the JSON configuration file for the documentation of the standard |
| 49 | +library is |
| 50 | + |
| 51 | +.. code:: json |
| 52 | +
|
| 53 | + { |
| 54 | + "url": "https://en.cppreference.com/w/", |
| 55 | + "tagfile": "cppreference-doxygen-web.tag.xml" |
| 56 | + } |
| 57 | +
|
| 58 | +.. note:: |
| 59 | + |
| 60 | + We recommend that you only use the ``https`` protocol for the URL. Indeed, |
| 61 | + when the notebook is served over ``https``, content from unsecure sources |
| 62 | + will not be rendered. |
| 63 | + |
| 64 | +.. _cppreference: https://en.cppreference.com |
| 65 | +.. _`relevant section`: https://www.doxygen.nl/manual/external.html |
0 commit comments