EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Question about Sphinx tables
From: "tom.cobb--- via Tech-talk" <[email protected]>
To: Mark Rivers <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 17 Jun 2019 15:33:33 +0000

Hi Mark,

 

I suspect the lack of borders is inherited from the theme CSS. You can override the CSS in a few different ways:

https://stackoverflow.com/a/32079202

 

The way I have done it in the past (assuming you want to keep the same theme) is to use a theme_override.css file like this one:

https://github.com/dls-controls/malcolmjs/blob/master/docs/source/_static/theme_overrides.css

 

You will need to place this override file somewhere and list the place in conf.py:

html_static_path = ['_static']

 

I won’t guess at precisely what CSS overrides are needed, as I normally just use the developer tools in the browser to inspect the page and prod things until it looks right…

 

As a side note, I recently discovered list-tables, which work well if you have tables that mix short labels and long descriptions:

.. list-table::

    :widths: 30, 70

    :align: center

    :header-rows: 1

 

    * - Option

      - Description

    * - Download Plot as PNG

      - Provides the ability to download a snapshot of the chart for use outside

        the user interface.

    * - Zoom

      - Allows you to select a rectangular bounding box around a feature of

        interest and zoom in on it.  The level of zoom dynamically adjusts

        according to the size of the bounding box (smaller box = higher zoom)

        with X and Y axes dynamically scaling to reflect the granularity of the

        resulting plot.  Note that while zoomed updates to the selected area

        pause, instead presenting a snapshot at the time of zoom.

    * - Pan

      - Provides the ability to pan the chart through horizontal and vertical

        axes.  Note that unlike **Zoom** options panning does not pause

        automatic updates, thus when panning back through time the plot may

        appear blank.

 

Thanks,

Tom

 

From: [email protected] <[email protected]> On Behalf Of Mark Rivers via Tech-talk
Sent: 17 June 2019 15:44
To: [email protected]
Subject: Question about Sphinx tables

 

Folks,

 

Thanks to a lot of work by Stuart Wilkins the areaDetector documentation is moving from pure HTML to .rst files processed with Sphinx and hosted at https://areadetector.github.io/master/index.html.

 

I have a question about how to make the tables look better. 

 

I have a simple CSV table:

 

.. csv-table::

   :header: Record names, Record types, GenICam features

   :delim: |

 

   FrameRate, FrameRate_RBV | ao, ai | FrameRate or FrameRateAbs

   FrameRateEnable, FrameRateEnable_RBV | bo, bi| FrameRateEnable or FrameRateEnabled

   TriggerSource, TriggerSource_RBV | mbbo, mbbi | TriggerSource

   TriggerOverlap, TriggerOverlap_RBV | mbbo, mbbi | TriggerOverlap

   TriggerSoftware | bo | TriggerSoftware

   ExposureMode, ExposureMode_RBV | mbbo, mbbi | ExposureMode

   ExposureAuto, ExposureAuto_RBV | mbbo, mbbi | ExposureAuto

   GainAuto, GainAuto_RBV | mbbo, mbbi | GainAuto

   PixelFormat, PixelFormat_RBV | mbbo, mbbi | PixelFormat

 

Sphinx generates this HTML for the beginning of the table:

 

<table border="1" class="docutils">

<colgroup>

<col width="33%" />

<col width="33%" />

<col width="33%" />

</colgroup>

<thead valign="bottom">

<tr class="row-odd"><th class="head">Record names</th>

<th class="head">Record types</th>

<th class="head">GenICam features</th>

</tr>

</thead>

<tbody valign="top">

<tr class="row-even"><td>FrameRate, FrameRate_RBV</td>

<td>ao, ai</td>

<td>FrameRate or FrameRateAbs</td>

 

Note that it has border=”1”, so the table should have borders.  However, it actually renders (in Chrome) as shown in the attachment, i.e. with no borders.

 

I manually edited the HTML to change it to “border=5” and that made no difference, there are still no borders.

 

If I remove the class=”docutils” from the table line, then it does render differently (closely packed columns), but there are still no borders.

 

Can anyone tell me what is causing this behavior?  I suspect it may be related to these lines near the beginning of the generated HTML file:

 

    <link rel="stylesheet" href="" type="text/css" />

    <link rel="stylesheet" href="" type="text/css" />

 

Do those style sheets override the settings for tables?  I looked at those files and I did not see anything obvious for the table borders.

 

Is there a way to get borders?

 

Thanks,

Mark

 

 

 

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


References:
Question about Sphinx tables Mark Rivers via Tech-talk

Navigate by Date:
Prev: procServ v2.8.0-rc2 available for testing and feedback Ralph Lange via Tech-talk
Next: RE: Question about Sphinx tables Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Question about Sphinx tables Mark Rivers via Tech-talk
Next: RE: Question about Sphinx tables Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 17 Jun 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·