Skip to content

Commit 7693844

Browse files
authored
Added inline documentation feature in xeus-cpp docs (#303)
* removed redundant files in lite case * added inline documentation in docs * removed random file * cleanup
1 parent b13fb15 commit 7693844

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The Xeus-Cpp is a Jupyter kernel for the C++ programming language
3939
UsingXeus-Cpp
4040
tutorials
4141
magics
42+
inline_help
4243
dev-build-options
4344
debug
4445
FAQ

docs/source/inline_help.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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

docs/source/vector_help.png

162 KB
Loading

0 commit comments

Comments
 (0)