Skip to content

Commit

Permalink
DOC #670 pygments
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jul 28, 2019
1 parent 710ca17 commit 40225e3
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion manual/source/defs_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Name must satisfy both
:index:`HDF <rules; HDF>` and :index:`XML <rules; XML>`
:index:`naming <rules; naming>`.

.. code-block:: guess
.. code-block:: text
:linenos:
NameStartChar ::= _ | a..z | A..Z
Expand Down
2 changes: 1 addition & 1 deletion manual/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ showing an external file link in HDF5:

.. rubric:: Example of linking to data in an external HDF5 file

.. code-block:: guess
.. code-block:: text
:linenos:
EXTERNAL_LINK "data" {
Expand Down
12 changes: 6 additions & 6 deletions manual/source/examples/code_napi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ NAPI C Example: write simple NeXus file
.. literalinclude:: napi-example.c
:tab-width: 4
:linenos:
:language: guess
:language: c

NAPI F77 Example: write simple NeXus file
+++++++++++++++++++++++++++++++++++++++++
Expand All @@ -42,7 +42,7 @@ NAPI F77 Example: write simple NeXus file
.. literalinclude:: napi-example.f77
:tab-width: 4
:linenos:
:language: guess
:language: fortran

NAPI F90 Example: write simple NeXus file
+++++++++++++++++++++++++++++++++++++++++
Expand All @@ -54,7 +54,7 @@ NAPI F90 Example: write simple NeXus file
.. literalinclude:: napi-example.f90
:tab-width: 4
:linenos:
:language: guess
:language: fortran


.. _example.napi.simple.3d.write.python:
Expand All @@ -75,7 +75,7 @@ NAPI Python Example: write simple NeXus file
.. literalinclude:: simple3D.py
:tab-width: 4
:linenos:
:language: guess
:language: python

View a NeXus HDF5 file using *h5dump*
#####################################
Expand All @@ -93,7 +93,7 @@ NAPI Python Example: ``h5dump`` output of NeXus HDF5 file
.. literalinclude:: simple3D.h5dump.txt
:tab-width: 4
:linenos:
:language: guess
:language: text


View a NeXus HDF5 file using *h5toText.py*
Expand All @@ -114,5 +114,5 @@ NAPI Python Example: ``h5toText`` output of NeXus HDF5 file
.. literalinclude:: simple3D.xture.txt
:tab-width: 4
:linenos:
:language: guess
:language: text

4 changes: 2 additions & 2 deletions manual/source/examples/code_native.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Writing a simple NeXus file using native HDF5 commands in C
.. literalinclude:: nxh5write.c
:tab-width: 4
:linenos:
:language: guess
:language: c

.. _code_native.reading:

Expand All @@ -36,5 +36,5 @@ Reading a simple NeXus file using native HDF5 commands in C
.. literalinclude:: nxh5read.c
:tab-width: 4
:linenos:
:language: guess
:language: c

10 changes: 5 additions & 5 deletions manual/source/examples/epics/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ default in a *default location*.
.. literalinclude:: attributes-reformatted.xml
:tab-width: 4
:linenos:
:language: guess
:language: xml

If you want to add additional EPICS process variables (PVs)
to be written in the HDF5 file,
Expand All @@ -89,7 +89,7 @@ even if you add PVs (a.k.a. *ndattribute*) to the attributes.xml file.
.. literalinclude:: layout.xml
:tab-width: 4
:linenos:
:language: guess
:language: xml

If you do not specify where in the file to write an *ndattribute* from the
attributes file, it will be written within the group that has
Expand Down Expand Up @@ -220,7 +220,7 @@ This example uses the *h5py* [#]_ package to write the HDF5 file.
.. literalinclude:: write_nexus_file.py
:tab-width: 4
:linenos:
:language: guess
:language: python


The output from that code is given in the
Expand All @@ -230,7 +230,7 @@ example.h5 file. It has this tree structure:
.. literalinclude:: tree_structure.txt
:tab-width: 4
:linenos:
:language: guess
:language: text

.. note:: Alternatively, the metadata shown in this example might
be placed in the ``/entry/instrument/detector`` (*NXdetector*)
Expand All @@ -252,7 +252,7 @@ using *nexusformat*:
.. literalinclude:: write_nexus_file2.py
:tab-width: 4
:linenos:
:language: guess
:language: python


Visualization
Expand Down
2 changes: 1 addition & 1 deletion manual/source/examples/lrmecs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LRMECS ``lrcs3701`` data: ``h5dump`` output
.. literalinclude:: dump-histogram1-data.txt
:tab-width: 4
:linenos:
:language: guess
:language: text


Visualize Using *HDFview*
Expand Down
10 changes: 5 additions & 5 deletions manual/source/examples/matlab/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This is the same data used with :ref:`Example-H5py`.
.. literalinclude:: input.dat
:tab-width: 4
:linenos:
:language: guess
:language: text

writing data
++++++++++++
Expand All @@ -38,7 +38,7 @@ writing data
.. literalinclude:: basic_writer.m
:tab-width: 4
:linenos:
:language: guess
:language: text

reading data
++++++++++++
Expand All @@ -52,7 +52,7 @@ reading data
.. literalinclude:: basic_reader.m
:tab-width: 4
:linenos:
:language: guess
:language: text


writing data file with links
Expand All @@ -67,7 +67,7 @@ writing data file with links
.. literalinclude:: writer_2_1.m
:tab-width: 4
:linenos:
:language: guess
:language: text

.. compound::

Expand All @@ -78,7 +78,7 @@ writing data file with links
.. literalinclude:: h5link.m
:tab-width: 4
:linenos:
:language: guess
:language: text


Downloads
Expand Down
12 changes: 6 additions & 6 deletions manual/source/fileformat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ chapter for examples that use the native HDF5 calls to write NeXus data files.
.. literalinclude:: examples/h5dump_group.txt
:tab-width: 4
:linenos:
:language: guess
:language: text

.. compound::

Expand All @@ -141,7 +141,7 @@ chapter for examples that use the native HDF5 calls to write NeXus data files.
.. literalinclude:: examples/h5dump_field.txt
:tab-width: 4
:linenos:
:language: guess
:language: text

.. compound::

Expand All @@ -152,7 +152,7 @@ chapter for examples that use the native HDF5 calls to write NeXus data files.
.. literalinclude:: examples/h5dump_attribute.txt
:tab-width: 4
:linenos:
:language: guess
:language: text

.. compound::

Expand All @@ -163,7 +163,7 @@ chapter for examples that use the native HDF5 calls to write NeXus data files.
.. literalinclude:: examples/h5dump_link.txt
:tab-width: 4
:linenos:
:language: guess
:language: text


.. XML is no longer a supported backend file format
Expand Down Expand Up @@ -197,7 +197,7 @@ chapter for examples that use the native HDF5 calls to write NeXus data files.
.. literalinclude:: examples/mapping1.xml.txt
:tab-width: 4
:linenos:
:language: guess
:language: xml
NeXus data sets are encoded as XML elements with
the name of the data. An attribute ``NAPItype`` defines the type and
Expand All @@ -216,7 +216,7 @@ chapter for examples that use the native HDF5 calls to write NeXus data files.
.. literalinclude:: examples/mapping2.xml.txt
:tab-width: 4
:linenos:
:language: guess
:language: xml
.. index::
attribute; XML
Expand Down
20 changes: 10 additions & 10 deletions manual/source/napi-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Here are examples for a UNIX shell and the Windows shell.
.. literalinclude:: examples/napi-java-jnexus.sh
:tab-width: 4
:linenos:
:language: guess
:language: sh

.. compound::

Expand All @@ -139,7 +139,7 @@ Here are examples for a UNIX shell and the Windows shell.
.. literalinclude:: examples/napi-java-jnexus.bat
:tab-width: 4
:linenos:
:language: guess
:language: bat

.. _NAPI-java-general-Programming:

Expand Down Expand Up @@ -173,7 +173,7 @@ to get a feeling for the API:
.. literalinclude:: examples/napi-java-prog1.java
:tab-width: 4
:linenos:
:language: guess
:language: java

Some notes on this little example:

Expand Down Expand Up @@ -214,7 +214,7 @@ Again a code sample which shows how this looks like:
.. literalinclude:: examples/napi-java-datarw1.java
:tab-width: 4
:linenos:
:language: guess
:language: java

The dataset is created as usual with ``makedata()`` and opened
with ``putdata()``. The trick is in ``putdata()``.
Expand All @@ -240,7 +240,7 @@ converted to and from bytes when reading string data. See a writing example:
.. literalinclude:: examples/napi-java-datarw2.java
:tab-width: 4
:linenos:
:language: guess
:language: java

And reading:

Expand All @@ -251,7 +251,7 @@ And reading:
.. literalinclude:: examples/napi-java-datarw2.java
:tab-width: 4
:linenos:
:language: guess
:language: java

The aforementioned holds for all strings written as SDS content or as an
attribute. SDS or vGroup names do not need this treatment.
Expand All @@ -271,7 +271,7 @@ Let us compare the C-API and Java-API signatures of the
.. literalinclude:: examples/frag-c-api-sig-getinfo.c
:tab-width: 4
:linenos:
:language: guess
:language: c

.. compound::

Expand All @@ -280,7 +280,7 @@ Let us compare the C-API and Java-API signatures of the
.. literalinclude:: examples/frag-c-api-sig-getinfo.java
:tab-width: 4
:linenos:
:language: guess
:language: java

The problem is that Java passes arguments only by value, which means they cannot
be modified by the method. Only array arguments can be modified.
Expand All @@ -300,7 +300,7 @@ stored object for the key. Thus the code for a vGroup search looks like this:
.. literalinclude:: examples/napi-java-inquiry1.java
:tab-width: 4
:linenos:
:language: guess
:language: java

For an attribute search both at global or SDS level the returned Hashtable
will hold the name as the key and a little class holding the type and size
Expand All @@ -313,7 +313,7 @@ information as value. Thus an attribute search looks like this in the Java-API:
.. literalinclude:: examples/napi-java-inquiry2.java
:tab-width: 4
:linenos:
:language: guess
:language: java

For more information about the usage of the API routines see the reference
or the NeXus C-API reference pages. Another good source of information is
Expand Down

0 comments on commit 40225e3

Please sign in to comment.