Skip to content

Commit

Permalink
Remove sub-section headings to fix table of content to fix #1168
Browse files Browse the repository at this point in the history
Add custom role to customize rubric directives with font size to match sub-section (H2) headings. Also remove unnecessary extra header to include CSS. Note the font size is not changed in the PDF output
  • Loading branch information
PeterC-DLS committed Jul 8, 2022
1 parent 97fc428 commit eaeec95
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
15 changes: 15 additions & 0 deletions manual/source/_static/rubric.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* rubric.css
* ~~~~~~~~~~~~~~~
*
* custom Sphinx stylesheet -- define custom font size to match h2 in rubrics with NXDL documentation
*
* :see: http://stackoverflow.com/questions/23462494/how-to-add-custom-css-file
*
*/


.rubric > .styleh2 {
font-size: 1.35em;
}

6 changes: 1 addition & 5 deletions manual/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@
{# :see: http://stackoverflow.com/questions/23462494/how-to-add-custom-css-file #}
{% extends "!layout.html" %}

{% set css_files = css_files + ['_static/blockquote.css'] %}
{% set css_files = css_files + ['_static/blockquote.css', '_static/rubric.css'] %}

{# set extrahead to add custom css ? #}
{% block extrahead %}
<link rel="stylesheet" href="../../_static/blockquote.css" type="text/css" />
{% endblock %}
12 changes: 6 additions & 6 deletions manual/source/classes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

.. _all.class.definitions:

.. role:: styleh2
:class: styleh2

NeXus Class Definitions
#######################

Expand All @@ -14,8 +17,7 @@ The complete :index:`!vocabulary` of terms used in NeXus NXDL files (names of
groups, fields, attributes, and links) is available for :ref:`download
<classes.vocabulary.downloads>`.

Base classes
------------------
.. rubric:: :styleh2:`Base classes`

NeXus :ref:`base class <base.class.definitions>` definitions define the set of terms that
*might* be used in an instance of that class.
Expand All @@ -37,8 +39,7 @@ Validation procedures should treat such additional items
(not covered by a base class specification) as notes or warnings
rather than errors.

Application Definitions
------------------------
.. rubric:: :styleh2:`Application Definitions`

NeXus :ref:`application definitions <application.definitions>` define the *minimum*
set of terms that
Expand Down Expand Up @@ -90,8 +91,7 @@ this group according to the specifications of the application definition.
application definition, you should start with each application definition
in a :ref:`NXsubentry` group.
Contributed Definitions
------------------------
.. rubric:: :styleh2:`Contributed Definitions`

NXDL files in the NeXus :ref:`contributed definitions <contributed.definitions>` include propositions from
the community for NeXus base classes or application definitions, as well
Expand Down
1 change: 0 additions & 1 deletion manual/source/ref_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ NeXus: Reference Documentation

.. toctree::
:maxdepth: 1
:glob:

defs_intro
nxdl
Expand Down

0 comments on commit eaeec95

Please sign in to comment.