diff --git a/tutorials/intro/70_report.py b/tutorials/intro/70_report.py index 5af02ac446d..cdcef629d16 100644 --- a/tutorials/intro/70_report.py +++ b/tutorials/intro/70_report.py @@ -657,3 +657,29 @@ data_path, pattern=pattern, render_bem=False, n_time_points_evokeds=5 ) report.save('report_parse_folder_cov.html', overwrite=True) + +# %% +# +# Adding custom HTML (e.g., a description text) +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# The :meth:`~mne.Report.add_html` method allows you to add custom HTML to +# your report. This feature can be very convenient to add short descriptions, +# lists, or reminders to your report (among many other things you can think +# of encoding in HTML). + +report = mne.Report(title='Report on hypothesis 1') + +my_html = """ +
We have the following hypothesis:
+Below we show several plots and tests of the data.
+""" + +report.add_html(title='Hypothesis', html=my_html) +report.save('report_add_html.html')