sphinx + substitutions + latexpdf + large tables behaving weirdly

15 views
Skip to first unread message

KDMortimer

unread,
Jun 12, 2019, 1:14:41 PM6/12/19
to sphinx-users
I'm working on a RST project using Sphinx which has a large number of tables (~70), some of which have a large number of entries, some of which have very lengthy entries, and some that use :ref: or |substitutions| for simplicity. So that others can see what I'm talking about, I've included problematic tables here - so apologies for the long post. The document is related to ISO 19115-2:2009  and ISO 18405, so the textual content is heavily reused.

Only some tables seem to want to break up words, wrap text, or otherwise behave nicely. And I'm not sure what the difference between the ones that work and the ones that don't is, or how to make it beautiful.

E.g.,this table splits "extent" into two words when rendered.

+------------+----------+-----------------------------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Element name|Obligation|Value type                                     |Description                                                                       |Best practice                                                                                                                                                                                                        |
+============+==========+===============================================+==================================================================================+=====================================================================================================================================================================================================================+
|extent      |M-1       |TM_Primitive (see ISO 19108:2003, clause 5.2.2)|The date and time, or period of time, which describes the content in the resource.|TM_Primitive is abstract and can be described with a single instant in time or a period of time. Strongly recommend that a period is used to represent data collection or the period over which a model is simulated.|
+------------+----------+-----------------------------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

But this table doesn't split any values in the first column at all, and they run over the second column. Also, a lot of my tables use in line references, like the one below to 'MI_Instrument' - but in the PDF output, these are never split up, and run across into the next column.

+-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Element name             |Obligation|Value type                        |Description                                                              |Best practice                                                                                                                                                  |
+=========================+==========+==================================+=========================================================================+===============================================================================================================================================================+
|gmi:instrument           |O-R       |Class - gmi::ref:`MI_Instrument`  |Details on the instrument, sensor, or device used to acquire data.       |This should include information on specific sensors, convertors, and signal processing equipment used. Can also be called by the platform class if appropriate.|
+-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|gmi:operation            |O-R       |Class - gmi::ref:`MI_Operation`   |Details on the 'operation' which produced data.                          |A comprehensive research project would qualify as an operation.                                                                                                |
+-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
|gmi:platform             |O-R       |Class - gmi::ref:`MI_Platform`    |Details on the platform from which data were acquired.                   |Strongly recommended for experimental datasets. This may include details on the gliders, ships, buoys, or satellites used in data collection.                  |
+-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+

Some tables run off the bottom of the page, like this one:

+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Element name                               |Element description                                                                                                                                                                                                                                                                                                                |
+===========================================+===================================================================================================================================================================================================================================================================================================================================+
|Air-sea interface pCO2 sensor              |Located at the sea surface, an Air-Sea Interface pCO2 Sensor measures the partial pressure of carbon dioxide (pCO2) in both the atmosphere and ocean. These measurements are used to calculate the exchange of CO2 between the air and sea (Air-Sea CO2 Flux).                                                                     |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Benthic fluid flow rate sampler            |A Benthic Fluid Flow Rate Sampler measures the speed at which fluids seep from Earth's crust into the surrounding ocean (Benthic Fluid Flow Rate).                                                                                                                                                                                 |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Bio-acoustic sonar                         |Bio-acoustic Sonar measures fish and zooplankton concentrations using Acoustics. This instrument emits sound waves into the water column, which bounce off organisms back towards the sensor in a phenomenon known as '
backscatter'. The more organisms, the higher the backscatter.                                               |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|CTD                                        |A CTD is so named as it measures Conductivity, Temperature and Depth.  These parameters can then be used to calculate Salinity and Density.                                                                                                                                                                                        |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Digital camera                             |Digital Cameras capture high-resolution photos (Still Images) of the seafloor environment that can be used for analytical work.                                                                                                                                                                                                    |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Dissolved oxygen sensor                    |A Dissolved Oxygen Sensor measures the concentration of oxygen molecules that have been dissolved, or mixed, into seawater (Dissolved Oxygen Concentration).                                                                                                                                                                       |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|DNA sampler                                |A DNA Sampler filters a volume of seawater and preserves the particulate matter for genetic analysis after the instrument is recovered.                                                                                                                                                                                            |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Fluorometer                                |A Fluorometer is a device used to measure patterns of Fluorescence. These data are used to determine Chlorophyll, Dissolved Organic Matter, and Turbidity.                                                                                                                                                                         |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|HD video camera                            |HD Video Cameras capture High Definition (HD) Video of the seafloor environment that can be used for analytical work.                                                                                                                                                                                                              |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Hydrophone                                 |A Hydrophone is a passive acoustic sensor that listens for earthquakes, sea creatures, and human-generated noise in the ocean.                                                                                                                                                                                                     |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Hydrothermal vent fluid chemistry sensor   |Hydrothermal Vent Fluid Chemistry Sensors measure the chemical composition of the mineral-rich fluid plumes that emanate from cracks on the seafloor, providing insight into the sub-surface structure and dynamics of these unique habitats.                                                                                      |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Hydrothermal vent fluid sampler            |A Hydrothermal Vent Fluid Sampler collects a water sample and takes its temperature at the time of collection. Once recovered, laboratory tests are used to examine the chemistry of the vent fluid samples.                                                                                                                       |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Hydrothermal vent fluid temperature sensor |Hydrothermal Vent Fluid Temperature Sensors measure the Water Temperature of the mineral-rich fluid plumes that emanate from cracks on the seafloor, providing insight into the sub-surface structure and dynamics of these unique habitats.                                                                                       |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Light meter                                |A Light Meter is used to measure Downwelling Irradiance, the amount of light at a particular depth in the water column.                                                                                                                                                                                                            |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Mass spectrometer                          |A Mass Spectrometer measures the masses and relative concentrations of atoms and molecules in a water sample.                                                                                                                                                                                                                      |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Nitrate sensor                             |Nitrate Sensors measure the amount of nitrate (NO3-) dissolved in seawater.                                                                                                                                                                                                                                                        |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|pH sensor                                  |pH Sensors measure the concentration of hydrogen ions in a solution.  Seawater has an average pH of 8.2, which is currently decreasing due to increases in carbon dioxide, a phenomenon known as Ocean Acidification.                                                                                                              |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Phtosynthetically active radiation sensor  |A Photosynthetically Active Radiation (PAR) Sensor is used to measure the spectral range of light that is available for use by primary producers for photosynthesis (400-700 nanometers).                                                                                                                                          |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Seafloor pressure and tilt sensor          |Seafloor Pressure and Tilt Sensors measure the force on the seafloor exerted by the weight of the overlying water and atmosphere (pressure) and movement of the seafloor itself (tilt). These measurements are used to understand changes in water depth (tides, waves) and the structure and dynamics of Oceanic Tectonic Plates. |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Seafloor pressure sensor                   |A Seafloor Pressure Sensor measures the force on the seafloor exerted by the weight of the overlying water and atmosphere.                                                                                                                                                                                                         |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sea-surface vertical eddy flux sensor      |A Sea-Surface Vertical Eddy Flux Sensor measures a suite of parameters that describe the exchange of heat, moisture, and momentum between the ocean and the atmosphere.  Sea-Surface Vertical Eddy Flux Sensors measure Air Temperature, Air-Sea Heat Flux, Wind Velocity, and Humidity.                                           |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Seawater pCO2 sensor                       |Seawater pCO2 Sensors measure the partial pressure of CO2 in seawater. Carbon enters the ocean mainly through the dissolution of atmospheric CO2 and undergoes a complex series of biological and chemical reactions.                                                                                                              |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Seismometer                                |Seismometers measure Seafloor Movement.  These measurements provide insight into Seismic Activity and help to understand Volcanic Tremors, Seismology (including Earthquakes), and dynamics of Oceanic Tectonic Plates.                                                                                                            |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Surface wave sensor                        |A Surface Wave Sensor measures the frequency, height, period, and direction of waves on the ocean surface (Wave Properties). These sensors help to understand Turbulent Mixing in the surface ocean.                                                                                                                               |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Turbidity meter                            |A Turbidity Meter measures suspended solids in seawater; i.e. cloudiness caused by particles in the water.                                                                                                                                                                                                                         |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Velocity profiler - horizontal             |The Velocity Profiler-Horizontal is an array of echo sounders on the seafloor. They send '
pings' (i.e., sound waves) to the sea surface and measure the length of time it takes the pings to return. These measurements are used to calculate the average horizontal movement of water within a column.                            |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Velocity profiler - vertical               |A Velocity Profiler - Vertical uses Acoustics to measure Water Velocity. Sound waves emitted by the profiler scatter off suspended particles and back to the sensor. The sensor calculates velocity by measuring changes in these sound waves (i.e., Doppler shifts).                                                              |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Water velocity meter                       |A Water Velocity Meter measures the speed and direction of water as it moves past a single point.                                                                                                                                                                                                                                  |
+-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

While a nearby table runs across multiple pages, but doesn't wrap text, so content falls off screen. Like the picture below


+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Element name                                |Element description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+============================================+================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+
|Sound pressure                              |The difference between instantaneous total pressure and pressure that would exist in the absence of sound. This is in effect the quantity that is being represented when a sound pressure waveform is plotted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Peak sound pressure                         |The maximum sound pressure during a stated time interval. A peak sound pressure may arise from a positive or negative sound pressure. This quantity is typically useful as a metric for a pulsed waveform, though it may also be used to describe a periodic waveform.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Peak compressional pressure                 |The maximum value of the magnitude of the compressional pressure during a stated time interval. Peak compressional pressure  is sometimes referred to as peak-positive sound pressure”. A peak compressional pressure may only arise from a positive sound pressure. This quantity is typically most useful as a metric for a pulsed waveform, though it may also be used to describe a periodic waveform.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Peak rarefactional pressure                 |The maximum value of the magnitude of the rarefactional pressure during a stated time interval. Peak rarefactional pressure is sometimes referred to as peak-negative sound pressure”. A peak rarefactional pressure may only arise from a negative sound pressure, but is expressed as a positive valued quantity. This quantity is typically most useful as a metric for a pulsed waveform, though it may also be used to describe a periodic waveform.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Peak to peak sound pressure                 |The sum of the peak compressional pressure and the peak rarefactional pressure during a stated time interval. This quantity is typically most useful as a metric for a pulsed waveform, though it may also be used to describe a periodic waveform.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|RMS sound pressure                          |The square root of the mean square pressure, where the mean square pressure is the time integral of squared sound pressure over a specified time interval divided by the duration of the time interval. The RMS sound pressure is calculated by first squaring the values of sound pressure, averaging over the specified time interval, and then taking the square root. The averaging time must always be stated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sound exposure                              |The integral of the square of the sound pressure over a stated time interval or event (such as an acoustic pulse).  As the integral of squared sound pressure over time, the quantity is sometimes called the pressure-squared integral”. The quantity is sometimes taken as a proxy for the energy content of the sound wave (it may be converted to energy flux density by dividing by the specific acoustic impedance of the medium). When applied to an acoustic pulse, the integration time is the pulse duration. When applied to a single pulse (or event), the quantity is sometimes called single pulse sound exposure (or single event sound exposure”). Note that the sound exposure useful as a measure of the exposure of a receptor to a sound field, and a frequency weighting is commonly applied. If a frequency weighting is applied, this should be indicated by appropriate subscripts. |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Cumulative sound exposure                   |The sound exposure determined for an extended period or sequence of pulses/events.When stating the cumulative sound exposure, it is important to specify any other relevant information such number of pulses, total time duration, duty cycle of any sampling, etc. A more detailed discussion is provided in Section 2.3.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Pulse duration                              |The time during which a specified percentage of sound energy in the signal occurs. In the calculation, sound exposure may be used as a proxy for energy. A typical value of the percentage taken is 90, so that the duration is the time window during which 90% of the energy is present. This metric is intended for use to describe pulsed signals. If the percentage is represented by X, the metric is typically calculated by starting at (50-X/2)% and ending at (50+X/2)% of total energy (or 5% to 95% when X = 90).Note that this definition covers only X% of the overall pulse; if it is necessary to account for all time (or energy) in the pulse (including the missing 10% in the example given), multiply the above value by 100/X.                                                                                                                                                          |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Pulse repetition frequency                  |The number of pulses or events arriving per second. Note that this is not the same as the number of cycles of signal arriving per second (the acoustic frequency).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Spectral density                            |Any quantity expressed as a contribution per unit of bandwidth.An example is sound exposure spectral density, expressed in units of Pa2·s/Hz.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sound particle displacement                 |The instantaneous displacement in a stated direction of a particle in a medium from its position in the absence of sound waves.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sound particle velocity                     |The instantaneous velocity of a material particle in a stated direction due to the action of sound waves. The sound particle velocity is equal to the rate of change with time of the acoustic particle displacement in a stated direction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sound particle acceleration                 |The instantaneous acceleration of a material particle in a stated direction due to the action of sound waves.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Instantaneous sound intensity               |The product of the sound pressure and the particle velocity at a point in the sound field. Sound intensity is a vector quantity and is expressed for a specific direction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Time-averaged sound intensity               |The time-average of the sound intensity over a stated time interval in a stated direction. It is a vector quantity and is expressed for a specific direction.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Acoustic pulse rise time                    |The time required for the sound pressure to rise from X% to Y% of its maximum value, with 5% and 95% typically chosen for values of X and Y respectively.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sound exposure spectral density             |distribution as a function of non-negative frequency of the time-integrated squared sound pressure (3.1.3.5) per unit bandwidth of a sound having a continuous spectrum                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Equivalent plane wave sound intensity       |mean-square sound pressure (3.1.3.1), mml_m22, divided by the product of the density, ρ, and sound speed, c, of the undisturbed fluid                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Mean-square sound pressure spectral density |distribution as a function of non-negative frequency of the mean-square sound pressure (3.1.3.1) per unit bandwidth of a sound having a continuous spectrum                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Characteristic acoustic impedance           |sound pressure (3.1.2.1) divided by the component of the sound particle velocity (3.1.2.10) in the direction of the wave propagation, at a point in a non-dissipative medium and for a plane progressive wave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Specific acoustic impedance                 |Fourier transform of sound pressure (3.1.2.1), P(f), divided by the Fourier transform of sound particle velocity (3.1.2.10) in a given direction, U(f)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Transmission loss                           |reduction in a specified level between two specified points x1, x2 that are within an underwater acoustic field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Propagation loss                            |difference between source level (3.3.2.1) in a specified direction, LS, and mean-square sound pressure level (3.2.1.1), Lp(x), at a specified position, x                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Effective signal duration                   |square of the integral with respect to time of \|μ(t)\|2 divided by the integral with respect to time of \|μ(t)\|4, where μ(t) is the complex envelope (3.5.1.2) of the sound pressure (3.1.2.1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Threshold exceedance signal duration        |time during which the mean-square sound pressure level (3.2.1.1) (SPL) exceeds a specified threshold y decibels below the maximum SPL, for a specified averaging time                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Percentage energy signal duration           |time during which a specified percentage x of time-integrated squared sound pressure (3.1.3.5) occurs, starting at (50 - x/2) % and ending at (50 + x/2) % of total energy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Effective signal bandwidth                  |square of the integral with respect to frequency of \|M(f)\|2 divided by the integral with respect to frequency of \|M(f)\|4, where M(f) is the Fourier transform of the complex envelope (3.5.1.2), μ(t), corresponding to a time-dependent field quantity, p(t)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Sonar signal sound pressure                 |sound pressure (3.1.2.1) at a specified position caused by the presence of a target                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Auditory frequency weighting function       |frequency weighting function (3.7.1.6) chosen to represent a specified frequency-dependent characteristic of hearing sensitivity in a particular type of animal, by which an acoustic quantity is adjusted to reflect the importance of frequency dependence to that animal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Behavioural hearing theshold                |minimum level of a specified sound signal (3.1.5.8) that is capable of evoking a behaviourally measurable auditory sensation in a specified fraction of trials, for a specific subject and for specified conditions, including measurement geometry                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Electrophysiological hearing threshold      |minimum level of a specified signal (3.1.5.8) that is capable of evoking a detectable and reproducible electrophysiological response, for a specific subject and for specified conditions, including measurement geometry                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|Hearing threshold shift                     |change in the behavioural hearing threshold (3.7.2.1) or electrophysiological hearing threshold (3.7.2.2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Finally, a lot of my tables use in line references, like the one below to 'BasisOfRecordList' - but in the PDF output, these are never split up, and run across into the next column.

+-----------------------------+---------------+----------------------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------+
|Element name                 |Obligation     |Value type                              |Description                                                                       |Best practice                                                      |
+=============================+===============+========================================+==================================================================================+===================================================================+
|dwc:basisOfRecord            |M-1 per record |Codelist - dwc::ref:`BasisOfRecordList` |Select the appropriate observation type from the Darwin Core classes.             |That is, was it observed by machines or humans observations?       |
+-----------------------------+---------------+----------------------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------+
|dwc:informationWithheld      |O-1 per Class  |Free text                               |Brief description of information may exist in the data, but is not being shared.  |E.g., "no endangered species are identified in this record".       |
+-----------------------------+---------------+----------------------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------+

Here's a screenshot of what I would like things to sort of look like - a nicely working table. You can also see that it has a very long string of text which is nicely wrapped, and very long names, which get split up too.

I know from past experience that LaTeX tables are often quite tricky so I'm not surprised to encounter difficulty - but the "make html" output is beautiful, while the "make latexpdf" output is awful. So in this case I assume there must be some elegant solution I can apply.

I've tried applying longtable to a table that splits across pages, but it didn't change anything. It may be that this would fix a different problem case, but I haven't experimented enough with it yet.

jfbu

unread,
Jun 12, 2019, 5:22:49 PM6/12/19
to sphinx...@googlegroups.com
Le 12/06/2019 à 19:14, KDMortimer a écrit :
> I'm working on a RST project using Sphinx which has a large number of
> tables (~70), some of which have a large number of entries, some of which
> have very lengthy entries, and some that use :ref: or |substitutions| for
> simplicity. So that others can see what I'm talking about, I've included
> problematic tables here - so apologies for the long post. The document is
> related to ISO 19115-2:2009 and ISO 18405, so the textual content is
> heavily reused.
>
> Only some tables seem to want to break up words, wrap text, or otherwise
> behave nicely. And I'm not sure what the difference between the ones that
> work and the ones that don't is, or how to make it beautiful.
>
> E.g.,this table splits "extent" into two words when rendered.
>
> +------------+----------+-----------------------------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
> |Element name|Obligation|Value type |
> Description
> |Best practice
>
> |
> +============+==========+===============================================+==================================================================================+=====================================================================================================================================================================================================================+
> |extent |M-1 |TM_Primitive (see ISO 19108:2003, clause 5.2.2)|The
> date and time, or period of time, which describes the content in the
> resource.|TM_Primitive is abstract and can be described with a single
> instant in time or a period of time. Strongly recommend that a period is
> used to represent data collection or the period over which a model is
> simulated.|
> +------------+----------+-----------------------------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
>
> But this table doesn't split any values in the first column at all, and
> they run over the second column. Also, a lot of my tables use in line
> references, like the one below to 'MI_Instrument' - but in the PDF output,
> these are never split up, and run across into the next column.
>
> +-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
> |Element name |Obligation|Value type |
> Description |
> Best practice
>
> |
> +=========================+==========+==================================+=========================================================================+===============================================================================================================================================================+
> |gmi:instrument |O-R |Class - gmi::ref:`MI_Instrument` |
> Details on the instrument, sensor, or device used to acquire data. |
> This should include information on specific sensors, convertors, and signal
> processing equipment used. Can also be called by the platform class if
> appropriate.|
> +-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
> |gmi:operation |O-R |Class - gmi::ref:`MI_Operation` |
> Details on the 'operation' which produced data. |A
> comprehensive research project would qualify as an operation.
>
> |
> +-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
> |gmi:platform |O-R |Class - gmi::ref:`MI_Platform` |
> Details on the platform from which data were acquired. |
> Strongly recommended for experimental datasets. This may include details on
> the gliders, ships, buoys, or satellites used in data collection.
> |
> +-------------------------+----------+----------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
>
> Some tables run off the bottom of the page, like this one:
>
> I know from past experience that LaTeX tables are often quite tricky so I'm
> not surprised to encounter difficulty - but the "make html" output is
> beautiful, while the "make latexpdf" output is awful. So in this case I
> assume there must be some elegant solution I can apply.
>
> I've tried applying longtable to a table that splits across pages, but it
> didn't change anything. It may be that this would fix a different problem
> case, but I haven't experimented enough with it yet.
>


It seems your message got hard-wrapped and I found it hard to copy paste the grid-tables.

Can you post them again as some attached files ?

Tables are notoriously hard in LaTeX, which from the ground up has a much less convenient mark-up and philosophy than HTML in this area.

Thanks,

Jean-François


Reply all
Reply to author
Forward
0 new messages